Overview
Overview of the GRAS library
This document introduce the GRAS library (Grid Reality
And Simulation, or according to my english dictionary,
Generally Recognized As Safe ;).
Overview
The purpose of the GRAS is to allow the developpement of
distributed programs which will work with as few as possible
modification both on the SimGrid simulator (SG), and in the Real Life
(RL).
Here are the problems when you want to do so:
Communication in SG is done by passing tasks, while in
RL, you have to deal with sockets (or any wrapper to it).
In RL, each process should provide a main()
function, and it's obviously not the case in SG.
Application class target
If you want to run your code both in RL and in SG, you won't be
able to use the full set of features offered by any of those two
worlds. GRAS tries to provide a suffisent set of features to develop
your application, and implement them in both worlds.
GRAS uses the paradigm of event-driven
programming, which is an extension to the message-passing
one. Any process of a typical event-driven application declares
callback to incoming events, which can be messages from other
processes, timers or others.
All messages have an header, specifying its type, and attached
data, represented as one or several C structures. In order to send
the data over the network in RL, a type-description mecanism is
provided, and the RL version of GRAS implements CDR
functionnalities. That is to say that the data are sent in the native
format of the sender host, and converted on the destination host only
if needed.
In order to not reimplement the wheel, GRAS use existing code,
and adapt them to make them work together. The SG version naturally
use the SimGrid toolkit, while the RL version is based over the
communication library used in NWS (note that this library was somehow
modified, since the previous version use XDR, ie both the sender and
the receiver convert the data from/to a so called network
format). That's why some basic knowledge about how NWS work is
supposed in this document. But don't worry, you only have to know the
basics about NWS, the internals needed to understand the document
will be presented when needed.
@CHAR_TYPE:
@DOUBLE_TYPE:
@FLOAT_TYPE:
@INT_TYPE:
@LONG_TYPE:
@SHORT_TYPE:
@UNSIGNED_INT_TYPE:
@UNSIGNED_LONG_TYPE:
@UNSIGNED_SHORT_TYPE:
@STRUCT_TYPE:
@type:
@repetitions:
@type:
@repetitions:
@offset:
@structType:
@lastMember:
@memberType:
@repetitions: