Versatile Simulation of Distributed Systems
Future core API, mixing the full power of SimGrid to the power of C++.
The S4U API is currently under heavy work, but will eventually deprecate the MSG and SimDag APIs. Everything that you can do in SimGrid will be possible in S4U.
Unsurprisingly, the S4U interface matches the concepts presented in the introduction. You should read this page first, to not get lost in the amount of classes provided here. Or you could jump to the S4U examples directly if you prefer.
For sake of simplicity, we use RAII everywhere in S4U. This is an idiom where resources are automatically managed through the context. Provided that you never manipulate objects of type Foo directly but always FooPtr references (which are boost::intrusive_ptr<Foo>), you will never have to explicitely release the resource that you use nor to free the memory of unused objects.
Here is a little example:
|An actor is an independent stream of execution in your distributed application. More...|
|A condition variableThis is a drop-in replacement of |
|An host represents some physical resource with computing and networking capabilities. More...|
|Mailboxes: Network rendez-vous points. More...|
|A VM is a virtual machine that contains actors. More...|
|Static methods working on the current actor (see s4u::Actor) |
|Find the S4U example fitting your needs in the archive. |