Evangelist at Red Hat. • I write code. • Active blogger http://whyjava.wordpress.com/ and https://openshift.redhat.com/community/blogs • Written many technical on IBM DeveloperWorks, Developer.com, JavaLobby. • Active speaker ~ Red Hat Developer Day, JUDCon, JBoss World, SiliconIndia events,etc. • Passionate to learn new things. • Twitter : shekhargulati
served us very well? • Widely used and understood • Tested in real environments • Efficient use of storage space if data normalized properly • Great tools support • ACID semantics • Incredibly flexible and powerful query language • Great framework support
does not map very well with flat tables. • Difficult to evolve Schema with time. • Data constraints and JOINs can be expensive at runtime. • Difficult to scale horizontally.
Rich documents • Eventual consistent • Fast writes • Easy to scale horizontally to add processing power and storage • Tries to solve few practical use-cases
chosen based upon the way data is being used by individual applications or components of single application. Martin Fowler http://martinfowler.com/articles/nosql-intro.pdf
should be able to find all the jobs. • As a User, I should be able to find all the jobs near to my location. • As a User, I should be able to find all MongoDB (or any skill) jobs near to my location. • As a User, I should be able to find all the MongoDB (or any other skill) jobs near to my location with distance.
• JSON-style documents: Lists, Maps, primitives • Schema-less • Each document is heterogeneous, and may have completely unique structure compared to other documents. • Fast and horizontally scalable • Rich query language
for? • Find all the MongoDB jobs near me • Find all the MongoDB jobs within London • Supports only two dimensional indexes. • You can only have one geospatial index per collection. • The spatial functionality MongoDB currently has is: • Near • Containment http://www.mongodb.org/display/DOCS/Geospatial+ Indexing
your coordinates into an array { loc : [ 50 , 30 ] } //SUGGESTED OPTION { loc : { x : 50 , y : 30 } } { loc : { foo : 50 , y : 30 } } { loc : { lon : 40.739037, lat: 73.992964 } } • Make a 2d index db.places.ensureIndex( { loc : "2d" } )
Also supports MySQL. • Multi-language support. Supports Java, Node.js, Perl, Python, PHP and Ruby. • Extensible vi DIY • No need to learn anything new. • Open source – OpenShift Origin • Scalable. • FREE!
free-as-in-beer & free-as-in-freedom • You get three free gears, each with 512MB memory and 1GB of disk space. • Need more resources, just ask! • The catch is we are in developer preview right now
use and you can build polyglot persistence applications on it. • MongoDB makes it very easy to build location aware applications. • All the Spring latest projects work without any problem on OpenShift. • Did I mention – Free? • What are you waiting for? Try it out. • Sign up using foss.in promo code.