DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Translating OData Queries to MongoDB in Java With Jamolingo
  • Cutting P99 Latency From ~3.2s To ~650ms in a Policy‑Driven Authorization API (Python + MongoDB)
  • Isolation Level for MongoDB Multi-Document Transactions (Strong Consistency)
  • Building a 3D WebXR Game with WASI Cycles: Integrating WasmEdge, Wasmtime, and Wasmer to Invoke MongoDB, Kafka, and Oracle

Trending

  • How Performance Engineers Find and Fix Hidden System Bottlenecks
  • 5 Proven Strategies for Modernizing Legacy .NET Applications
  • Why Your Test Automation Is Always Behind the Code And the Architecture That Fixes It
  • Agentic Test Creation: From Plain-Language Requirements to End-to-End Test Cases

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. Migrating from Cassandra to MongoDB

Migrating from Cassandra to MongoDB

By 
Mitch Pronschinske
·
Jul. 26, 10 · Interview
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
19.7K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

I'll start off by saying this article is not intended to be a Cassandra-bashing session, instead it provides an interesting look at one development company's case study to show that Cassandra (although it's fantastic for some) is not for everyone.


The company is Nodeta and the application is Flowdock, a free tool (currently in beta) that functions as a web-based team messenger in place of Campfires, Skype Chats, IRCs, etc.  Otto Hilska, who talked about the migration, says that "All software developers should be using it… because it better supports their actual workflow.."


About a week ago the team finished their transition from the Apache Cassandra NoSQL database to another NoSQL, MongoDB.  The switch was made due to stability issues that the developers were having with Cassandra.  Hilska explained the details of his company's experience with Cassandra:


" All nodes would go into an infinite loop, running GC and trying to compact the data files – occasionally falling off the cluster. We were unable to solve the problem, except that restarting and then compacting a node usually settled it down for a while. Other people had reported similar problems. Last couple of weeks our Cassandra nodes always ate all the resources they were given, slowing down Flowdock.

This was not the first time we had run into problems because of our bleeding edge database choice. When upgrading from 0.4 to 0.5, we had to shut down the cluster, only to find out that it hadn’t flushed everything to the disk (even though we explicitly flushed it, as instructed). Thus we ended up having a couple of minutes of discussions lost, and our custom-built indices were miserably out of date and needed to be rebuilt. I think it was 4 AM when we finally got to leave the office."--Otto Hilska


Flowdock developers became attracted to a new NoSQL store, MongoDB, because of its recent addition of auto-sharding and replica sets.  Hilska wrote the conversion script in a day and it took a week to get Flowdock running purely on MongoDB.  Then Nodeta tested it internally for a few weeks before they deployed it to production.


However, MongoDB is not without flaws as well.  Dots are not allowed in BSON document keys and the document size is limited to 4MB.  It's also not as easy to add new nodes as it is with Cassandra.  On the other hand, Hilska says that the smart (multikey) indices, complex queries directly from the console, MapReduce, GridFS, and lack of issues make up for these minor flaws.


I recently posted a guide for determining the right database solution (Relational or NoSQL) for various use cases.  The article has some very good resources and includes situations where MongoDB or Cassandra might be the best choice.  


Some criticisms of Cassandra emerged a few weeks ago when Twitter announced that it would over to the NoSQL store.  By no means has Twitter stopped using Cassandra.  They have stated that it's currently being used to store geolocation data and data mining results that feed into things like local trends and @toptweets.  The NoSQL's creators at Facebook are also still using Cassandra.


Production deployments of MongoDB exist at Foursquare, SourceForge, The New York Times, BoxedIce, GitHub, and SugarCRM.

MongoDB

Opinions expressed by DZone contributors are their own.

Related

  • Translating OData Queries to MongoDB in Java With Jamolingo
  • Cutting P99 Latency From ~3.2s To ~650ms in a Policy‑Driven Authorization API (Python + MongoDB)
  • Isolation Level for MongoDB Multi-Document Transactions (Strong Consistency)
  • Building a 3D WebXR Game with WASI Cycles: Integrating WasmEdge, Wasmtime, and Wasmer to Invoke MongoDB, Kafka, and Oracle

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook