Apache Kafka vs. Oracle Transactional Event Queues as Microservices Event Mesh

This blog focuses on transactional and message delivery behavior, particularly as it relates to microservice architectures.  There are of course numerous areas to compare MongoDB, PostgresSQL, and Kafka with the converged Oracle DB and Oracle Transactional Event Queues/AQ that are beyond the scope of this blog.

The Oracle database itself was first released in 1979 (PostgresSQL was released in 1997 and MongoDB in 2009).  Oracle Advanced Queuing (AQ) is a messaging system that is part of every Oracle database edition and was first released in 2002 (Kafka was open-sourced by LinkedIn in 2011 and Confluent was founded in 2014).  

How (and Why) to Use Couchbase as an XML Database

Couchbase and XML — No Problem!


I've heard it said dozens of times: "Hey, Couchbase is great but I use XML."

I recognize that countering with, "Couchbase can be your XML database" is pretty bold, especially for a JSON-oriented document database. Some folks in the Couchbase community might even do a double-take, but I hope you see what I mean by the end of this post.

Building Modern 3factor Apps in 2021 With Event-Driven Programming

Before OOP languages, the programmer would control how the program is executed and that would be from the app’s main routine. In modern programming, that control is delegated to the external non-main loops, and the main routine becomes an event-loop that waits for events to occur and then executes it with the relevant event handler.

This new model of programming (it has been around since the 70s though) is called event-driven programming.

Serverless Eventing Architecture

Event-Driven Architecture (EDA) is a way of designing applications and services to respond to real-time information based on the sending and receiving of information about individual events. Serverless is all about providing service on a provision as-used basis. Combining both you get the best of both worlds. 

  • Loose coupling of services - For better fault tolerance, and can add/remove functionality on the go without affecting others. 

Couchbase Eventing: Small Scripts that Solve Big Problems at Scale

Eventing: Simple Yet Powerful

Eventing allows small scripts to overcome hard to solve problems. First off, let's look at the basic Eventing LifecycleEventing Life Cycle 6.5 The steps below show how easy it is to write and use an Eventing Function:

  • Add (or import) an Eventing Function via Couchbase Server's UI.
  • Assign a data source, a scratchpad bucket, and some bindings to manipulate documents or communicate with the outside world.
  • Implement some JavaScript code to process the received mutation.
  • Save your new Function and hit "Deploy"

That's it; you now have a distributed function responding to mutations in your data set in real-time across your entire cluster. The Eventing service provides an infrastructure-less platform that can scale your Eventing Functions as your business experiences growth whether a one-time spike or a monthly increase in data stores or clients served without concern for the fact that your JavaScript-based Eventing functions are running in a robust reliable parallel distributed fashion.  To learn more about Couchbase Eventing please refer to the Eventing Overview in our documentation. The examples in this article below show that in some cases Eventing can act like a drop of oil to needed "free up" the moving parts of your applications.

Using N1QL With Couchbase Eventing Functions

"Now, this is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning." — Winston Churchill

Updating data is usually not the end, but usually progress of a workflow. Shipping follows ordering; inventory update follows shipping; adjusting credit follows returning; The next step in the process is required to act to keep the workflow going. The workflows can be simple with few steps or complex with hundreds of steps. Business Process Management (BPM) is an industry by itself.

Couchbase 5.5 introduced Evening service. Developers can write a Javascript function to execute upon a change to the data. We refer to inserts, Updates, Merges, and Deletions together as mutations. Multiple specific use cases have been documented for developing these eventing functions.