Skip to content

Realtime Syncing

In aeppic, real-time syncing ensures that data remains consistent and up-to-date across all connected clients and services. Whether you’re editing a document, triggering a business rule, or updating a workflow, changes are immediately propagated to all subscribers, creating a seamless and collaborative experience.

Why Real-Time Syncing Matters

Consistency

  • All clients view the latest state of the data, reducing discrepancies.
  • Eliminates the need for manual refreshes or periodic polling.

Collaboration

  • Multiple users can work on the same document or application simultaneously, with updates reflected instantly

Efficiency

  • Only the changes (deltas) are sent, minimizing bandwidth usage and improving responsiveness. WIP

Automation

  • Enables real-time triggers for workflows, business rules, and services.

How Real-Time Syncing Works

Write Log as the Source of Truth

  • All changes are first written to the write log in the event-sourced architecture.
  • The write processor validates and computes the changes before committing them to the log.

Updating the Read Model

  • Once a change is logged, it is projected into the read model.
  • The read model is the queryable, up-to-date representation of the data.

Change Propagation

  • Changes are propagated to all connected clients and services via WebSockets.
  • Each client receives only the relevant updates (e.g., changes to documents they are subscribed to).

Key Features of Real-Time Syncing

Selective Subscription

Clients and services can subscribe to specific changes:

  • Document Subscriptions: Receive updates for individual documents.
  • Query Subscriptions: Track results of a query, such as “all documents in a folder.”