NoSQL Shootout: RavenDB vs MongoDB

Post on 27-Jan-2015

143 views 1 download

Tags:

description

A SoCal CodeCamp talk about two NoSQL databases, the crowd favorite MongoDB and the up-and-comer RavenDB. Which one is better at what?This talk really just offers a pair and contrast view of both database systems and tries to speak to the strengths and weaknesses of each. It's a 300-level talk and is not meant for people who are totally unfamiliar with NoSQL and document database systems.

Transcript of NoSQL Shootout: RavenDB vs MongoDB

vs.

Aaron StannardNuri Halperin

OVERVIEWWhat are we talking about today?

WHAT’S IN COMMON?What do RavenDB and MongoDB do that are similar?

Fundamentals

No Schema

No Impedance Mismatch

{ "Address" : "123 Anywhere St.", "City" : "Springfield", "PostalCode" : 99999 }

Expose Data as JSON

Queries

Map(k1,v1) → list(k2,v2)Reduce(k2, list (v2)) → list(v3)

Indexing for Deep Properties

Documents Stored as Collections

MapReduce Support

Scaling & Replication

Sharding Support

Replication Support

Full Backup Support

THE SHOWDOWNWhat do RavenDB and MongoDB do differently?

Fundamentals

RavenDB MongoDB

Built with C# Built with C++

Data saved as JSON

Data saved as BSON

Uses Lucene.NET for indexing

Uses B-Trees for indexing

Uses Esent for Storage

Uses Memory-mapped files for storage

Writing to a Database

RavenDB MongoDB

Batch transaction support

Single row transactions*

Optimistic concurrency

No concurrency management

ACID

Granular write & safety control

Reading from a Database

RavenDB MongoDB

Cross-collection query support

No cross-collection queries

Server-side DbRef Resolution*

Client-side DbRef Resolution

No ad-hoc queries on subsets

Supports ad-hoc queries on subsets

Supports full-text queries

No support for full-text queries

Indexes

RavenDB MongoDB

Supports static indexes

Supports static indexes

Supports ad-hoc indexes

No ad-hoc index support

Multi-map indexes

No multi-map indexes

Indexing performed in background

Indexing is configurable to background or foreground

MapReduce

RavenDB MongoDB

M/R done as indexes

M/R done as queries

No M/R pipeline Supports incremental M/R

M/R is calculated in real time

M/R is calculated in background

Replication and Scaling

RavenDB MongoDB

Master-Slave Replication

Master-Master Replication

No Master-Master Replication

Manual & Auto Sharding

Manual & Auto Sharding

Mix and Match Replication / Shards Replica sets

Master-Slave Replication

Ecosystem

RavenDB MongoDB

Limited driver ecosystem

Rich driver ecosystem

Little documentation and examples

Lots of documentation and examples

Depends on Windows

Can run anywhere

OSS and Commercial Licenses ($$) Free / OSS License

Extras

RavenDB• Supports Triggers• Multi-tenant• Supports OAuth / Basic

Auth / Anonymous*• REST API

MongoDB• No Trigger Support• Multi-tenant • Supports Basic Auth

• BSON over TCP

Further Reading

• http://ravendb.net • http://mongodb.org • https://www.10gen.com/events/mongdb-san-

diego (July 25th)