Skip to content

grrtrr/magicbus

Repository files navigation

MagicBus

Every day I get in the queue -- The Who, Magic Bus

1. What it is

MagicBus is a local command/event bus, which can be extended to a distributed messaging system by inter-connecting remote buses.

The idea is that Aggregates (Domain Driven Design term for subsystem) can simply "plug in" and have their events and commands delivered them in serialized fashion.

The bus solves the problem of handling concurrency in a concurrent, asynchronous messaging system.

This occurs in situations where Aggregates have to be able respond to multiple concurrent events or commands.

The concurrency handling is employs the Actor Model, which is an evolving Go pattern. The bus itself is an Actor, as is every Aggregate that plugs into the bus.

The bus also implements Command Query Response Segregation:

  • commands/events are handled by the Aggregate directly,
  • queries (read model) have to be submitted to a repository,
  • Aggregate and Repository share no code or data; the only way the Repository can be updated is via events sent from the Aggregate.

2. Implementation status

The bus itself is ready to use - see the test code. For integration, you probably need to fork and customize the generic sketches in the code to your specific needs.

Magic Bus

Releases

No releases published

Packages

No packages published

Languages