ComputeServiceMessage.h
1 
11 #ifndef WRENCH_COMPUTESERVICEMESSAGE_H
12 #define WRENCH_COMPUTESERVICEMESSAGE_H
13 
14 #include <memory>
15 #include <vector>
16 #include "wrench/workflow/execution_events/FailureCause.h"
17 #include "wrench/services/ServiceMessage.h"
18 
19 namespace wrench {
20 
21  class StandardJob;
22 
23  class PilotJob;
24 
25  /***********************/
27  /***********************/
28 
33  protected:
34  ComputeServiceMessage(std::string name, double payload);
35  };
36 
41  public:
42  ComputeServiceSubmitStandardJobRequestMessage(const std::string answer_mailbox, StandardJob *,
43  std::map<std::string, std::string> &service_specific_args,
44  double payload);
45 
47  std::string answer_mailbox;
51  std::map<std::string, std::string> service_specific_args;
52  };
53 
58  public:
59  ComputeServiceSubmitStandardJobAnswerMessage(StandardJob *, std::shared_ptr<ComputeService>, bool success,
60  std::shared_ptr<FailureCause> failure_cause, double payload);
61 
65  std::shared_ptr<ComputeService> compute_service;
67  bool success;
69  std::shared_ptr<FailureCause> failure_cause;
70  };
71 
76  public:
77  ComputeServiceStandardJobDoneMessage(StandardJob *, std::shared_ptr<ComputeService>, double payload);
78 
82  std::shared_ptr<ComputeService> compute_service;
83  };
84 
89  public:
90  ComputeServiceStandardJobFailedMessage(StandardJob *, std::shared_ptr<ComputeService>,
91  std::shared_ptr<FailureCause> cause,
92  double payload);
93 
97  std::shared_ptr<ComputeService> compute_service;
99  std::shared_ptr<FailureCause> cause;
100  };
101 
106  public:
107  ComputeServiceTerminateStandardJobRequestMessage(std::string answer_mailbox, StandardJob *, double payload);
108 
110  std::string answer_mailbox;
113  };
114 
119  public:
120  ComputeServiceTerminateStandardJobAnswerMessage(StandardJob *, std::shared_ptr<ComputeService>, bool success,
121  std::shared_ptr<FailureCause> failure_cause, double payload);
122 
126  std::shared_ptr<ComputeService> compute_service;
128  bool success;
130  std::shared_ptr<FailureCause> failure_cause;
131  };
132 
137  public:
138  ComputeServiceSubmitPilotJobRequestMessage(std::string answer_mailbox, PilotJob *,
139  std::map<std::string, std::string> &service_specific_args,
140  double payload);
141 
143  std::string answer_mailbox;
147  std::map<std::string, std::string> service_specific_args;
148  };
149 
154  public:
155  ComputeServiceSubmitPilotJobAnswerMessage(PilotJob *, std::shared_ptr<ComputeService>, bool success,
156  std::shared_ptr<FailureCause> cause,
157  double payload);
158 
162  std::shared_ptr<ComputeService> compute_service;
164  bool success;
166  std::shared_ptr<FailureCause> failure_cause;
167  };
168 
169 
174  public:
175  ComputeServicePilotJobStartedMessage(PilotJob *, std::shared_ptr<ComputeService>, double payload);
176 
180  std::shared_ptr<ComputeService> compute_service;
181  };
182 
187  public:
188  ComputeServicePilotJobExpiredMessage(PilotJob *, std::shared_ptr<ComputeService>, double payload);
189 
193  std::shared_ptr<ComputeService> compute_service;
194  };
195 
200  public:
201  ComputeServicePilotJobFailedMessage(PilotJob *, std::shared_ptr<ComputeService>, double payload);
202 
206  std::shared_ptr<ComputeService> compute_service;
207  };
208 
213  public:
214  ComputeServiceTerminatePilotJobRequestMessage(std::string answer_mailbox, PilotJob *, double payload);
215 
217  std::string answer_mailbox;
220  };
221 
226  public:
227  ComputeServiceTerminatePilotJobAnswerMessage(PilotJob *, std::shared_ptr<ComputeService> compute_service,
228  bool success,
229  std::shared_ptr<FailureCause> failure_cause, double payload);
230 
234  std::shared_ptr<ComputeService> compute_service;
236  bool success;
238  std::shared_ptr<FailureCause> failure_cause;
239  };
240 
241 
246  public:
247  ComputeServiceResourceInformationRequestMessage(std::string answer_mailbox, double payload);
248 
250  std::string answer_mailbox;
251  };
252 
257  public:
258  ComputeServiceResourceInformationAnswerMessage(std::map<std::string, std::map<std::string, double>> info,
259  double payload);
260 
262  std::map<std::string, std::map<std::string, double>> info;
263  };
264 
265  /***********************/
267  /***********************/
268 
269 };
270 
271 #endif //WRENCH_COMPUTESERVICEMESSAGE_H
Top-level class for messages received/sent by a ComputeService.
Definition: ComputeServiceMessage.h:32
A message sent by a ComputeService when a PilotJob has failed.
Definition: ComputeServiceMessage.h:199
PilotJob * job
The pilot job that has failed.
Definition: ComputeServiceMessage.h:204
StandardJob * job
The job that has completed.
Definition: ComputeServiceMessage.h:80
A message sent by a ComputeService in answer to a StandardJob termination request.
Definition: ComputeServiceMessage.h:118
A message sent by a ComputeService when a PilotJob has started its execution.
Definition: ComputeServiceMessage.h:173
A message sent by a ComputeService when a PilotJob has expired.
Definition: ComputeServiceMessage.h:186
A message sent by a ComputeService in answer to a resource information request.
Definition: ComputeServiceMessage.h:256
std::shared_ptr< ComputeService > compute_service
The compute service to which the job had been submitted.
Definition: ComputeServiceMessage.h:126
PilotJob * job
The submitted pilot job.
Definition: ComputeServiceMessage.h:160
StandardJob * job
The standard job to terminate.
Definition: ComputeServiceMessage.h:124
std::shared_ptr< ComputeService > compute_service
The compute service on which the pilot job failed.
Definition: ComputeServiceMessage.h:206
std::map< std::string, std::map< std::string, double > > info
The resource information map.
Definition: ComputeServiceMessage.h:262
bool success
Whether to job submission was successful.
Definition: ComputeServiceMessage.h:67
A message sent by a ComputeService when a StandardJob has failed to execute.
Definition: ComputeServiceMessage.h:88
std::shared_ptr< FailureCause > cause
The cause of the failure.
Definition: ComputeServiceMessage.h:99
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
StandardJob * job
The submitted job.
Definition: ComputeServiceMessage.h:49
A message sent to a ComputeService to submit a StandardJob for execution.
Definition: ComputeServiceMessage.h:40
PilotJob * job
The pilot job that has expired.
Definition: ComputeServiceMessage.h:191
std::string name
The message name.
Definition: SimulationMessage.h:37
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:69
StandardJob * job
The job that has failed.
Definition: ComputeServiceMessage.h:95
std::shared_ptr< ComputeService > compute_service
The compute service to which the job had been submitted.
Definition: ComputeServiceMessage.h:234
A message sent by a ComputeService in answer to a StandardJob submission request. ...
Definition: ComputeServiceMessage.h:57
std::shared_ptr< ComputeService > compute_service
The compute service to which the job was submitted.
Definition: ComputeServiceMessage.h:162
std::shared_ptr< ComputeService > compute_service
The compute service on which the job has completed.
Definition: ComputeServiceMessage.h:82
A pilot (i.e., non-standard) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: PilotJob.h:29
A standard (i.e., non-pilot) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: StandardJob.h:38
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:238
A message sent by a ComputeService in answer to a PilotJob submission request.
Definition: ComputeServiceMessage.h:153
std::shared_ptr< ComputeService > compute_service
The compute service on which the job has failed.
Definition: ComputeServiceMessage.h:97
std::map< std::string, std::string > service_specific_args
Service specific arguments.
Definition: ComputeServiceMessage.h:51
PilotJob * job
The pilot job that has started.
Definition: ComputeServiceMessage.h:178
A message sent to a ComputeService to request information on its compute resources.
Definition: ComputeServiceMessage.h:245
PilotJob * job
The submitted pilot job.
Definition: ComputeServiceMessage.h:145
std::shared_ptr< ComputeService > compute_service
The compute service on which the pilot job has expired.
Definition: ComputeServiceMessage.h:193
A message sent by a ComputeService in answer to a PilotJob termination request.
Definition: ComputeServiceMessage.h:225
StandardJob * job
The job to terminate.
Definition: ComputeServiceMessage.h:112
A message sent to a ComputeService to terminate a PilotJob previously submitted for execution...
Definition: ComputeServiceMessage.h:212
PilotJob * job
The job to terminate.
Definition: ComputeServiceMessage.h:219
ComputeServiceMessage(std::string name, double payload)
Constructor.
Definition: ComputeServiceMessage.cpp:21
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:110
std::shared_ptr< ComputeService > compute_service
The compute service on which the pilot job has started.
Definition: ComputeServiceMessage.h:180
bool success
Whether the job submission was successful or not.
Definition: ComputeServiceMessage.h:164
std::shared_ptr< ComputeService > compute_service
The compute service to which the job was submitted.
Definition: ComputeServiceMessage.h:65
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:217
bool success
Whether to job termination was successful.
Definition: ComputeServiceMessage.h:128
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:130
A message sent to a ComputeService to terminate a StandardJob previously submitted for execution...
Definition: ComputeServiceMessage.h:105
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:143
A message sent to a ComputeService to submit a PilotJob for execution.
Definition: ComputeServiceMessage.h:136
PilotJob * job
The job to terminate.
Definition: ComputeServiceMessage.h:232
std::map< std::string, std::string > service_specific_args
Service specific arguments.
Definition: ComputeServiceMessage.h:147
std::shared_ptr< FailureCause > failure_cause
The cause of the failure, or nullptr on success.
Definition: ComputeServiceMessage.h:166
std::string answer_mailbox
The mailbox to which the answer should be sent.
Definition: ComputeServiceMessage.h:250
A message sent by a ComputeService when a StandardJob has completed execution.
Definition: ComputeServiceMessage.h:75
std::string answer_mailbox
The mailbox to which the answer message should be sent.
Definition: ComputeServiceMessage.h:47
Definition: Alarm.cpp:19
StandardJob * job
The standard job that was submitted.
Definition: ComputeServiceMessage.h:63
bool success
Whether to job termination was successful.
Definition: ComputeServiceMessage.h:236