Design Principles
At the heart of Cyoda lies the Entity Database Management System (EDBMS), a system built around the idea that every piece of persisted data is an Entity. These entities function as finite state machines governed by workflows, forming the foundation of every Cyoda application.
What Is an Entity?
Section titled âWhat Is an Entity?âAn Entity in Cyoda represents a real-world object with state that evolves over timeâa customer, an order, a message. It is the central unit of modeling, interaction, and persistence.
Core properties of entities:
- Persistent: Entities have lifecycles beyond transient operations.
- Stateful: They progress through well-defined states.
- Contextual: Their current state encodes meaningful operational context.
Cyoda frames every challenge as an entity-centric problem. The systemâs responsibility is to create, observe, evolve, and act upon entities.
Entities: The Backbone of Cyoda
Section titled âEntities: The Backbone of CyodaâCyoda is more than a data platform. It is a processing platform that unifies:
- Data: structured facts
- State: current position in a lifecycle
- Behavior: rules and transformations that govern change
This unification offers:
- Decoupling: Business logic remains local to the entity
- Composability: Entities reference and react to one another
- Auditability: Every state change is logged and inspectable
What Is a Workflow?
Section titled âWhat Is a Workflow?âA Workflow models the behavior of an entity as a finite-state machine (FSM). It specifies:
- States: possible conditions of the entity
- Transitions: permitted changes between states
- Triggers and Processes: events and logic tied to transitions
Workflows encode business logic in a visual, structured, and deterministic way.
Event-Driven Architecture in Cyoda
Section titled âEvent-Driven Architecture in CyodaâCyoda applications respond to events:
- Events (e.g., âfile uploadedâ) initiate transitions
- Transitions invoke Processes (e.g., validation, notifications)
- Everything is orchestrated via the entityâs Workflow
Key benefits:
- Loose coupling between components
- Responsiveness to business stimuli
- Horizontal scalability
The Cyoda Approach
Section titled âThe Cyoda ApproachâTo build with Cyoda:
- Model the domain using Entities
- Capture behavior in Workflows
- Use Events to trigger change
- Persist everythingâdata, state, transitionsâin the Entity Database
Guiding Practices
Section titled âGuiding Practicesâ- Think in terms of stateful entities, not just data records
- Favor FSM workflows over imperative logic
- Use events to trigger logic and state transitions
- Keep business rules close to the entity
- Visualize workflows to align teams and stakeholders
Further Reading
Section titled âFurther Readingâ- This documentation site
- Entity Workflows for Event-Driven Architectures
- Whatâs an Entity Database?