Enterprise Interoperability

Enterprise systems have existing infrastructure: schedulers, message brokers, governance tools, and compliance requirements. PURISTA’s interoperability layer makes your service contracts legible to these systems without moving business logic out of PURISTA.

The enterprise flow

flowchart LR
    SCH["Scheduler"] -->|event| EB["Event Bridge"]
    EB -->|event-to-queue| Q["Queue"]
    Q -->|worker| W["Queue Worker"]
    W -->|result event| EB
    EB -->|subscription| S["Downstream Service"]

This pattern keeps each responsibility small and replaceable:

ComponentResponsibilityReplaced by
SchedulerDeclares when something should happenCron, Airflow, Temporal, cloud schedulers
EventBroadcasts a business factNATS (@purista/natsbridge), AMQP (@purista/amqpbridge), MQTT (@purista/mqttbridge), or via Dapr pubsub components
Event-to-queue bindingHands off from push to pull semanticsPURISTA bridge adapter
QueueOwns lease, retry, heartbeat, DLQRedis (@purista/redis-queue-bridge), NATS JetStream (@purista/nats-queue-bridge)
WorkerExecutes business logicPURISTA queue worker
Result eventPublishes completion to subscribersSame event bridge

Interoperability topics

TopicPurpose
SchedulingDeclare schedule intent as contracts
Event-to-queueDurable handoff from events to pull-based work
Long-running queuesLease, heartbeat, and retry for background jobs
Result eventsPublish queue completion as typed events
Async agent queuesQueue lifecycle for AI agent execution
ExportsGenerate AsyncAPI, OpenAPI, and runtime capability reports

Design principles

  1. Business logic stays in PURISTA — commands, subscriptions, and queue workers own the domain logic
  2. Contracts are provider-neutral — schedules, events, and queues declare intent without vendor specifics
  3. Adapters bind at runtime — the same service runs with different schedulers, brokers, and queue backends
  4. Exports are generated, not hand-written — AsyncAPI and OpenAPI schemas derive from builder declarations

Example: billing cycle

A complete enterprise flow for monthly billing:

flowchart TD
    A["Scheduler: 1st of month 2am"] -->|billing.monthlyCycleDue| B["Event Bridge"]
    B -->|event-to-queue| C["Queue: billing.monthlyClosing"]
    C -->|lease + heartbeat| D["Worker: process accounts"]
    D -->|success| E["Result: billing.monthlyClosing.completed"]
    D -->|failure| F["DLQ: retry or alert"]
    E -->|subscription| G["Ledger Service"]
    E -->|subscription| H["Notification Service"]

See the local runnable example in examples/enterprise-billing-cycle.

Governance and compliance

Use exports to generate provider-neutral documentation. Exports are generated programmatically via the ClientBuilder utility — there are no purista export CLI subcommands. To generate an AsyncAPI or OpenAPI document, call the appropriate builder method in a script and write the output to a file.

These documents show:

  • Service ownership and version
  • Message schemas and validation rules
  • Delivery semantics and limitations
  • Retry policies and dead-letter behavior

Review these before binding to specific infrastructure.

Next: Scheduling to declare time-based triggers.