Skip to content

Implement a PSS

Jocelyn Thode edited this page Jul 14, 2016 · 8 revisions

To implement a PSS we need to modify EpTO after having modified NeeM.

We need to modify :

  • App so that it uses the new MulticastChannel
  • Overlay

We should probably take into account the age of peers in our view.

Overlay

We need to use the MulticastChannel connect() to create connections. This way we start the PSS.

handleShuffle and shuffle are the two main methods to be modified.

  • handleShuffle() : Used when we receive possible new peers to update our random view
  • shuffle() : Used when we want to send a part of our view to a peer

purgeConnections() trims the connections to be equal to the fanout. (Do we need to call it or is it done automatically ?)

handleShuffle() :

The bytebuffer[] passed should contain the map of new peers (their address so that we can create new connections)

shuffle()

It should select a partner randomly, then select the number of peers we need and send them to the partner chosen (and increment the age)

HandleId + HandleJoin

handleId seems to be here to populate the peers array and sends its port when joining, handleJoin seems to relay the message received to peers he knows as a shuffle so that these peers contact the peer wanting to join.

peers in Overlay

When we use connect they are automatically added to peers in overlay