VOOZH about

URL: https://thenewstack.io/mongoose-bringing-json-oriented-developers-to-apache-cassandra/

⇱ Mongoose: Bringing JSON-Oriented Developers to Apache Cassandra - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2023-03-10 06:15:37
Mongoose: Bringing JSON-Oriented Developers to Apache Cassandra
sponsor-datastax,sponsored-post-contributed,
Data / Open Source / Software Development

Mongoose: Bringing JSON-Oriented Developers to Apache Cassandra

A new partnership between the open source projects Stargate and Mongoose will create a fully idiomatic experience for JavaScript developers on Cassandra. 
Mar 10th, 2023 6:15am by Mark Stone
👁 Featued image for: Mongoose: Bringing JSON-Oriented Developers to Apache Cassandra
DataStax sponsored this post.

Apache Cassandra is becoming the best database for handling JSON documents. If you’re a Cassandra developer who finds that statement provocative, read on.

In a previous article, we discussed using data APIs and data modeling to mold Cassandra into a developer experience more idiomatic to the way developers think, thus improving developer productivity while preserving reasonable database performance and scale. It’s a great hypothesis and one that needs to be tested in the context of a particular developer idiom and developer community.

Mongoose, an object data mapping library usually used with the MongoDB driver, is an open source project with a significant community of JavaScript developers around it. At the Stargate project, the open source API data gateway designed to work with Cassandra, we’ve partnered with Mongoose, and we’re working on an upcoming JSON API that will be released together with a version of Mongoose that will work through that JSON API to connect to Cassandra. This creates an end-to-end stack for Mongoose developers that is fully open source. It’s game-changing for Mongoose developers, and opens an important new chapter for Cassandra.

In this article, I’ll discuss how to provide a developer-friendly JSON idiom using Cassandra together with Stargate, and how we’re working to do just that for Mongoose developers.

DataStax, an IBM company, provides the real-time vector data tools that Gen AI apps need, with seamless integration with developers’ stacks of choice.
Learn More
The latest from DataStax

The Goldilocks of JS Communities

In October 2022, we released a new version of Stargate. With the new Version 2, individual APIs are no longer embedded in the core Stargate coordinator code, but instead separated out into individual services. This improves Stargate’s operational efficiency; individual API services can now be deployed and scaled independently. This also makes new API services easier to develop. As long as they abide by the service boundary, these services can be developed in parallel with and independent of core Stargate development work.

We then looked for a truly idiomatic experience we could deliver to developers. With 18 million developers, JavaScript is the world’s most popular programming language, and JSON is the standard way that JavaScript developers structure data. However, 18 million people is not a community; it is many communities. We needed the “Goldilocks” of JavaScript communities — big enough to be significant, but small enough to be focused. We found the right community built around Mongoose, an object data mapper library used with applications that connect to MongoDB. Mongoose has several important characteristics:

  • It’s JavaScript-centric
  • It enjoys broad adoption, with roughly 2 million GitHub repositories listing Mongoose as a dependency
  • Mongoose creator Valeri Karpov’s active leadership provides a clear focus
  • It’s an open source project that has lacked an open source database since MongoDB’s decision to move to a shared source model with its Server Side Public License

Developers don’t really interact directly with a database so much as a data model. In Stargate’s original Document API, the API handles JSON by making it look like a traditional Cassandra table. This puts a burden on JSON-oriented developers to think in terms of Cassandra data structures, and puts a burden on Cassandra’s row-oriented indexing logic because a JSON document gets spread across multiple rows.

Our new JSON API departs from this data model, and instead relies on a data model we call “super shredding.” You can learn more about super shredding at Aaron Morton’s talk at Cassandra Forward, a free digital event on March 14. In short, we take advantage of Cassandra’s wide-column nature to store one document per row, knowing that a Cassandra row can handle even very large documents. We also have a set of columns in that row that are explicitly for storing standard metadata characteristics of a JSON document. Now we have something more easily indexable, as well as a means of preserving and retrieving metadata.

We will then front this data model with our new JSON API, using the same mQuery specification that Mongoose uses as our guiding requirement for which calls the API needs to support. When complete, this should enable any of the more than 2 million Mongoose-dependent applications to run against open source Cassandra or DataStax’s hosted Cassandra service, Astra DB, with just a configuration change.

With Mongoose and the new JSON API, we’ll provide a fully idiomatic experience to JSON-oriented JavaScript developers, giving them the scale and performance of Cassandra underpinning an authentic JSON data model.

Mongoose creator Karpov will also speak at the Cassandra Forward event, demonstrating a simple e-commerce application that uses the Stargate version of Mongoose, open source Stargate and the DataStax Enterprise (DSE) version of Cassandra. You’ll be able to download the working code for this application and the supporting platform pieces from GitHub. While we have enough code to run this application, we are not yet code complete. For example, we run against DSE right now because we need storage-attached indexing (SAI), which works with DSE and is planned for release in Cassandra 5.0 later this year.

Contributing Back to Cassandra

Cassandra isn’t a static piece of software; it’s a vibrant and evolving open source project. So we are also continuing a longstanding Cassandra tradition of using features like SAI that emerge client-side to foster changes on the database side. Similarly, Stargate’s Mongoose work has prompted a set of proposals for Cassandra around global sort and advanced query filtering that will not only make Stargate’s JSON API and Mongoose client better, but will add powerful new features to Cassandra Query Language. This is a great reminder that data engineers and application developers are not two different communities, but complementary cohorts of the extended Cassandra community.

And JSON is just the first step. Essentially, what we will have done is to take the building blocks of Cassandra, Stargate and a reasonably efficient Cassandra data model and build a document database that you interact with through a JSON API. In other words, we’ve used super shredding to create a purpose-built database that better serves the community of Mongoose developers.

With the modular architecture of Stargate v2, and the proof point of Mongoose for the idiomatic approach, we are ready to take on new developer communities that organize around a particular software development idiom. The process by which we’ve harnessed Cassandra for Mongoose is repeatable — and it’s one that we will repeat. In so doing, we dramatically expand the number of developers and use cases that Cassandra can address, which is the sort of goal worthy of an open source project.

Learn more about DataStax.

DataStax, an IBM company, provides the real-time vector data tools that Gen AI apps need, with seamless integration with developers’ stacks of choice.
Learn More
The latest from DataStax
TRENDING STORIES
Mark Stone is product manager at DataStax. He's a technology veteran with many years of experience in product management, program management and people management. Always working as part of the connective tissue between business stakeholders and technical stakeholders, Mark loves...
Read more from Mark Stone
DataStax sponsored this post.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Pragma.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.