SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Bring Spatial Love to your Java
             Application



      Shekhar Gulati
      @shekhargulati
      OpenShift Evangelist, Red Hat


1
Building A Location Aware Job Search App




2
User Stories

    As a User, I 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.




3
Assumptions: as a developer ...
    
        Want to prototype quickly
    
        Need quick feedback
    
        Don't want to manage infrastructure
    
        Don't want to spend much money on infrastructure. Or, even
        better, you want it to be free.
    
        Use your existing knowledge
    
        Should be able to use the best tool for the job




4
Technology Choices
    
        MongoDB
    
        OpenShift
    
        Java 6
          
              Spring 3.1.2.RELEASE
          
              Spring 1.1.0.M1
    
        GIT
    
        SSH




5
Why MongoDB ?
    
        Easy to get running
    
        Open Source
    
        Active community
    
        Rich documents
    
        Geospatial indexing.
    
        Writes are very fast. You can customize it using
        WriteConcern.




6
Rich Document




7
Geospatial Indexing Basics
    
        What is it for?
           
               Find all the MongoDB jobs near me
           
               Find all the MongoDB jobs within Pune
    
        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

8
How to make it work

    1) Put 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 } }

    1) Make a 2d index
       db.places.ensureIndex( { loc : "2d" } )




9
Why OpenShift ?
 
     Supports MongoDB. Also supports MySQL and
     PostgreSQL.
 
     Multi-language support. Supports Java, Node.js, Perl,
     Python, PHP and Ruby.
 
     No need to learn anything new.
 
     Scalable.
 
     FREE!




10
11
What else do I get and what is the
     catch?
• OpenShift is 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




12
Let's get our hands dirty




13
Create an OpenShift Account
     https://openshift.redhat.com/app/account/new
     Promo code is bangalore




14
Installing Client Tools
 Install Ruby 1.8.7 or greater
 Install Git
 Install rhc OpenShift gem


 Refer to documentation




15
Setup your OpenShift Environment



        rhc setup -l <openshift_login>




16
Creating an OpenShift Application




     rhc app create -a localjobs -t jbossas-7 -d




17
Adding MongoDB and RockMongo
               Cartridge


      rhc app cartridge add -a localjobs -c mongodb-2.0


     rhc app cartridge add -a localjobs -c rockmongo-1.1




18
Play with MongoDB running in the Cloud
 ssh into instance
 Type mongo on the shell
 Create a sample db
 Insert some documents in the collection
 Run some queries




19
Let's take a look at GIT

 Distributed version control
 A local repository – on your laptop
 A remote repository – on some other machine, usually a
   server




20
You need to understand at least 3 commands in Git
 1. Git add . (means add all news files as being tracked in
    the local repository)
 2. Git commit –am “your message” (means commit all
    my changes to the local repository with this message)
 3. Git push (means push from your local repository to the
    repository on your OpenShift gear)




21
Pulling the code from GitHub
 git rm -rf src pom.xml
 git commit -am “removed default files”
 git remote add localjobs -m master
    git://github.com/shekhargulati/localjobs.git


 git pull -s recursive -X theirs localjobs master




22
Importing Data into MongoDB
 rhc app show -a localjobs -l <openshift_login_email>
 scp -r jobs-data.json
   <instance_ssh_access>:localjobs/data
 ssh <instance_ssh_access>
 mongoimport -d localjobs -c jobs --file jobs-data.json -u
  $OPENSHIFT_NOSQL_DB_USERNAME -p
  $OPENSHIFT_NOSQL_DB_PASSWORD -h
  $OPENSHIFT_NOSQL_DB_HOST -port
  $OPENSHIFT_NOSQL_DB_PORT
 db.jobs.ensureIndex({"location":"2d"})


23
Show some geospatial queries




24
Deploy the code to OpenShift
               git push




25
Code Walkthrough




26
Conclusion
 1. MongoDB makes it very easy to build location aware
    applications.
 2. OpenShift is very easy to use and embraces rapid
    development.
 3. Did I mention – Free?
 4. What are you waiting for? Try it out.




27

Más contenido relacionado

Destacado

Audit free cloud storage via deniable attribute based encryption
Audit free cloud storage via  deniable attribute based encryptionAudit free cloud storage via  deniable attribute based encryption
Audit free cloud storage via deniable attribute based encryptionMano Sriram
 
A secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloud
A secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloudA secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloud
A secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloudPvrtechnologies Nellore
 
Ip traceback seminar full report
Ip traceback seminar full reportIp traceback seminar full report
Ip traceback seminar full reportdeepakmarndi
 
Progressive duplicate detection
Progressive duplicate detectionProgressive duplicate detection
Progressive duplicate detectionieeepondy
 

