Skip to content

Data Models

PushGo distinguishes itself by supporting three distinct data models, each optimized for different notification and state synchronization needs.

Message is the simplest model, designed for one-time notifications that do not represent a persistent state.

  • Use case: Alerts, chat messages, simple push notifications.
  • Behavior: Stored in a chronological log. Once delivered and viewed, they are typically considered ephemeral.
  • Key Fields: title, body, priority.

Event represents a stateful occurrence or transition at a specific point in time.

  • Use case: “Lights turned on”, “Motion detected”, “Job completed”.
  • Behavior: Events can be patches to a state. The gateway and client can merge event patches to determine the current state of an entity.
  • Key Fields: event_type, payload, timestamp, thing_id (optional).

Thing represents a persistent entity, such as a physical device, a room, or a logical task.

  • Use case: Smart home devices, server nodes, project tasks.
  • Behavior: Things have a persistent lifecycle (Active, Archived, Deleted). They serve as containers for events and current state (attrs).
  • Key Fields: thing_type, state, attrs (JSON object).

By choosing the right model, you can build sophisticated monitoring and notification workflows with PushGo.