Eventing Service

    +
    The Eventing Service provides near real-time handling of changes to data; whereby code is executed either in response to mutations, or as scheduled by timers.

    About the Eventing Service

    The Eventing Service is a scalable framework which enables user-defined business logic to be triggered and respond in real time on the server when application interactions create changes in data. These changes to data are also known as document mutations (insert, update, deletion, or expiration). Eventing Functions are standalone JavaScript fragments that are triggered in real time in response to mutations on documents. Eventing Functions can also schedule further processing in the future via Timers.

    The Eventing Service offers a computing paradigm that abstracts away infrastructure concerns allowing developers to focus solely on business logic to handle data changes. In the cluster, you can use Eventing Functions to handle data-changes according to a real-time event-condition-action model. Typical use cases include: enriching documents, cascade deletes, generating threshold-based alerts, propagating data changes inside a cluster, or interacting with external REST endpoints.

    Using the Eventing Service

    Like the other Couchbase services, the Eventing Service can be deployed during cluster creation, or by adding it to an existing cluster. The Eventing Service depends on the Data Service. This service must also be deployed on the cluster in order to use the Eventing Service. (Information about how these services interact with one another can be found in the Couchbase Server documentation.)

    If a cluster has the Eventing Service deployed, Eventing Functions can be created and managed using the Couchbase CLI, the REST API, and the Couchbase Cloud UI.