1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Overview of the GRAS library
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>This document introduce the GRAS library (<emphasis>Grid Reality
9 And Simulation</emphasis>, or according to my english dictionary,
10 <emphasis>Generally Recognized As Safe</emphasis> ;).</para>
13 <title>Overview</title>
14 <para>The purpose of the GRAS is to allow the developpement of
15 distributed programs which will work with as few as possible
16 modification both on the SimGrid simulator (SG), and in the Real Life
19 <para>Here are the problems when you want to do so:
22 <para>Communication in SG is done by passing tasks, while in
23 RL, you have to deal with sockets (or any wrapper to it).</para>
25 <listitem><para>In RL, each process should provide a main()
26 function, and it's obviously not the case in SG.</para>
32 <title>Application class target</title>
33 <para>If you want to run your code both in RL and in SG, you won't be
34 able to use the full set of features offered by any of those two
35 worlds. GRAS tries to provide a suffisent set of features to develop
36 your application, and implement them in both worlds.</para>
38 <para>GRAS uses the paradigm of <emphasis>event-driven
39 programming</emphasis>, which is an extension to the message-passing
40 one. Any process of a typical event-driven application declares
41 callback to incoming events, which can be messages from other
42 processes, timers or others.</para>
44 <para>All messages have an header, specifying its type, and attached
45 data, represented as one or several C structures. In order to send
46 the data over the network in RL, a type-description mecanism is
47 provided, and the RL version of GRAS implements CDR
48 functionnalities. That is to say that the data are sent in the native
49 format of the sender host, and converted on the destination host only
52 <para>In order to not reimplement the wheel, GRAS use existing code,
53 and adapt them to make them work together. The SG version naturally
54 use the SimGrid toolkit, while the RL version is based over the
55 communication library used in NWS (note that this library was somehow
56 modified, since the previous version use XDR, ie both the sender and
57 the receiver convert the data from/to a so called network
58 format). That's why some basic knowledge about how NWS work is
59 supposed in this document. But don't worry, you only have to know the
60 basics about NWS, the internals needed to understand the document
61 will be presented when needed.</para>
64 <!-- ##### SECTION See_Also ##### -->
69 <!-- ##### ENUM DataTypes ##### -->
85 <!-- ##### MACRO SIMPLE_DATA ##### -->
94 <!-- ##### MACRO SIMPLE_MEMBER ##### -->
104 <!-- ##### MACRO PAD_BYTES ##### -->
115 <!-- ##### MACRO EODD ##### -->