Data Oriented Design

by moodyharsh 2016-08-31
data-oriented-design
Data Oriented Design has been successfully applied in Games in the form of Entity Component System. I think it can be applied to Business Software as well.

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.

  1. Manager
  2. Domain
  3. System

Manager

A Manager Object composes other Systems and Domain objects.

A Manager handles,

  1. Routing
  2. Startup
  3. Shutdown
  4. Scheduling
  5. Synchronisation
  6. Communication
  7. Save / Restore
  8. Authentication
  9. Authorisation
  10. Loading

Domain

A Domain Object composes Data and Relationships as Objects like,

  1. Entities
  2. Meta Data
  3. Relationships
  4. Records
  5. Transactions
  6. Resources
  7. Aggregates
  8. Event Sourcing
  9. Storage and Caching
  10. Logging

System

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

  1. Delegates
  2. Collaboration

Systems do

  1. Computation
  2. Extraction, Transformation
  3. Analysis
  4. Decisions
  5. Platform Wrappers
  6. Commands and Queries
  7. Parsing
  8. Serialisation
  9. Validation and Invalidation
  10. Display, Sound
  11. Networked and Scheduled Services
  12. Utilities
  13. State Machine
  14. Sorting and Learning