Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolderCast Layers Not Communicating #16

Open
michaeljfazio opened this issue Feb 6, 2020 · 5 comments
Open

PolderCast Layers Not Communicating #16

michaeljfazio opened this issue Feb 6, 2020 · 5 comments

Comments

@michaeljfazio
Copy link
Contributor

michaeljfazio commented Feb 6, 2020

As per the PolderCast paper. Each layer (Cyclon, Rings, Vicinity) are meant to communicate with one another. Each layer should be acting as a filter on the next. The current implementation has each layer acting independently, sourcing nodes from the available set, rather than for the set filtered by the layer below it. Furthermore, where applicable, layers should producing and maintaining node profile sets per-topic.

@NicolasDP
Copy link
Contributor

They are working independently as per the paper. They are not meant to filter nodes for each others.

@michaeljfazio
Copy link
Contributor Author

From section 5

The Vicinity module is responsible for feeding the Rings module with a
few neighbors for each topic t ∈ Tp, of arbitrary ids

I believe the paper specifies that the layers are to operate in parallel when sourcing gossips, but it looks to me that they are still meant to be communicating.

Screen Shot 2020-02-07 at 12 30 41 am

@NicolasDP
Copy link
Contributor

NicolasDP commented Feb 6, 2020

And following the same quote, for Cylon, they also say for the whole network:

Finally, the Cyclon module [24], is a lightweight peer sampling service [12], providing each node with a continuous stream of neighbors chosen uniformly at random from the whole network.

If we were to follow the paper by the letter we would have a headache 😄 and nothing would be done. In the rings, the neighbours for the rings are selected per topic too (the TopicView contains the neighbour nodes):

neighbors: BTreeMap<Topic, TopicView>,

While this might not be perfect this is as good as we can do whilst still allowing us to have a nice separation of concerns and allowing adding more (or less) modules for the topology.

@michaeljfazio
Copy link
Contributor Author

I agree there are some ambiguities in that paper. But, taking the whole thing in context I have to stand by my original assessment with there definitely being communication between those layers.

I looked to the Haskell code for guidance... But they seem to be doing something that isn't PolderCast at all...

@NicolasDP
Copy link
Contributor

The fact that the layers are not communicating is a design decision that we made in order to facilitate adding more layers and working the layers in isolation.

That being said, this was not done without consideration of pros and cons. I believe this is not only more efficient (at least since 0.12 and the introduction of a max capacity of the peer collection driven by a LRU cache), it is also more convenient and offers the different module a broader choice. Also, rings is still using a similar algorithm to Vicinity in selecting the candidates for its view (filtering the subscriptions in common, giving more or less the same results as vicinity in few topic settings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants