Skip to content
This repository has been archived by the owner on Nov 26, 2019. It is now read-only.

Open Problem: PubSub at Scale (1M, 10M, 100M, 1B.. nodes) #5

Merged
merged 16 commits into from
Nov 3, 2019

Conversation

daviddias
Copy link
Member

No description provided.

@daviddias
Copy link
Member Author

@yiannisbot yiannisbot marked this pull request as ready for review September 23, 2019 01:23
First stab at Pubsub at scale. Will follow up with a few updates and references to related literature very shortly.
@yiannisbot yiannisbot requested a review from vyzo October 1, 2019 13:06
@yiannisbot
Copy link
Contributor

@daviddias @vyzo : It would be great to get some thoughts and a review of this Open Problem on PubSub.

Copy link
Member Author

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this update @yiannisbot! It is has a lot more shape now.

Overall I believe it needs:

  • More concrete pointers to what is possible in the IPFS/libp2p ecosystem with details of what it actually does (rather than highlighting what is possible on the whole field)
  • Highlight examples of use cases with some numbers for benchmarking (so that people understand the "scale" that we are talking about)

OPEN_PROBLEMS/PUBSUB_AT_SCALE.md Show resolved Hide resolved
OPEN_PROBLEMS/PUBSUB_AT_SCALE.md Show resolved Hide resolved

<strong> Gossip Protocols </strong>

Gossipsub is a gossip-based pubsub system developed within libp2p. Gossipsub borrows concepts from related literature (see list below) and blends them together to produce an efficient pubsub protocol. Traditionally, the concept behind gossiping is to address the issue of load-balancing between all nodes forwarding messages in the system. According to gossiping, once a node receives a message, it does not broadcast the message directly to all nodes subscribed to some topic, but instead it is choosing a fraction of nodes (we can use *t* to denote the number of nodes chosen) to distribute the message. In turn, those *t* nodes are choosing a further *t* nodes to distribute the message further. Clearly, receiving the message more than once is perfectly possible in gossiping systems. If a node receives a message twice, it discards the second (and any subsequent) message it receives.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explanation needs to have a greater focus on what libp2p-gossipsub today is rather than the general case of gossiping in the literature

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, done.

OPEN_PROBLEMS/PUBSUB_AT_SCALE.md Show resolved Hide resolved

##### peer-base collaboration messaging protocol (Dias Peer Set)

- https://github.com/peer-base/peer-base/blob/master/docs/PROTOCOL.md#peer-base---protocol-explanation
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs quick explanation (1 paragraph)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a well-known protocol? Or is it/has it been used in libp2p? I can't see anything special about it and the RFP is getting long..


- We've collected a vast amount of Research Material around PubSub. It can be found at https://github.com/libp2p/research-pubsub

Related literature in the broader research community has worked towards two incarnations of pubsub systems: i) content-based pubsub and ii) topic-based pubsub.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more, for example type, concept and also the topic base can be expanded to tag base.

Here is a quick list of many of the systems I compiled earlier:

Subject/Topic/Tag based - Lists of subscribers per subject/topic/tag

  • IP Multicast
  • BMTP
  • SRM Framework
  • Scribe (on top of Pastry)
  • Bayeux
  • Rappel
  • Tera
  • SpiderCast

Content Based Subscriptions (apply filters/matching to forward messages)

  • Pragmatic General Multicast
  • Elvin
  • SIENA
  • Provides a Scalable and efficient pubsub - G. Banavar, T. Chandra, B. Mukherjee, J. Nagarajarao, R. E. Strom, and D. C. Sturman, “An efficient multicast protocol for content-based publish-subscribe systems,” presented at the Proceedings. 19th IEEE International Conference on Distributed Computing Systems, 1999, pp. 262–272.
  • Gryphon
  • JEDI
  • Hermes
  • Rebecca
  • Meghdoot
  • PHT
  • O-P DHT
  • PastryStrings
  • Sub-2-Sub

Type based- middle ground approach between the two above

