How aniruddha96/toymb works
Main Components
a) Client Layer:
• Java Driver component (ToyMB-client)
• Two client interfaces:
• Publisher (ToyMBTemplate)
• Subscriber (with @Subscribe annotation)
b) Broker Cluster:
• Multiple ToyMB nodes
• Rendezvous routing mechanism
• Topic ownership distribution
• Partition management
c) Storage Layer:
• SQL Database (supports MySQL, H2)
• Key entities (Topics, Groups, Messages, Subscribers, Nodes)
d) Message Processing Pipeline:
• Message enrichment system
• Partition assignment
• Message routing
Relationships and Interactions
• Publisher → Broker → Subscribers
• Topic creation flow
• Subscriber registration flow
• Inter-node communication
• Enrichment pipeline
Specific Elements
a) Node Components:
┌─ ToyMB Node ─────────────────┐
• ┌─ Controllers ─┐ ┌─ Workers ┐│
• Message │ │- Message ││
• Subscriber │ │ Notifier ││
• Topic │ └─────────┘││
• ┘ ││
• ┌─ Enrichment ┐ ││
• Enrichers │ ││
• Topics │ ││
• ┘ ││
• ┘
b) Client Integration:
┌─ Client Application ──────┐
• ┌─ ToyMB Client ────────┐ │
• @Subscribe │ │
• ToyMBTemplate │ │
• Message Handlers │ │
• ┘ │
• ┘
Important Architectural Patterns to Highlight
a) Publisher-Subscriber Pattern:
• Topic partitioning
• -based subscription
• Push/Pull interfaces
b) Distributed System Patterns:
• Rendezvous routing
• Partition distribution
• Cluster communication
Technical Details
a) Protocol Information:
• HTTP-based communication
• REST endpoints
b) Storage Details:
• Entity relationships
• Partition management
c) Configuration Elements:
• Node properties
• Topic configurations
• Cluster setup
The storage and persistence model
Remember to maintain clarity while showing the complexity of the system, using appropriate abstraction levels for different components while ensuring that critical architectural decisions are visible.