Pulsarcast: Scalable, Reliable Pub-Sub over P2P Nets

Pulsarcast: Scalable, Reliable Pub-Sub over P2P Nets

Abstract—The publish-subscribe paradigm is a wildly popular form of communication in complex distributed systems. The properties offered by it make it an ideal solution for a multitude of applications, ranging from social media to content streaming and stock exchange platforms. Consequently, a lot of research exists around it, with solutions ranging from centralised message brokers, to fully decentralised scenarios (peer to peer). Within the pub-sub realm not every solution is the same of course and trade-offs are commonly made between the ability to distribute content as fast as possible or having the assurance that all the members of the network will receive the content they have subscribed to. Delivery guarantees are common within the area of centralised pub-sub solutions, however, there is a clear lack of decentralised systems accounting for this. We present Pulsarcast, a decentralised, highly scalable, pub-sub, topic-based system seeking to give guarantees that are traditionally associated with a centralised architecture, such as persistence and eventual delivery guarantees.

I. INTRODUCTION

The publish-subscribe (pub-sub) interaction paradigm is an approach that has received an increasing amount of attention throughout the century. This is mainly due to its unique properties, that allow for full decoupling of time, space, and synchronisation of all the communicating parties. Subscribers (or consumers) sign up for events, or classes of events, from publishers (or producers) that are subsequently asynchronously delivered. Taking a closer look at this definition shows that this comes hand in hand with the way information is consumed nowadays, with the exponential growth of social networks like Twitter and the usage of feeds such as RSS. Many applications rely on the publish-subscribe paradigm.

As we cover in the next sections, lots of different solutions exist. However, most rely on centralised or hierarchic networks to have a reliable system, with stronger delivery and persistence guarantees or sacrifice these properties to have a decentralised system that can scale to a much larger network. We intend to address this in Pulsarcast by focusing on the following properties:

This document is structured as follows: Section II presents and analyses our related work. Section III introduces and describes Pulsarcast, its architecture, data structures, algorithms as well as the implementation of our solution. Next, Section IV explains our evaluation methodology. Finally, Section V provides closing remarks.

II. RELATED WORK

The subscription models are tied to the expressiveness of the system as a whole. A content-based subscription model allows for more expressiveness in subscription definition but complicates message filtering scalability. Another critical design dimension is how peers organise and maintain their view of the underlying network (network overlays). These overlays can be structured (using DHTs, for example) or unstructured, relying on gossip protocols.

While there are many examples of pub-sub systems, we briefly highlight a few:

Our work aims to apply the findings from these systems while introducing novel mechanisms in Pulsarcast.

III. PULSARCAST

Pulsarcast is a peer-to-peer, pub-sub, topic-based system focused on reliability, eventual delivery guarantees, and data persistence. It relies on a straightforward topic-based subscription model, enabling nodes to:

Pulsarcast employs two types of overlays: Kademlia DHT for peer and content discovery, and per-topic dissemination trees for event forwarding. This architecture ensures data persistence and retrieval. Here’s a brief look at the data structures:

A. Data Structures

Pulsarcast has two fundamental data structures: event and topic descriptors, which are immutable and linked in a Directed Acyclic Graph (Merkle DAG), ensuring verifiability and integrity.

B. Subscription Management

The creation of a new subscription begins with the existence of a topic. A node creates a meta topic descriptor that facilitates the dissemination of changes. Example procedures include creating the topic and managing its subscriber relationships.

C. Event Dissemination

Events can be configured at the topic level, allowing for enhanced control over how they are disseminated. Nodes can specify which nodes can publish and request to publish.

D. Implementation Details

The Pulsarcast module is implemented in Javascript, allowing it to run across diverse systems and ensuring integration with the libp2p ecosystem to handle peer discovery, networking, and content routing.

IV. EVALUATION METHODOLOGY

We built a testbed using Docker, Kubernetes, and an Elastic stack to gather results. We employed a dataset of Reddit comments to simulate real-life scenarios, measuring subscription fulfilment and message dissemination metrics.

V. CONCLUSION

We introduced Pulsarcast, a decentralised, topic-based pub-sub solution aiming to bring reliability and eventual delivery guarantees to the P2P realm, leveraging a Kademlia structured overlay and providing a superior QoS with lesser resource usage compared to existing solutions.

REFERENCES

  1. Matching events in a content-based subscription system - PODC ’99.
  2. SELECT: A distributed publish/subscribe notification system - IEEE 32nd International Parallel and Distributed Processing Symposium.
  3. TERA - Inaugural international conference on Distributed event-based systems.
  4. Mercury: a scalable publish-subscribe system for internet games - NetGames ’02.
  5. Design and evaluation of a wide-area event notification service - OASIS 2003.

And others as listed in the original document.