any idea about latency calculation ?

Home Forums PeerfactSim Forum any idea about latency calculation ?

This topic contains 4 replies, has 1 voice, and was last updated by  Mostafa 3 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #907

    Mostafa

    Hello,

    I’m trying to calculate latency between two peers, in the
    LookUpOperation, (masterNode and one of it’s fingers)
    Any ideas how can I implement this ?

    Thanks alot

    #908

    Kalman

    There are several approaches:
    Valid approach:
    You could send a message similar to a PING and remember the timestamp
    when it was sent. The contacted node should answer to the PING
    directly. As a third step, the PING generating peer receives the PONG
    message and compares the current timestamp with the timestamp of PING
    generation, thus it obtains the round trip time. The one way latency
    is in average half of it.

    Dirty trick:
    If you are using GNP as the network layer, you could simply look up
    locally the expected delay between those two nodes. GNP is organized
    in a way, that a virtual coordinate space is established in which the
    distances resemble the latency distance. Please refer to the
    documentation of GNP with regard to which methods to call.

    #909

    Mostafa

    I tried the dirty trick couple of days ago, but the getLatency
    function of GNP requires NetLayers of nodes as parameters, which could
    be provided for masterNode, but not for finger because finger was
    AbstractChordContact.
    Is there any hint such that I would be able to get NetLayer of
    contacts ?

    I will also work on the valid approach.

    Thanks for your help.

    #910

    Matthias Feldotto

    For the analysing you can also take use of the GlobalOracle. It is not
    for productive things, but only for analyzing. There you can get a list
    of all hosts in the network and get all components of them, also the
    NetLayer. With the Oracle and the ChordContact you can get the NetLayer
    for the specific node.

    #911

    Mostafa

    Thanks alot for your help. I could work it out.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Comments are closed