Overview

Dependencies

  1. twisted
  2. numpy
  3. sqlalchemy
  4. pyyaml
  5. tiger
  6. ringbuffer
  7. udt4twisted

Note: Install them with: sudo pip install <pkg name>

Receive stream

  1. Start an instance of p2plive by typing:

    twistd -l 2p.log --pidfile 2p -r udtepoll p2plive -s p2plive/settings1

    This will be our broadcast(the peer node which produces the information in a channel). p2plive/settings has some example settings which can be tuned depending on the demands of the channel. Do note that everyone involved in the channel must have similar configuration. [NODE1]

  2. Start a peer node that will be interested in the information that bc delivers

    twistd -l 1p.log --pidfile 1p -r udtepoll p2plive -s p2plive/settings

    [NODE0]

  3. Now that we have run the two peer nodes we should run some of the services they provide according to what we want from them. In p2plive there is no fixed roles on an implementation level. Everything related to that is done by the "governor". It is a client that "speaks" the Temerity protocol and controls the actions of the peer.

    cat func_test/node0_client | nc localhost -q 1 33440

    This will tell NODE0 that we want him to actively be in the designated channel and let him know about the other peer by giving the NODE1 address. The last step is that we want a producer server on port 9001, so we can get the received information from there.

    cat func_test/node1_client | nc localhost -q 2 33441

    NODE1 will start spreading too. Then feed the candy pool with a file and start a consumer server on port 10000.

  4. Run(It will establish a connection between NODE0 and NODE1):

    cat func_test/node0_behaviour | nc localhost -q 2 7000

  5. Now is the time to run the behaviours/governors for the two nodes. Open two new tabs and type respectively:

    ./func_test/behaviour_server.py

    ./func_test/behaviour_client.py

    These are ofcourse used only for example and do not in any way represent a real governor.

  6. Finally you can now send data on port 10000 and receive data on port 9001(with netcat for example).

Note

For now send streams that DO NOT contain x00(due to limitation of numpy)

Note

If you don't want to go through these steps run ./funt_test/init_transfer

Other

  1. Run tests(while in root dir): trial tests/
  2. Look at the examples in func_test/