CIP: 3 Title: Yapper: Event-Driven Message Broker Author: Ng Jun Siang Status: Active Created: 07-May-2025

The problem of communication scaling

With a microservice architecture and an unknown number of first-party clients, Campus faces a communication scaling problem:

  • each client potentially modifies data,

  • which other clients want to know about,

  • and will attempt to find out by polling the microservice.

In the worst case, the clients (e.g., discord bots) are also data sources, leading to O(n²) increase in inter-client communication.

In the best case, clients are purely data consumers and microservices are data providers, with clients continually polling the microservices. The total polling frequency sees an O(n) increase in client-microservice communication.

Yapper: Event-Driven Message Broker

To avoid the need for continual polling, events are used as a trigger to perform any relevant actions, such as polling for updated data.

Applications that emit events are known as publishers, while applications that listen for events are known as subscribers.

Campus will use an event-driven architecture for microservices and first-party clients:

  • microservices are purely publishers, emitting events for data changes,

  • clients can be publishers and subscribers, emitting events and listening for them.