pads:gaia-apis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pads:gaia-apis [2010/11/10 13:15] – gdangelo | pads:gaia-apis [2017/12/20 07:48] (current) – gdangelo | ||
---|---|---|---|
Line 56: | Line 56: | ||
Returns the LP identifier. | Returns the LP identifier. | ||
+ | ---- | ||
=== GAIA_Finalize() | === GAIA_Finalize() | ||
Line 77: | Line 78: | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
Line 94: | Line 97: | ||
//none// | //none// | ||
- | |||
**Return value:** | **Return value:** | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
Line 112: | Line 116: | ||
**Description**: | **Description**: | ||
- | Returns the length of the time-step | + | Returns the length of the timestep |
**Notes**: | **Notes**: | ||
Line 120: | Line 124: | ||
**Return value:** | **Return value:** | ||
- | The time-step | + | The timestep |
+ | |||
+ | ---- | ||
Line 143: | Line 149: | ||
The descriptor (integer) of the SE. | The descriptor (integer) of the SE. | ||
+ | |||
+ | ---- | ||
Line 165: | Line 173: | ||
Returns the next timestep value (double). | Returns the next timestep value (double). | ||
+ | |||
+ | ---- | ||
+ | |||
==== Migration ==== | ==== Migration ==== | ||
+ | |||
+ | |||
+ | === GAIA_Migrate() | ||
+ | <code java> | ||
+ | void GAIA_Migrate (int id, String data, int size); | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | * int **id**: Identifier of the migrating SE; | ||
+ | * String **data**: A string containing the internal state of the SE; | ||
+ | * int **size**: String size; | ||
+ | |||
+ | |||
+ | **Description**: | ||
+ | |||
+ | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | * The " | ||
+ | |||
+ | * The GAIA_Migrate() is implemented using a " | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | //none// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | === GAIA_ByteMigrate() | ||
+ | <code java> | ||
+ | void GAIA_ByteMigrate (int id, byte[] data, int size); | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | * int **id**: Identifier of the migrating SE; | ||
+ | * byte[] **data**: A byte-array containing the internal state of the SE; | ||
+ | * int **size**: String size; | ||
+ | |||
+ | |||
+ | **Description**: | ||
+ | |||
+ | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | * The " | ||
+ | |||
+ | * The GAIA_ByteMigrate() is implemented using a “EXEC_MIGR” message. Therefore, the LP that receives a message of this type is receiving a migrating Simulated Entity. | ||
+ | |||
+ | * This API has the exactly the same semantic of GAIA_Migrate(). For performance reasons, in this case the SE state is contained in an array instead of a String. | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | //none// | ||
+ | |||
+ | ---- | ||
+ | |||
=== GAIA_SetCountDown() | === GAIA_SetCountDown() | ||
Line 184: | Line 254: | ||
The default value of E3_EVENT_COUNTDOWN is 30 events. | The default value of E3_EVENT_COUNTDOWN is 30 events. | ||
- | |||
**Return value:** | **Return value:** | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
Line 206: | Line 277: | ||
^ Migration heuristic | ^ Migration heuristic | ||
| MIGR_OFF | | MIGR_OFF | ||
- | | MIGR_ON / MIGR_E1 | + | | MIGR_ON / MIGR_E1 |
| MIGR_E2 | | MIGR_E2 | ||
Line 219: | Line 290: | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
Line 231: | Line 304: | ||
**Description**: | **Description**: | ||
- | All the implemented migration heuristics are based on the evaluation of the outbound UNICAST traffic generated by each Simulated Entity. The migration factor is a tuning parameters of the heuristics: a low value would increase the number of migrations, conversely a higher value would reduce the number of migrations (default value = 3). | + | All the implemented migration heuristics are based on the evaluation of the outbound UNICAST traffic generated by each Simulated Entity. The migration factor is a tuning parameters of the heuristics: a low value would increase the number of migrations, conversely a higher value would reduce the number of migrations (default value = 3). |
**Notes**: | **Notes**: | ||
Line 240: | Line 313: | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
Line 252: | Line 327: | ||
**Description**: | **Description**: | ||
- | The migration heuristic 1 (MIGR_ON / MIGR_E1) uses a sliding window mechanism to evaluate the communication pattern of each SE (HISTORY_SLOTS, | + | The migration heuristic 1 (MIGR_ON / MIGR_E1) uses a sliding window mechanism to evaluate the communication pattern of each SE (HISTORY_SLOTS, |
**Notes**: | **Notes**: | ||
Line 261: | Line 336: | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
Line 273: | Line 350: | ||
**Description**: | **Description**: | ||
- | The migration heuristics 2 and 3 (MIGR_E2 / MIGR_E3) are based on the a sliding-windows | + | The migration heuristics 2 and 3 (MIGR_E2 / MIGR_E3) are based on the a sliding |
**Notes**: | **Notes**: | ||
Line 282: | Line 359: | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
+ | |||
=== GAIA_SetMigration() | === GAIA_SetMigration() | ||
Line 293: | Line 373: | ||
**Description**: | **Description**: | ||
- | All the implemented migration heuristics are based on the evaluation of the outbound UNICAST traffic generated by each SE (also called events). | + | All the implemented migration heuristics are based on the evaluation of the outbound UNICAST traffic generated by each SE (also called events). |
^ Migration heuristic | ^ Migration heuristic | ||
| MIGR_OFF | | MIGR_OFF | ||
- | | MIGR_ON / MIGR_E1 | + | | MIGR_ON / MIGR_E1 |
- | | MIGR_E2 | + | | MIGR_E2 |
- | | MIGR_E3 | + | | MIGR_E3 |
\\ | \\ | ||
Line 309: | Line 389: | ||
* GAIA_SetMT(): | * GAIA_SetMT(): | ||
* GAIA_SetMF(): | * GAIA_SetMF(): | ||
+ | * E1_HISTORY_SLOTS, | ||
* E2_EVENT_HISTORY_SIZE, | * E2_EVENT_HISTORY_SIZE, | ||
* E3_EVENT_COUNTDOWN, | * E3_EVENT_COUNTDOWN, | ||
- | * HISTORY_SLOTS, | ||
**Return value:** | **Return value:** | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
+ | |||
==== Load Balancing ==== | ==== Load Balancing ==== | ||
Line 339: | Line 422: | ||
//none// | //none// | ||
+ | ---- | ||
- | ==== GAIA_Migrate() | ||
- | <code java> | ||
- | void GAIA_Migrate (int id, String data, int size); | ||
- | </ | ||
- | |||
- | **Parameters**: | ||
- | * int **id**: Identifier of the migrating SE; | ||
- | * String **data**: A string containing the internal state of the SE; | ||
- | * int **size**: String size; | ||
- | |||
- | |||
- | **Description**: | ||
- | |||
- | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | ||
- | |||
- | **Notes**: | ||
- | |||
- | * The " | ||
- | |||
- | * The GAIA_Migrate() is implemented using a " | ||
- | |||
- | **Return value:** | ||
- | |||
- | //none// | ||
- | |||
- | |||
- | ==== GAIA_ByteMigrate() | ||
- | <code java> | ||
- | void GAIA_ByteMigrate (int id, byte[] data, int size); | ||
- | </ | ||
- | |||
- | **Parameters**: | ||
- | * int **id**: Identifier of the migrating SE; | ||
- | * byte[] **data**: A byte-array containing the internal state of the SE; | ||
- | * int **size**: String size; | ||
- | |||
- | |||
- | **Description**: | ||
- | |||
- | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | ||
- | |||
- | **Notes**: | ||
- | |||
- | * The " | ||
- | |||
- | * The GAIA_ByteMigrate() is implemented using a “EXEC_MIGR” message. Therefore, the LP that receives a message of this type is receiving a migrating Simulated Entity. | ||
- | |||
- | * This API has the exactly the same semantic of GAIA_Migrate(). For performance reasons, in this case the SE state is contained in an array instead of a String. | ||
- | |||
- | **Return value:** | ||
- | |||
- | //none// | ||
+ | ==== Communication | ||
- | ==== GAIA_Send() | + | === GAIA_Send() |
<code java> | <code java> | ||
void GAIA_Send (int obj_src, int obj_dest, double Ts, String Msg, int Size); | void GAIA_Send (int obj_src, int obj_dest, double Ts, String Msg, int Size); | ||
Line 413: | Line 446: | ||
**Notes**: | **Notes**: | ||
- | The message time-stamp has to respect the constraints given by the synchronization algorithm (time-stepped). | + | The message time-stamp has to respect the constraints given by the synchronization algorithm (timestepped). |
**Return value:** | **Return value:** | ||
Line 419: | Line 452: | ||
//none// | //none// | ||
+ | ---- | ||
- | ==== GAIA_ByteSend() | + | |
+ | === GAIA_ByteSend() | ||
<code java> | <code java> | ||
void GAIA_ByteSend (int obj_src, int obj_dest, double Ts, byte[] Msg, int Size); | void GAIA_ByteSend (int obj_src, int obj_dest, double Ts, byte[] Msg, int Size); | ||
Line 439: | Line 474: | ||
**Notes**: | **Notes**: | ||
- | * The message time-stamp has to respect the constraints given by the synchronization algorithm (time-stepped). | + | * The message time-stamp has to respect the constraints given by the synchronization algorithm (timestepped). |
* This API has the exactly the same semantic of GAIA_Send(). For performance reasons, in this case the message is contained in an array instead of a String. | * This API has the exactly the same semantic of GAIA_Send(). For performance reasons, in this case the message is contained in an array instead of a String. | ||
Line 448: | Line 483: | ||
//none// | //none// | ||
+ | ---- | ||
- | ==== GAIA_Broadcast() | + | |
+ | === GAIA_Broadcast() | ||
<code java> | <code java> | ||
void GAIA_Broadcast (int obj_src, double Ts, String Msg, int Size); | void GAIA_Broadcast (int obj_src, double Ts, String Msg, int Size); | ||
Line 467: | Line 504: | ||
**Notes**: | **Notes**: | ||
- | * The message time-stamp has to respect the constraints given by the synchronization algorithm (time-stepped). | + | * The message time-stamp has to respect the constraints given by the synchronization algorithm (timestepped). |
* Given that the message is delivered also to the SE that is originating it, it must be carefully managed to avoid loops. | * Given that the message is delivered also to the SE that is originating it, it must be carefully managed to avoid loops. | ||
Line 474: | Line 511: | ||
//none// | //none// | ||
+ | |||
+ | ---- | ||
- | ==== GAIA_ByteBroadcast() | + | === GAIA_ByteBroadcast() |
<code java> | <code java> | ||
void GAIA_ByteBroadcast (int obj_src, double Ts, byte[] Msg, int Size); | void GAIA_ByteBroadcast (int obj_src, double Ts, byte[] Msg, int Size); | ||
Line 494: | Line 533: | ||
**Notes**: | **Notes**: | ||
- | * The message time-stamp has to respect the constraints given by the synchronization algorithm (time-stepped). | + | * The message time-stamp has to respect the constraints given by the synchronization algorithm (timestepped). |
* Given that the message is delivered also to the SE that is originating it, it must be carefully managed to avoid loops. | * Given that the message is delivered also to the SE that is originating it, it must be carefully managed to avoid loops. | ||
Line 505: | Line 544: | ||
//none// | //none// | ||
+ | ---- | ||
- | ==== GAIA_Receive() | + | |
+ | === GAIA_Receive() | ||
<code java> | <code java> | ||
String | String | ||
Line 533: | Line 574: | ||
Returns the message (String). | Returns the message (String). | ||
+ | ---- | ||
- | ==== GAIA_ByteReceive() | + | === GAIA_ByteReceive() |
<code java> | <code java> | ||
byte[] | byte[] | ||
Line 564: | Line 606: | ||
Returns the message (byte-array). | Returns the message (byte-array). | ||
- | ==== GAIA_GetStatistics() | + | ---- |
+ | |||
+ | |||
+ | ==== Statistics ==== | ||
+ | |||
+ | |||
+ | === GAIA_GetStatistics() | ||
<code java> | <code java> | ||
void GAIA_GetStatistics(); | void GAIA_GetStatistics(); | ||
Line 589: | Line 637: | ||
//none// | //none// | ||
+ | |||
+ | |||
+ | ---- | ||
===== C bindings ===== | ===== C bindings ===== | ||
Line 599: | Line 650: | ||
void GAIA_SetMF (float); | void GAIA_SetMF (float); | ||
void GAIA_SetMT (unsigned int); | void GAIA_SetMT (unsigned int); | ||
+ | void GAIA_SetCountDown ( int ); | ||
+ | void GAIA_SetHistorySlots (int ); | ||
+ | void GAIA_SetEventHistorySize (int ); | ||
void GAIA_SetMigration (int); | void GAIA_SetMigration (int); | ||
void GAIA_SetLoadBalancing (int); | void GAIA_SetLoadBalancing (int); | ||
Line 612: | Line 666: | ||
Please refer to the description of the Java binding to have an introduction to the provided APIs. | Please refer to the description of the Java binding to have an introduction to the provided APIs. | ||
- | |||
pads/gaia-apis.1289394911.txt.gz · Last modified: 2010/11/10 13:15 by gdangelo