Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hama Wiki" for change 
notification.

The "StreamingProtocol" page has been changed by thomasjungblut:
http://wiki.apache.org/hama/StreamingProtocol?action=diff&rev1=2&rev2=3

  
  If you want to know how to run a user code within other environments, have a 
look in the python example at the end.
  
- ==Text Based Protocol==
+ == Text Based Protocol ==
  
  The text based protocol is very easy. You have a finite amount of operations 
that are associated with a unique identifier (OP_CODE). Common operations in 
BSP are sending a message or starting the barrier synchronization. In Hama 
Streaming, every operation is ended with a newline (‘\n’) character, so 
everything is done with a single line of text. Of course there are operations 
that are going to use multiple lines to naturally separate information, however 
these are special cases.
  
@@ -71, +71 @@

  LOG   25      Not implemented in Pipes, but in streaming it sends child 
logging to the Java task.
  
  
- ==Acknowledgements==
+ == Acknowledgements ==
  
  To detect whether the forked child has arrived at the next stage of an 
algorithm, we work with acknowledgements (short ACK), that have a special 
formatting. 
  ACKS are formally expressed as "%ACK_" + OP_CODE + "%=", where OP_CODE is the 
operation to acknowledge.
  
- ==Initialization Sequence==
+ == Initialization Sequence ==
  
  After the child process has been forked from the Java BSP Task, a special 
initialization sequence is needed. Formally the sequence looks like this:
  
@@ -124, +124 @@

  
  The three steps are called in sequential order, so after you have ACK’d the 
end of the setup, the Java code will immediately start telling you about that 
you need to start the bsp function. This applies also for the transition 
between bsp and cleanup function.
  
- ==BSPPeer Functionality==
+ == BSPPeer Functionality ==
  
  People familiar with the Hama BSP API know that there is a context object 
which gives access to the BSP functionality like send or sync. We think this is 
a cool design and you should take care of implementing it as well, so you can 
pass this peer in all the user implemented functions. 
  
@@ -150, +150 @@

  readKeyValue  -       %6%=    Key and Value in two separate following lines. 
If no input available, both are equal to “%%-1%%”.
  reopenInput   -       %17%=   
  
- ==Closing Sequences==
+ == Closing Sequences ==
  
  To determine if the child process successfully finished its computations, we 
have a closing sequence that is expected after you acknowledged your cleanup.
  The closing sequence is basically just sending TASK_DONE and DONE command to 
the Java process.
@@ -165, +165 @@

  Congratulation, you are now able to implement Hama streaming in other 
languages.
  
  
- =Appendix=
+ = Appendix =
  
- ==Known implementations==
+ == Known implementations ==
  
   * Hama Streaming for Python: https://github.com/thomasjungblut/HamaStreaming
  
  
- ==Running user code in the Python environment==
+ == Running user code in the Python environment ==
  
  In the Python runtime, you can pass a .py filename to the BSPRunner as 
argument, using __import__ you can import the class, get the class via getattr 
and get an instance by instantiating this class.
  

Reply via email to