We are excited to announce the general availability of SingleStore Kai™, an API to speed up analytics on MongoDB® applications seamlessly without any code changes or data transformations.
Developers can now take advantage of both MongoDB® and SQL APIs on SingleStore to meet the demands of modern real-time applications.
With schema-less design for storing data in the form of JSON documents, MongoDB® eased the process of developing applications. However, as the application footprint grew, serving real- time analytics became challenging for applications built on MongoDB®. Performing complex queries while processing huge volumes of data is crucial for providing delightful experiences for customers and unlocking insights for better business decisions — and all this needs to happen in real time.
To solve this, MongoDB® provides ways to improve analytical query performance, like index tuning and adding analytical nodes, but these solutions have limitations. Indexes limit data manipulation, and constantly updating them for changing business needs is a cumbersome process. Similarly, adding read replicas or analytical nodes only boosts computational capacity — without addressing MongoDB® core constraints.
Alternatively, customers could augment their MongoDB® database and move analytics to data warehouses. However this involves flattening complex JSON data and arrays, transferring data by creating and managing ETL pipelines. This involves changing MongoDB®'s data structure, changing queries in the application code to align with the data warehouse’s syntax, hiring specialists and ongoing system maintenance. Finally, most data warehouses prioritize batch processing, which not only delays real-time data access but also escalates costs.
SingleStore provides a unified solution for real-time analytics — eliminating the requirement for multiple data stores. With its innovative Universal Storage and massively parallel processing (MPP) database engine, SingleStore serves both transactional and analytical workloads within a single database. Now, SingleStore Kai makes it easy for applications built for MongoDB® and other Mongo-compatible databases to benefit from SingleStore’s capabilities without any code refactoring.
How we built and improved SingleStore Kai™
The general availability of SingleStore Kai follows the public preview introduction back in May last year. SingleStore Kai™ implements MongoDB® wire-protocol — and as indicated in the following diagram, Kai is able to receive MongoDB commands, generate SQL equivalents executed against SingleStore, read the resulting rowsets from SingleStore and return the results as collections of BSON documents to the client. An application built for MongoDB® can connect with SingleStore Kai just by updating its connection string pointing to a SingleStore workspace.
Native data integration to Zero ETL replication
A standout feature of SingleStore Kai is the native ability to Change Data Capture (CDC) data in from MongoDB® with a zero ETL approach. This CDC in capability from MongoDB® is also now generally available with 8.5 and is part of the SingleStore data integration services.
This integration helps bring data into SingleStore from MongoDB® without the use of any complex tooling. The feature builds on SingleStore Pipelines, simplifying data replication between MongoDB® and SingleStore and eliminating cost and complexity associated with using third-party CDC tools. Furthermore, it requires no schema definition for data ingestion, as data is automatically integrated into SingleStore tables. The solution encompasses both one-time data migration (snapshot) and continuous real-time data replication from Mongo collections into SingleStore.
BSON type in SingleStore Core
BSON is binary encoded JSON, and is the native data format for storage and network transfers for MongoDB®. Starting with the 8.5.1 release, SingleStore introduced support for the BSON storage type, ensuring full compatibility with all MongoDB® document field types. BSON storage — along with highly optimized engine built-in functions that process BSON data — significantly accelerates query performance across both transactional and analytical workloads.
SingleStore Kai’s incredible potential was revealed during the preview release, with 100x -1,000x faster performance on some queries. We will soon share the latest results of SingleStore Kai on some standard industry benchmarks
Integrated Kai shell on Cloud Portal
To boost developers productivity and provide a familiar terminal experience, we released the Kai shell (generally available). This interactive terminal, accessible directly via the cloud portal, allows users to conveniently interact with SingleStore Kai-enabled workspaces. The Kai shell simplifies executing database commands or setting up replication from MongoDB® — without having to install any additional client software.
Try SingleStore Kai™ for free
Experience SingleStore Kai capabilities now on a Free Shared Tier, which is currently in public preview. With a free offering on the cloud that offers a generous 1GB of data storage (effectively ~4GB of uncompressed data), you can run your MongoDB® applications without committing to any paid plans. Now, you can build and test apps rich in both transactions and real-time analytics using your favorite MongoDB® tooling.
Adopting SingleStore Kai for your MongoDB® applications
SingleStore Kai provides a new way to enhance analytics on document data types. For applications currently running on MongoDB®, SingleStore Kai presents flexible integration options. It can augment as an analytical database to serve fast analytics or it can serve as the primary database, offering a full replacement solution.
Augment MongoDB® with SingleStore as an analytical engine
For MongoDB® applications facing challenges with aggregations or executing complex analytical queries quickly, augmenting them with SingleStore Kai could be a direct and efficient solution. In this augmentation setup, MongoDB® remains the transactional database, while SingleStore serves as the analytical engine. Simply setup a continuous replication of the collections necessary for analytics into SingleStore and then switch the application's connection string to take advantage of SingleStore Kai's speed and simplicity.
Consolidate OLTP and OLAP databases
Customers who are facing challenges operating MongoDB® alongside a data warehouse — or those who prefer avoiding a database stack with MongoDB® and a separate analytical system — can consolidate databases in this scenario by using SingleStore to serve both transactional and analytical needs. Additionally, with SingleStore’s native data replication capability you can simplify the process of replacing your database systems.
Apart from the fast analytics, switching to SingleStore also unlocks a host of advanced features. This includes the capability for ultra-fast data ingestion from external sources, such as Kafka, directly into the database and automatic shard management.
Build a new native application
Developers who wish to build their next generative AI or a real-time application no longer have to choose between SQL or MongoDB® (NoSQL). SingleStore Kai™ allows you to seamlessly harness the advantages of both worlds within a unified engine to power your applications. Gain the flexibility of NoSQL and the complex analytics capabilities of SQL directly in SingleStore. With a free shared tier, you can adopt SingleStore as a playground for your new application development.
Until now, SingleStore supported knn vector similarity search through functions like dot_product (for cosine similarity) and euclidean_distance. These functions find application in empowering various customer applications such as facial recognition, visual product/photo search and text-based semantic search. However, with the release of the 8.5 version, SingleStore now supports ANN vector search as well which can optimize for performance with tunable accuracy.
Notably, SingleStore doesn't just limit vector functions to SQL; with SingleStore Kai™, it is also integrated with MongoDB®. Developers can seamlessly invoke, process and run vector functions in SingleStore using the API, simplifying the development of intelligent applications.
Harness the power of SQL within your MongoDB® workflow
Add further flexibility to your MongoDB® applications with SingleStore Kai. Unlock the power of SQL for advanced queries and insights, without leaving your familiar workflow.
Perform powerful joins
When you join data from multiple sources you gain access to deeper insights that were previously hidden. However, joins are not encouraged in MongoDB® and are often not performant — resulting in developers handling it with complex, application-side logic.
With SingleStore Kai you can join a collection not just with other collections, but with other relational tables as well. This enables MongoDB® applications to integrate with those built on SQL and break data silos.
Run queries using SQL syntax
Yes! You can also execute SQL queries directly from your MongoDB® drivers on SingleStore Kai, using the convenient SQL extension command without switching clients.
You can also directly point a BI tool to the SQL endpoint of your SingleStore workspace and analyze your collections — without the need for connectors that would incur additional costs. Now your software developers and data analysts can together work on a single database, utilizing workspaces to isolate application and analytics workloads for optimal performance.
Example
Let’s say we are working on a MongoDB® collection named "weather" designed to store weather data.
The following command creates the "weather" collection:
db.createCollection(
"weather",
{
timeseries: {
timeField: "timestamp",
}
}
)
And here's the SingleStore Kai command that finds documents within a specified date range:
db.weather.find({
"timestamp": {
$gte: ISODate("2021-05-18T00:00:00.000Z"),
$lte: ISODate("2021-05-19T00:00:00.000Z")
}
});
The same query can be executed with sql syntax using sql extension command from a MongoDB® driver.
db.runCommand({
sql: “SELECT *
FROM weather
WHERE timestamp >= '2021-05-18'AND timestamp <= '2021-05-19';”
});
How Canpr.io transformed its app experience with SingleStore
CanPR is a popular immigration app that grew to reach over a million users globally. As user growth continued, the app experienced performance bottlenecks that threatened to hinder the user experience. The need for a robust and scalable database solution became evident, and this is where SingleStore stepped in.
CanPR easily and quickly transitioned from MongoDB® to SingleStore Kai using the native replication tool to bring in the data. CanPR were able to bring their entire application to SingleStore without any code changes in the app.
Results with SingleStore:
- Increased query speeds by more than 10x, improved user experience
- Content management system able to handle 10M+ read operations
- Eliminated performance bottlenecks, ensuring smooth data processing and user satisfaction
- SingleStore’s scalability allowed CanPR to grow without compromising speed or stability
Supercharge analytics for your MongoDB® apps
Modern analytical apps demand fast JSON analytics for engaging user experiences. SingleStore Kai™ provides a remarkably fast API, boosting MongoDB® app analytics by 100-1,000x without extensive changes. Developers can seamlessly enhance MongoDB® apps with SingleStore Kai for improved performance and scalability, leveraging both SQL and NoSQL capabilities.
Kai is available and integrated into SingleStore Helios cloud — it’s free to use, easy to set up during workspace creation, quick to migrate data, and easy to run simple queries and commands directly in the cloud portal.
We would love to learn more about your use case. Feel free to reach out to our PM team and start a conversation on our Forums. Ready to try it out yourself? Activate your free SingleStore trial and receive $600 in cloud credits!
For more information
- Learn more about SingleStore Kai
- Try SingleStore Kai™ free
- Schedule a deep dive with one of our Solution Engineers
- Dig deeper into documentation