The maintenance, scaling and optimising strategies are wildly different for Code and Data. This is the key insight of Data Oriented Design.
If we were to use Objects, this translates to having software composed of the following types of Objects.
A Manager Object composes other Systems and Domain objects.
A Manager handles,
- Save / Restore
A Domain Object composes Data and Relationships as Objects like,
- Meta Data
- Event Sourcing
- Storage and Caching
A System handles all other Roles and Responsibilities. Systems react to events or run continuously.
Systems work with Domains with the help of Cursors. The concept of using Cursors is popular in React’s Flux Based Architecture as well.
Systems interact with Managers via Channels.
With each other they interact via
- Extraction, Transformation
- Platform Wrappers
- Commands and Queries
- Validation and Invalidation
- Display, Sound
- Networked and Scheduled Services
- State Machine
- Sorting and Learning