Ticket #15 (new task)
Opened 1 year ago
Wrapper code
| Reported by: | jordi | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | oncoming |
| Component: | planetsim | Version: | PlanetSim 3 |
| Keywords: | experimental, wrapper | Cc: |
Description
Design and develop the wrapper code to enable also experimental setup and executions (TCP/UDP). Generally speaking, it will need to revise all the process of building instances (related factories, specific instances, etc) in order to ensure that an experimental setup can run. But, this task can be performed in different ways. We show two examples, but detailing one of them.
Various nodes per port
An approach of doing it, is building a block (meta-node?) where will be able to co-live different overlay nodes (e.g. various Chord nodes). It is very flexible and will reuse the same (TCP/UDP) port for all the overlay nodes. But, specifying another listening port, it is easy to build another block.
Communication
Receiving RouteMessages?. This block will have as many RouteMessage? queues as Node it supports, and will be listening on a certain UDP/TCP port. On basis on the nexthop NodeHandle, it must be very easy to enqueue every RouteMessage? on the respective queue.
Sending RouteMessages?. Periodically or at every RouteMessage? that a Node want to send, this block will send it (them) to the respective hosts.
Node process
As the current NetworkImpl?.java class does, every Node needs to be processed periodically. The block can become as simple processor that periodically process every node it allocates.
The block itself
Threads. Depending on the whole design, it will make vary the number of threads the block must allocate (listening on the TCP/UDP port, etc).
Queues. Some work in this line has been done in planet.generic.commonapi.NetworkNodeImpl?.java (take it as a reference). The basic idea behind this is that the Node must be able to send and receive RouteMessages? (so, incoming and outgoing queues must appear wherever were needed: on the Node part or in the block).
NodeHandles?
It is supposed that it would be necessary a new NodeHandle implementation (e.g. planet.generic.commonapi.NodeHandleExperimental?.java), adding extra information, like IP and port. Surely, these two items will be set in the moment of NodeHandle construction (so, the NodeHandleFactory? would need to be modified to this respect).
Node per port
Another possibility is to always build another node listening on a different port.
