It gives us immense pleasure in announcing the launch of Couchbase Eventing Service as part of the Couchbase Data Platform 5.5 Developer Build. This new offering brings compute closer to data and lets customers process changes (create/ update/ delete/ expiry) to data stored in Couchbase Cluster as they happen in near real-time. It provides an interface to consume the changes that are exposed with the Database Change Protocol (DCP).  DCP glues together many different services in the Couchbase Data Platform. Index, Full Text Search and XDCR consume DCP for their efficient operations.

Couchbase Functions

Couchbase Functions is the first offering under the Couchbase Eventing Service that enables you to write server-side functions that are automatically triggered using the familiar Event-Condition-Action model. It is extremely easy to use, via an online javascript code editor that lets you develop and debug the code on generated mutations to the data residing in Couchbase cluster. Couchbase Eventing Service handles all the complexity of scaling to a large number of document mutations. By making deployment of business rules as easy as possible, Couchbase Functions offers developers a platform by which they can concentrate on the business logic, than over configuration or infrastructure. This paradigm enables to develop deeply engaging and personalized user experiences based on real-time events.

Couchbase Functions does away with the problems of multiple-writes from the application tier for managing changes and also is much more efficient as it offers an alternative to polling from middle-tier. Couchbase Functions offers to solve some of the following requirements that was not possible earlier by providing developers with a clean and simple interface.

  • Notifications Before Expiry
  • Threshold Based Monitoring & Alerting
  • Propagate Changes to Other Systems
  • Enrich Content in Near-Real Time
  • Trigger a routine on a Document at Specified Intervals
  • Cascade Deletes

Also, it offers these capabilities by performing at scale – an important characteristic, and a requirement for most distributed compute operations.

Couchbase Functions essentially targets asynchronous, stateless, low-latency (time-bracketed) workloads that often see inconsistent traffic. By emphasising on business logic than configuration or infrastructure, developers have a very powerful tool in their arsenal which leads to high dev velocity.  By lowering the barriers to experiment with data, the Functions service offers developers a fast and pleasant experience, which in turn lets businesses be much more agile.

For example, one can send a promotional email when a shopping cart is about to expire, trigger an alert when a value monitored exceeds certain threshold, or propagate changes in Couchbase to other adjacent systems.

Couchbase Functions Summary Screen

Functions Summary Screen

Couchbase Functions is a homegrown offering, that leverages the V8 engine for running the Javascript code. The mutations to the data can be consumed by the two out of the box event handlers – OnUpdate and OnDelete – that get triggered respectively for create+update and delete operations on data. We have also added and removed many constructs to the Javascript language so that it performs at scale.

Browser based Javascript Editor

Browser based Javascript Editor

As Couchbase Functions is essentially a platform to write snippets of server-side code that get triggered in response to events, it brings the serverless (the FaaS aspects) computing infrastructure closer to the datastore, and thereby helping in layer consolidation as well.

World Class Diagnosability Features!!

An often cited issue with event based systems is the complete lack of diagnosability options.  Couchbase Functions integrates with the Chrome Debugger to debug updates to data in real-time. We block only a single mutation at a time and hand it over the debugger session, in such a way that processing of the rest of the mutations are not blocked. This capability is probably the first of it’s kind in either the world of databases or in streaming software.

Developers can also specify log statements that are captured in application specific log files on the file-system. The diagnosability features being offered, both on a file and using the debugger, truly differentiate this offering and also offer developers and administrators a powerful tool which was missing earlier.

Online Real-Time Javascript Debugger

Online Real-Time Javascript Debugger

And yes, it is a Multidimensional Scaling (MDS) enabled service. Hence, Couchbase Eventing Service can run on it’s own set of nodes providing the much needed workload isolation and also independent scalability for compute workloads.

Eventing Service is a MDS Service

Eventing Service is a MDS Service

We truly hope that you find this offering compelling and implement it to solve use-cases that truly revolutionises your workflows and leads to better customer engagement and delight. We are excited to hear more from you.

A successful [software] tool is one that was used to do something undreamed of by its author”. – Stephen Johnson

Posted by Venkat Subramanian, Product Manager

Venkat has over a decade of experience in product development and management and has been developing data/analytics platforms & products. Significant chunk of his experience has been with Oracle, where he transitioned from being an Engineer in Oracle’s Enterprise Manager team to Product Manager for Oracle's BI/Analytics suite of products. He has worked in startups in the past helping develop NLP products and distributed decisioning systems. He has done Bachelors in Computer Science from University of Madras (India) and has done Executive General Management from Indian Institute of Management(I.I.M), Bangalore (India); and lurks around at @venkasub.


  1. Hey Venkart,
    have a question about your new Evening system.

    Tried to use CURL function inside of event function, but always get “CURL is not defined” error (in google chrome debuger).

    I have curl_whitelist.json set properly, as when I do make query (Workbench -> Query) “SELECT CURL(“”);” (my local test server) I get response back.

    Do I need to change any additional configuration to be able to use CURL function in eventing functions?

Leave a reply