Reactive BBQ Domain¶
Everything in RIDDL revolves around creating domains and subdomains. These are logical groupings of definitions that belong together, presumably because they mimic an organization's structure or some other logical, real world groupings. Domains can be nested.
Domain Structure¶
At the top level of definition, a single
domain
named ReactiveBBQ represents the entire enterprise:
domain ReactiveBBQ is {
include "restaurant/domain"
include "backoffice/domain"
include "corporate/domain"
}
The details of the top level domain are abstracted away via three
include
statements within its body, one for each of the subdomains:
- Restaurant - Core restaurant operations
- Back Office - Administrative and management functions
- Corporate - Corporate headquarters operations
Why Subdomains?¶
Separating the business into distinct subdomains provides several benefits:
- Bounded Contexts - Each subdomain can define its own ubiquitous language without ambiguity
- Team Alignment - Development teams can own specific subdomains
- Independent Evolution - Subdomains can be modified without affecting others
- Scalability - Different subdomains can be deployed and scaled independently
Cross-Domain Communication¶
The subdomains communicate through well-defined interfaces. For example:
- Restaurant → Corporate: Sales reports, inventory requests
- Corporate → Restaurant: Menu updates, policy changes
- BackOffice → Restaurant: Staff schedules, equipment maintenance
These communication patterns are modeled using RIDDL's adaptor and connector constructs.
Source Code¶
The complete RIDDL specification for Reactive BBQ is available in the riddl-examples repository.