Couchbase Mobile extends the power of Couchbase to the edge, securely managing and syncing data from any cloud to edge devices or directly between edge devices.

In this post, I discuss the main features in the Couchbase Lite and Sync Gateway platforms. In addition, there are a number of bug fixes and minor enhancements that are discussed in the platform-specific release notes.

Couchbase Lite

Java Support

Couchbase Lite supports Java (non-Android) for use in desktop and server applications.

With the Java API, you can use Couchbase Lite as an embedded database to enable offline-first support within your Java desktop application built with a UI framework such as Swing UI.

You can also embed Couchbase Lite within your Java servlet running within the context of a web container such as Tomcat or Jetty. In the latter case, your Java-based web server can expose a suitable RESTful interface that will allow it to serve other external clients.

Couchbase Lite, running within the context of the web service, can be used as a shared data store by multiple external clients and applications. This is particularly relevant in the context of edge computing, which is growing in relevance as businesses seek to bring compute and storage closer to the edge for High Availability, improved response times, reduced bandwidth costs, and adherence to data privacy restrictions.

With the exception of the init function, the API between the Android and non-Android versions of Couchbase Lite is identical. So if you’re already working with Android-based apps powered by Couchbase Lite, the new Java platform API should feel second nature. By aligning the APIs, you can also reuse the data access object (DAO) layer across your Android and non-Android Java apps, which vastly simplifies development.

With the addition of the Java platform, Couchbase Mobile makes it easier for developers to build applications with offline-first support for a wide range of platforms spanning mobile (iOS, Android, Windows), desktop (.NET, Java, C), and cross-platform/hybrid environments like Xamarin, Ionic, Cordova, Electron, etc.

Of course, the best way to get a feel for the API is to try it out. So head over to the Java documentation for a detailed description of the new platform API with informative code snippets.

The Predictive Queries API

Couchbase Lite offers a Predictive Queries API.

The Predictive API allows mobile applications to leverage pre-trained, mobile-optimized machine learning models to run predictive queries against data in your database in combination with predictions made on real-time data.

To do this, you register a pre-trained machine learning model through the Predictive API and Couchbase Lite uses the registered model to run the predictions. By building a cache of prediction results, Couchbase Lite Predictive Queries deliver consistent response times even as the size of the dataset grows.

Sync Gateway

Write Scaling

Key architectural enhancements in the Couchbase Sync Gateway significantly improve the throughput of writes. Improved horizontal scalability also addresses the growing demands of deployments with tens or thousands of concurrent writes per second. This includes the processing of mutations that come in from Couchbase Lite clients replicating with the Sync Gateway, as well as writes that are made via the Sync Gateway REST API.

While the default configuration should work for most deployments, Couchbase Mobile also supports advanced configuration options that allow you to fine-tune for optimal performance. You can read more about the write scale enhancements in our documentation.

Import Scaling

In addition to the write scale abilities discussed above, we’ve also significantly improved the performance of writes coming in from Couchbase Server that are imported by the Sync Gateway (a.k.a. “import processing” or “shared bucket access”). This level of import throughput makes server data available to be synced to the clients much sooner. This is particularly important for the high volume import of data during initial startup or the periodic maintenance phase.

In addition to the per-node import throughput, Couchbase Mobile also enables you to scale linearly with a number of nodes. While the default configuration should work for most deployments, we also support advanced configuration options that allow you to fine-tune for optimal performance. You can read more about the write scale enhancements in our documentation.

High Availability of Import Processing

With Couchbase Mobile, import processing is automatically sharded across all the Sync Gateway nodes in a cluster. That way, even if the import node goes down, the import shard corresponding to the failed node is automatically picked up by other nodes in the cluster. As a result, import processing continues uninterrupted with the other nodes in the cluster.

Now your deployments can be truly homogeneous with identical configurations. In addition to HA, the sharding of import processing also results in improvements in write performance as discussed earlier.

The system also supports advanced configuration options to control the sharding of the import processing.

Next Steps

In this post we covered key features in Couchbase Mobile. Refer to our documentation for a complete listing of all features and ongoing enhancements and bug fixes. You can download Couchbase Mobile today and try it out for yourself.

Our Enterprise Edition is also free to download and use for development purposes. You can learn more in our What’s New page.

Here are some direct links for further exploration:

Author

Posted by Priya Rajagopal, Director, Product Management

Priya Rajagopal is a Director of Product Management at Couchbase responsible for the product portfolio for mobile and edge computing. She has been professionally developing software for over 20 years in several technical and product leadership positions, with 10+ years focused on mobile technologies. As a TISPAN IPTV standards delegate, she was a key contributor to the IPTV standards specifications. She has 22 patents in the areas of networking and platform security.

Leave a reply