Home » Tag Archives: MongoDB (page 4)

Tag Archives: MongoDB

MongoDB Facts: 80000+ inserts/second on commodity hardware

nosqlunit-logo

While experimenting with some time series collections I needed a large data set to check that our aggregation queries don’t become a bottleneck in case of increasing data loads. We settled for 50 million documents, since beyond this number we would consider sharding anyway. Each time event looks like this:           { "_id" : ObjectId("5298a5a03b3f4220588fe57c"), "created_on" ...

Read More »

Spring Data MongoDB cascade save on DBRef objects

mongodb-logo

Spring Data MongoDB by default does not support cascade operations on referenced objects with @DBRef annotations as reference says: The mapping framework does not handle cascading saves. If you change an Account object that is referenced by a Person object, you must save the Account object separately. Calling save on the Person object will not automatically save the Account objects ...

Read More »

Auditing Entities in Spring Data MongoDB

mongodb-logo

Spring Data MongoDB 1.2.0 silently introduced new feature: support for basic auditing. Because you will not find too much about it in official reference in this post I will show what benefits does it bring, how to configure Spring for auditing and how to annotate your documents to make them auditable Auditing let you declaratively tell Spring to store: date ...

Read More »

Optimistic locking retry with MongoDB

mongodb-logo

In my previous post I talked about the benefit of employing optimistic locking for MongoDB batch processors. As I wrote before, the optimistic locking exception is a recoverable one, as long as we fetch the latest Entity, we update and save it. Because we are using MongoDB we don’t have to worry about local or XA transactions. In a future ...

Read More »

MongoDB optimistic locking

mongodb-logo

When moving from JPA to MongoDb you start to realize how many JPA features you’ve previously taken for granted. JPA prevents “lost updates” through both pessimistic and optimistic locking. Optimistic locking doesn’t end up locking anything, and it would have been better named optimistic locking-free or optimistic concurrency control, because that’s what it does anyway. So, what does it mean to ...

Read More »

MongoDB and Web applications

mongodb-logo

Today’s era is when data grows at very huge scale. Data storage is not a problem, yes but the way it gets structured and stored may increase or decrease the seek time for needed data blocks. Use Cases of ever increasing unstructured data           Facebook: 750 million users are active , 1 in 3 Internet users ...

Read More »

MongoDB Pro Tip: Field Projections

mongodb-logo

Did you ever learn that select * from table in RDBMS-land is bad? Of course, you did! If you’re only looking for the email address of a user and not the other 15 columns worth of data, then why ask for that data and incur a penalty? The query select email from user where user_id = 1; is far more ...

Read More »

MongoDB Geo-Spatial Mobile Demo

mongodb-logo

Mongo: noun (pl mongo or mongos) – a monetary unit of Mongolia. Equal to one hundredth of a tugrik. Origin from Mongolian “silver” I’ve written about NoSQL DBMS [http://keyholesoftware.com/2012/10/01/is-nosql-the-sql-sequel/]. We know that there are several categories of NoSQL DBMS. MongoDB is a scalable NoSQL document-oriented data store that has built-in geo-spatial indexing. Let’s look at its characteristics and then check ...

Read More »

Setup MongoDB Replica Set in 4 steps

mongodb-logo

Introduction Before going into details of configuring MongoDB replica sets, let me give brief details about same: Replica Set is the feature provided by the Mongodb database to achieve high availability and automatic failover. It is kinda traditional master-slave configuration but have capability of automatic failover. It is basically group/cluster of the mongod instances which communicates, replicates to each other ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close