Changes between Version 28 and Version 29 of Documentation/Tutorial/PingPong


Ignore:
Timestamp:
Apr 28, 2009, 4:08:47 PM (15 years ago)
Author:
huebsch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/Tutorial/PingPong

    v28 v29  
    136136
    137137After definitions for construction und destruction (the first also setting a timer to 5 seconds), we come to the ''startup'' method.
    138 The ''startup'' method (lines 20 ff.) is called from the !StartupWrapper, jolting the operation of the ping pong service. Here, we first create an AribaModule object, serving as our port to ''Ariba'' (line 33). Then, we give our network instance a specific name (being ''spovnet'' in the example), before we collect some configurational parameters (lines 46-56). Those parameters are defined in the config file, they serve e.g. in giving IP adresses and port numbers to ariba instances.
    139 
    140 Then we get to the point where we decide the role of the specific ping pong instance (initiator versus joiner) (lines 39-42). Remember that we got this information in line 17. If the starting node is the initiator of the SpoVNet instance, it creates the SpoVNet, specifying its SpoVNetID, NodeID, Locator and Port (line 40). In contrast, other nodes join the instance, providing the same parameters (line 42). After starting up, a service needs to bind to the SpoVNet Base Overlay with its service ID (lines 44/45). Finally, we may give out all kinds of logging infos by calling the method logging_info (line 47).
     138The ''startup'' method (lines 20 ff.) is called from the !StartupWrapper, jolting the operation of the ping pong service. Here, we first create an AribaModule object, serving as our port to ''Ariba'' (line 33). Then, we give our network instance a specific name (being ''spovnet'' in the example), before we collect some configurational parameters (lines 46-56). Those parameters are defined in the config file, they serve e.g. in giving IP adresses and port numbers to ariba instances. In line 56, we start ''Ariba''. Also, we need a ''Node'' object, reflecting our application running over ''Ariba'' (more than one could possibly be using one Ariba). This is created in line 62 and the bound to the ariba object with its specific ServiceID. After this bnind operation, the ''Node'' is able to receive signals and messages from ''Ariba''. After this, we start the node object and either initiate or join the network instance (depending on the role of the actual node, wich could be initiator or joiner).
     139Finally, we may give out all kinds of logging infos by calling the method logging_info (line 47).
    141140 
    142141