Destacado (6)

Audit free cloud storage via deniable attribute based encryption
Audit free cloud storage via  deniable attribute based encryptionAudit free cloud storage via  deniable attribute based encryption
Audit free cloud storage via deniable attribute based encryption
 
Mongodb
MongodbMongodb
Mongodb
 
A secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloud
A secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloudA secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloud
A secure-anti-collusion-data-sharing-scheme-for-dynamic-groups-in-the-cloud
 
Ip traceback seminar full report
Ip traceback seminar full reportIp traceback seminar full report
Ip traceback seminar full report
 
Progressive duplicate detection
Progressive duplicate detectionProgressive duplicate detection
Progressive duplicate detection
 
Courier services
Courier servicesCourier services
Courier services
 

Más de MongoDB

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump StartMongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
 

Más de MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Bringing Spatial Love to your Java Application

  • 1. Bring Spatial Love to your Java Application Shekhar Gulati @shekhargulati OpenShift Evangelist, Red Hat 1
  • 2. Building A Location Aware Job Search App 2
  • 3. User Stories  As a User, I 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. 3
  • 4. Assumptions: as a developer ...  Want to prototype quickly  Need quick feedback  Don't want to manage infrastructure  Don't want to spend much money on infrastructure. Or, even better, you want it to be free.  Use your existing knowledge  Should be able to use the best tool for the job 4
  • 5. Technology Choices  MongoDB  OpenShift  Java 6  Spring 3.1.2.RELEASE  Spring 1.1.0.M1  GIT  SSH 5
  • 6. Why MongoDB ?  Easy to get running  Open Source  Active community  Rich documents  Geospatial indexing.  Writes are very fast. You can customize it using WriteConcern. 6
  • 8. Geospatial Indexing Basics  What is it for?  Find all the MongoDB jobs near me  Find all the MongoDB jobs within Pune  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 8
  • 9. How to make it work 1) Put 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 } } 1) Make a 2d index db.places.ensureIndex( { loc : "2d" } ) 9
  • 10. Why OpenShift ?  Supports MongoDB. Also supports MySQL and PostgreSQL.  Multi-language support. Supports Java, Node.js, Perl, Python, PHP and Ruby.  No need to learn anything new.  Scalable.  FREE! 10
  • 11. 11
  • 12. What else do I get and what is the catch? • OpenShift is 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 12
  • 13. Let's get our hands dirty 13
  • 14. Create an OpenShift Account https://openshift.redhat.com/app/account/new Promo code is bangalore 14
  • 15. Installing Client Tools Install Ruby 1.8.7 or greater Install Git Install rhc OpenShift gem Refer to documentation 15
  • 16. Setup your OpenShift Environment rhc setup -l <openshift_login> 16
  • 17. Creating an OpenShift Application rhc app create -a localjobs -t jbossas-7 -d 17
  • 18. Adding MongoDB and RockMongo Cartridge rhc app cartridge add -a localjobs -c mongodb-2.0 rhc app cartridge add -a localjobs -c rockmongo-1.1 18
  • 19. Play with MongoDB running in the Cloud ssh into instance Type mongo on the shell Create a sample db Insert some documents in the collection Run some queries 19
  • 20. Let's take a look at GIT Distributed version control A local repository – on your laptop A remote repository – on some other machine, usually a server 20
  • 21. You need to understand at least 3 commands in Git 1. Git add . (means add all news files as being tracked in the local repository) 2. Git commit –am “your message” (means commit all my changes to the local repository with this message) 3. Git push (means push from your local repository to the repository on your OpenShift gear) 21
  • 22. Pulling the code from GitHub git rm -rf src pom.xml git commit -am “removed default files” git remote add localjobs -m master git://github.com/shekhargulati/localjobs.git git pull -s recursive -X theirs localjobs master 22
  • 23. Importing Data into MongoDB rhc app show -a localjobs -l <openshift_login_email> scp -r jobs-data.json <instance_ssh_access>:localjobs/data ssh <instance_ssh_access> mongoimport -d localjobs -c jobs --file jobs-data.json -u $OPENSHIFT_NOSQL_DB_USERNAME -p $OPENSHIFT_NOSQL_DB_PASSWORD -h $OPENSHIFT_NOSQL_DB_HOST -port $OPENSHIFT_NOSQL_DB_PORT db.jobs.ensureIndex({"location":"2d"}) 23
  • 24. Show some geospatial queries 24
  • 25. Deploy the code to OpenShift git push 25
  • 27. Conclusion 1. MongoDB makes it very easy to build location aware applications. 2. OpenShift is very easy to use and embraces rapid development. 3. Did I mention – Free? 4. What are you waiting for? Try it out. 27