EGOS Docs
Introduction
EGOS Homev1.0
  1. Docs
  2. Egos Cloud
  3. Architecture

Architecture

Previous

EGOS Cloud Overview

Next

Game Engine

    Architecture

    EGOS Cloud system architecture and design patterns

    2 min read

    Architecture

    EGOS Cloud is built on modern web technologies with a focus on real-time communication and extensibility.

    System Design

    Message-Driven Architecture

    All communication in EGOS uses a message-driven pattern:

    1. Events flow from devices to the cloud
    2. Commands flow from the cloud to devices
    3. State is synchronized across all components
    Note

    This architecture enables loose coupling between components and supports offline operation of controllers.

    Component Hierarchy

    Game ├── Components (physical devices) │ ├── Buttons │ ├── LEDs │ └── Sensors ├── Variables (game state) │ ├── Counters │ ├── Flags │ └── Timers └── Logic Flows ├── Triggers ├── Conditions └── Actions

    Key Patterns

    Message Envelope

    All MQTT messages use a standardized envelope:

    { "header": { "messageId": "uuid-here", "timestamp": "2024-01-15T10:30:00Z", "messageType": "INPUT_EVENT", "priority": "NORMAL", "source": "controller-1/module-buttons/button-1" }, "payload": { "pressed": true } }

    Circuit Breaker

    Device communication includes fault tolerance:

    • Automatic retry with exponential backoff
    • Circuit breaker for failing devices
    • Health monitoring and alerts

    Priority Queues

    Messages are processed based on priority:

    PriorityUse CaseTarget Latency
    CRITICALSafety/emergency<10ms
    HIGHUser interaction<50ms
    NORMALState updates<100ms
    LOWAnalytics/loggingBest effort

    Scalability

    EGOS Cloud supports horizontal and vertical scaling:

    • Multiple controllers per cloud instance
    • Dozens of modules per controller
    • Hot-plug device support
    • State persistence across restarts
    Pro Tip

    For large installations, consider running multiple controller instances with load balancing.