bringing some spatial love to your application with openshift - mongo berlin presentation by marek...

13
1 Bringing Some Spatial Love to your Application Marek Jelen PaaS Evangelist, Red Hat

Upload: openshift-origin

Post on 12-May-2015

625 views

Category:

Technology


1 download

DESCRIPTION

Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

TRANSCRIPT

Page 1: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

1

Bringing Some Spatial Love to your Application

Marek JelenPaaS Evangelist, Red Hat

Page 2: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

2

Agenda• Learn a bit of spatial• See the code• Use it on server• MAKE YOU A ROCKSTAR!!

Page 3: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

3

i. familiar with the command line

ii. familiar with MongoDB command line

iii. Questions are not good!

iv. Questions are awesome!

Expectations

Page 4: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

4

What is OpenShift?

Red Hat's free, auto-scaling Platform as a Service (PaaS) for applications in the cloud.

Page 5: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

5

Kind of like Amazon, right? Nope.

Page 6: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

6

What’s supported?

Page 7: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

7

Looks great, but what’s the catch?

• OpenShift is free-as-in-beer & free-as-in-freedom • Three times 0.5GB RAM/1GB storage • Need more resources, just ask!• We are in Developer Preview• Sign up at openshift.com• Promo code: MongoDBBerlin

Page 8: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

8

On to Spatial and MongoDBOn to Spatial and MongoDB

Page 9: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

9

The spatial functionality MongoDB provides

1) near

2) within

All of it is laid out on one page:http://www.mongodb.org/display/DOCS/Geospatial+Indexing

First link on Google for “MongoDB spatial indexing”

Spatial is fun!

Page 10: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

10

1) Put your coordinates into the document{ loc : [ 50 , 30 ] } //SUGGESTED OPTION

{ loc : { x : 50 , y : 30 } }

{ loc : { foo : 50 , y : 30 } }

{ loc : { lon : 40.739037, lat: 73.992964 } }

2) Make a 2d indexdb.places.ensureIndex( { loc : "2d" } )

How to make it work

Page 11: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

11

1. Demo MongoDB command line

2. Demo the expected result

3. Create an OpenShift application

4. Import the code from Github• https://github.com/openshift-quickstart/spatial-ruby-openshift-quickstart

5. Demo the deployed application

Demo

Page 12: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

12

1. Spatial is easy and fun on MongoDB!

2. You can now build your own FourSquare

3. You can build and deploy your application quickly without having to think about infrastructure.

4. Sign up for OpenShift with “MongoDBBerlin” promo code

5. Come to talk to the table

Conclusion

Page 13: Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin Presentation by Marek Jelen

13

[email protected]@marek_jelen

http://openshift.redhat.com

https://github.com/openshift-quickstart/spatial-ruby-openshift-quickstart