Concept/Semantics based - XML and semantic stuff everywhere and on the fly, more flexible but also more complex

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included mention of most of these. Can add some survey papers.


### Known shortcommins of existing solutions
> What are the limitations on those solutions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The known shortcomings is currently empty.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One that should be highlighted is that almost no PubSub literature covers Tree Forming, they all mostly assume that the number of peers is consistent (no churn) and that they can dictate the spanning tree to their own design at any moment in time (without contemplating the challenges with having an accurate perspective of the network).

It would be valuable to highlight some papers that focus on efficient routing at the underlay level (i.e. OSPF, RIP, etc) to contrast and take inspiration from.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One that should be highlighted is that almost no PubSub literature covers Tree Forming, they all mostly assume that the number of peers is consistent (no churn) and that they can dictate the spanning tree to their own design at any moment in time (without contemplating the challenges with having an accurate perspective of the network).

To my knowledge, this is mostly true for structured, managed and mostly cloud-based pub/sub systems. Some of this has now been discussed together with the differences to unstructured systems.

It would be valuable to highlight some papers that focus on efficient routing at the underlay level (i.e. OSPF, RIP, etc) to contrast and take inspiration from.

I didn't do that at this point. I don't have a clear view of how to link between routing in the underlay and overlay. E.g., run dijkstra on the overlay? Or take routing input from underlay protocols and optimise overlay routes?

- Social Network
- Chat
- Newschannel
- Video Broadcast
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be expanded to inspire the reader to think about the scales that we are thinking about.

OPEN_PROBLEMS/PUBSUB_AT_SCALE.md Outdated Show resolved Hide resolved
@daviddias
Copy link
Member Author

@JGAntunes This is Open Problem is at the core of your research -- ipfs/notes#266 --, would love your review and suggestions in what to include, specially all your insights from your recent literature review :)

@daviddias
Copy link
Member Author

Following -- #5 (comment)

@JGAntunes created a really nice table with a summary eval of multiple systems
image

@daviddias
Copy link
Member Author

To clarify: I do not expect us to do a complete multi decade literature review in order to publish the first version of the open problem (we can always augment latter), however, it is important that we at least ship with a good representation of the multiple lines of work and don't focus too much in one.


## Long Description

Pubsub systems are a subgroup of broadcast trees, according to which, once messages are published, they are broadcast to all nodes in the tree. Although broadcast can ensure timely delivery of messages to all receipients, it causes severe stress to the system in terms of bandwidth needed to deliver the messages.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are not necessarily trees!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why I mentioned they are a "subgroup" :) but I rephrased in the new version. Thanks!

OPEN_PROBLEMS/PUBSUB_AT_SCALE.md Outdated Show resolved Hide resolved
OPEN_PROBLEMS/PUBSUB_AT_SCALE.md Show resolved Hide resolved
- Julien Gascon-Samson, Franz-Philippe Garcia, Bettina Kemme, Jörg Kienzle, Dynamoth: A Scalable Pub/Sub Middleware for Latency-Constrained Applications in the Cloud, IEEE ICDCS 2015


### Known shortcommins of existing solutions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

er, you probably mean _shortcomings`.

@daviddias
Copy link
Member Author

@yiannisbot let me know when you want a review again, I can put it on my todo for tomorrow :)

Copy link
Contributor

@yiannisbot yiannisbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarifications on comments and how they were addressed.

@yiannisbot
Copy link
Contributor

@daviddias: This is now just out of the oven. Much more mature than before. Please have a look in case you spot something that needs attention, otherwise we can finalise.

Copy link
Contributor

@yiannisbot yiannisbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment responses. I didn't add the table referenced above, but we can do in the final RFP form/document.

Copy link
Member Author

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thank you @yiannisbot !

@daviddias daviddias merged commit 44066b1 into master Nov 3, 2019
@daviddias daviddias deleted the pubsub-scale branch November 3, 2019 09:37
@blaggacao blaggacao mentioned this pull request May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants