Home » Tag Archives: MongoDB (page 4)

Tag Archives: MongoDB

Create a simpe RESTful service with vert.x 2.0, RxJava and mongoDB

mongodb-logo

A new article after an hiatus of almost half a year. In this article we’ll have quick look at how you can get started with vert.x and more interestingly how you can use RxJava to make programming asynchronous systems a lot easier. We’ll cover the following subjects: Create an empty vert.x project using maven Import in IntelliJ and create a ...

Read More »

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 »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.