Changes between Version 5 and Version 6 of Old/OTG/ArchitectureDesign


Ignore:
Timestamp:
Oct 6, 2005, 5:43:21 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/OTG/ArchitectureDesign

    v5 v6  
    2828The OTG and OTR program are implemented in the user space. To support point-to-multipoint communication, each port in OTG could associate more than one stream object. Based on different source and destinations, packets are classified to several streams. A port in OTG could deliver several streams to different OTR program through a common UDP or TCP port. Also, the OTR could receive several streams from different OTG program.
    2929To let the receiver software OTR have the capability to extract PHY measurements from the driver, we need a custom driver which is compatible with LibMac library.
    30 The abovementioned architecture allows us to extend the OTG-OTR application to support multiple sending streams and multiple receiving applications. However, the baseline requirement for the OTG/OTR design is the very simple one-sender-one-receive point-to-point communication. Therefore, the baseline application will only include a communication path and components in the shaded region. And this case will also satisfy the test and measurement demands of most users.
     30The above mentioned architecture allows us to extend the OTG-OTR application to support multiple sending streams and multiple receiving applications. However, the baseline requirement for the OTG/OTR design is the very simple one-sender-one-receive point-to-point communication. Therefore, the baseline application will only include a communication path and components in the shaded region. And this case will also satisfy the test and measurement demands of most users.
    3131
    3232'''Note that in OTG and OTR, "Stream" and "Gate" are master components respectively. They control the sending and receiving thread respectively.There also exists an OMLObject pointer in Gate and Stream to enable control of OML measurements reporting.'''
     
    4343=== Design of OTR ===
    4444
    45 The OTR is a multi-thread application too. The main thread is to handle user input. And for each Gate object, a separate thread is going to create to receive packets from this gate. Each Gate object is the master object to control other objects in the OTR program Whenever an OTR application is started, at least one Gate has to be started as default. However, a gate is not limited to receiving homogenous packets from the same source.  If multiple sources or connections are communicating with one socket port, the Gate will de-multiplex the traffic and give each packet a flow identifier to show its source address. However, all packets are still passed to the same Sink object.
     45The OTR is a multi-thread application too. The main thread is to handle user input. And for each Gate object, a separate thread is going to create to receive packets from this gate. Each Gate object is the master object to control other objects in the OTR program Whenever an OTR application is started, at least one Gate has to be started as default. However, a gate is not limited to receiving homogeneous packets from the same source.  If multiple sources or connections are communicating with one socket port, the Gate will demultiplex the traffic and give each packet a flow identifier to show its source address. However, all packets are still passed to the same Sink object.
    4646When an OTR application is started, a default gate will be created.  A default sink object is also created to bind to this gate. In the case of UDP, whenever a packet from a new address, it will generate a new flow for all packets from this address. In the case of TCP, whenever accept a new connection; a new flow is created to accommodate the packets in this direction.
    4747Note that this architecture design allows one OTG Application having multiple Gates.  ''But in practice, the user is now limited to start only one Gate with one OTR application.''
     
    7272The demultiplex part of UDP Gate and TCP Gate is slightly different:
    7373 * UDP Socket create a new flow based on the received packet's source address if necessary. therefore, we use simple consecutive numerical numbers as flow id.
    74  * TCP Socket would create a new flow when acceptNewConnnection() funciton is called. This occured before a single TCP packet is receivd. We use socket file descriptor as flow id.
     74 * TCP Socket would create a new flow when acceptNewConnnection() function is called. This occurred before a single TCP packet is received. We use socket file descriptor as flow id.
    7575[[BR]]
    7676''Note: We did not support demultiplexing for raw sockets now''
     
    7979Each gate holds a flow table to record the demultiplex information. It says which packet is from which source IP and port.
    8080Unlike previous design, the packet is no longer passed to the flow object, but from gate to sink directly.
    81 Flow table is just an index table to checking the packet's srouce information and set the "flow id" measurement for theis packet.
     81Flow table is just an index table to checking the packet's srouce information and set the "flow id" measurement for this packet.
    8282The information in the table should include:
    8383 * flow identifier
    8484 * sender IP address
    8585 * sender port (if applicable)
    86  * sneder MAC address (if applicable)
     86 * sender MAC address (if applicable)
    8787=== Sink ===
    8888Sink is dummy. Just dump every received packets to nowhere.
     
    9696=== Command-line Input to start the program ===
    9797
    98 The basic format for user to specify  an option is “--option [arg]” format. Because we have multiple kind of protocols and generators to support, the commands to configure the OTG program and OTR program need to first figure out those type information. After that, further commad-line optons about that specific generator and protocol-port could be parsed further. However, the user only need to give all options in one command line. The program will automatically parse them in this 2-tier manner.
     98The basic format for user to specify  an option is “--option [arg]” format. Because we have multiple kind of protocols and generators to support, the commands to configure the OTG program and OTR program need to first figure out those type information. After that, further command-line options about that specific generator and protocol-port could be parsed further. However, the user only need to give all options in one command line. The program will automatically parse them in this 2-tier manner.
    9999
    100100==== Select Protocol and Generator Type ====
    101 The “parseOptionsPhase1” functon in the main program (otg.cpp & otr.cpp) is in charge of parsing the necessary protocol and generator types. After parsing that, a specific generator and port will be created.
     101The “parseOptionsPhase1” function in the main program (otg.cpp & otr.cpp) is in charge of parsing the necessary protocol and generator types. After parsing that, a specific generator and port will be created.
    102102====    Get 2nd Tier Option ====
    103 The “parseOptionsPhase2” functon in the main program (otg.cpp & otr.cpp) is in charge of getting and parsing the protocol and generator optons.
     103The “parseOptionsPhase2” function in the main program (otg.cpp & otr.cpp) is in charge of getting and parsing the protocol and generator options.
    104104
    105105=== Run-time Commands ===
    106106==== Program Termination ====
    107 The OTG and OTR program is not controlled by pre-defined test duration. Instead, it has to be terminated by the “exit” command.  As long as the command is not given, the OTG will keep pumping traffic and OTR program will keep receiveing incoming packets.
     107The OTG and OTR program is not controlled by pre-defined test duration. Instead, it has to be terminated by the “exit” command.  As long as the command is not given, the OTG will keep pumping traffic and OTR program will keep receiving incoming packets.
    108108
    109109==== Pause & Resume ====
     
    114114
    115115== Measurements ==
    116 Measurement are generated within the OTG and OTR software and reported to a library server in ORBIT testbed throughput the “OML” architecture. In brief, the measurements are collected by each OML client in every running node and sent to a collection server. If an application wants to use OML, the application has to first call a “init_oml” function. Then add different measurement-points in the application where a measurement is triggered, anther OML function has to be called. Finally, those measuremts will appear as records in an OML databases.
     116Measurement are generated within the OTG and OTR software and reported to a library server in ORBIT testbed throughput the “OML” architecture. In brief, the measurements are collected by each OML client in every running node and sent to a collection server. If an application wants to use OML, the application has to first call a “init_oml” function. Then add different measurement-points in the application where a measurement is triggered, anther OML function has to be called. Finally, those measurements will appear as records in an OML databases.
    117117
    118118=== Per-Packet Measurement ===
     
    125125
    126126 === Per-Stream Measurement  ===
    127 For each stream generated by OTG, a stream id and  pkt number is stamped in the payload of the packet. And those information could be retrieved by OTR. Also, the OTR could demultoplex all receiving pakets  and put them in different flows. So, there are 4 measurements corresponding to this:
     127For each stream generated by OTG, a stream id and  pkt number is stamped in the payload of the packet. And those information could be retrieved by OTR. Also, the OTR could demultiplex all receiving packets  and put them in different flows. So, there are 4 measurements corresponding to this:
    128128 * packet sequence number from sender side
    129129 * Flow id from receiver side
     
    131131=== Physical layer measurements ===
    132132With the help of LibMAC, two physical layer parameters could be extracted from a custom driver:
    133  * '''RSSI''': Received  Singal Streangth Index
     133 * '''RSSI''': Received  Signal Strength Index
    134134 * TxRate: Xmit rate indicated in the Signal Field of PLCP header of received packet. for example 55 indicates 5.5Mbps, 540 indicates 54Mbps.
    135135=== Measurement Reporting Triggers ===
     
    139139 * gen_timestamp
    140140 * tx_timestamp
    141 In OTR, measurements will report by the Gate object whenever a packet is processed. Six measuremts are triggered:
     141In OTR, measurements will report by the Gate object whenever a packet is processed. Six measurements are triggered:
    142142 * pkt_seqno (stamped in sender side)
    143143 * flow_no:id of the flow
     
    153153== Fault Management and Exception Handling ==
    154154
    155 Basically, information of every critical exception is put into ''stdout'' if the program is going to abort.  The information is outputed by an "throw" operation. and the main program will eventually output it in STDOUT. However, it seems only the function in the first-tier of main program could throw it correctly and the main program will output it into STDOUT, for those functions referred deeper, we see
     155Basically, information of every critical exception is put into ''stdout'' if the program is going to abort.  The information is output by an "throw" operation. and the main program will eventually output it in STDOUT. However, it seems only the function in the first-tier of main program could throw it correctly and the main program will output it into STDOUT, for those functions referred deeper, we see
    156156{{{
    157157terminate called after throwing an instance of 'char const*'