...
Hama Pipes provides the following methods for C/C++ integration: (similar to the BSPModel)
Function | Description |
| Send a message to another peer. Messages sent by this method are not guaranteed to be received in a sent order. |
| Returns a message from the peer's received messages queue (a FIFO). |
| Returns the number of messages in the peer's received messages queue. |
| Starts the barrier synchronization and sends all the messages in the outgoing message queues to the corresponding remote peers. |
| Returns the count of current super-step. |
| Returns the name of this peer in the format "hostname:port". |
| Returns the name of n-th peer from sorted array by name. |
| Returns the index of this peer from sorted array by name. |
| Returns the names of all the peers executing tasks from the same job (including this peer). |
| Returns the number of peers. |
| Clears all queues entries. |
| Writes a key/value pair to the output collector. |
| Deserializes the next input key value into the given objects. |
| Closes the input and opens it right away, so that the file pointer is at the beginning again. |
...
Function | Description |
| Opens a SequenceFile with option "r" or "w" returns the corresponding fileID. |
| Reads the next key/value pair from the SequenceFile. |
| Appends the next key/value pair to the SequenceFile. |
| Closes a SequenceFile. |
Finally here is the Pi Estimator example implemented with Hama Pipes:
...