How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to...
Transcript of How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to...
![Page 1: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/1.jpg)
How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner
NoSQL Roadshow | Zürich | 26.04.2012
![Page 2: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/2.jpg)
2
Agenda
• Speaker Profile • New Demands on Data Access • New Types of Data Stores • Integrating NoSQL Data Stores • Spring Data Overview • Example with MongoDB • Q & A
![Page 3: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/3.jpg)
3
Speaker Profile
Patrick Baumgartner • Senior Software Consultant | Partner • VMware/SpringSource Certified Instructor (Spring Trainer) • Spring Framework, OSGi & agile engineering practices • Co-author of „OSGi für Praktiker“ (Hanser) Swiftmind GmbH http://www.swiftmind.com
• Enterprise Java, Spring & OSGi consulting • Spring & OSGi workshops & trainings • Agile engineering practices workshops
![Page 4: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/4.jpg)
4
New Demands on Data Access
• Structured and unstructured data
• Massive amounts of data • Inexpensive horizontal
scaling • Apps and data in the
cloud • Social network features • …
![Page 5: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/5.jpg)
5
New Types of Data Stores
![Page 6: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/6.jpg)
6
We are not architects! Integrating NoSQL Data Stores #1
http://www.flickr.com/photos/sakeeb/4087246274
![Page 7: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/7.jpg)
7
Don’t re-invent the wheel! Integrating NoSQL Data Stores #2
http://www.flickr.com/photos/dmott9/5921728819
![Page 8: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/8.jpg)
8
There is some Spring! Integrating NoSQL Data Stores #3
http://www.springsource.org/spring-data
![Page 9: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/9.jpg)
9
Spring Data
• Same goals as the Spring Framework – Productivity improvement – Programming model consistency – Portability
• Umbrella for subprojects, specific to a given database • Mapping support for Java domain objects
• http://www.springsource.org/spring-data • http://github.com/SpringSource/spring-data-XXX
![Page 10: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/10.jpg)
10
Spring Data – Overview #1
• JPA • JDBC Extensions
Relational Databases
• Apache Hadoop Big Data
• GemFire Data Grid
• REST HTTP
• Redis • Riak
Key Value Stores
![Page 11: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/11.jpg)
11
Spring Data – Overview #2
• Mongo DB • Couch DB (planned)
Document Stores
• Neo4J Graph Databases
• HBase (planned) • Cassandra (planned)
Column Stores
• Amazon S3 Blob Stores
• Commons Common Infrastructure
![Page 12: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/12.jpg)
12
Spring Data – Key Features
• Low level data access API abstraction – MongoTemplate, RiakTemplate, Neo4jTemplate – Exception translation – Transaction management
• Object Mapping (Java to data store) • Generic Repository Support
– Basic CRUD, dynamic finders, pagination and sorting • Spring namespaces • Cross Store Persistence Programming Model
– @Entity, @Document, @NodeEntity
![Page 13: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/13.jpg)
13
Spring Data MongoDB – Example
![Page 14: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/14.jpg)
14
Spring Data MongoDB – Entity
Stored JSON: { "_id" : ObjectId("4f9886290364b533b3acd4ce"), "_class" : "com.acme.hello.domain.Person", "name" : "Bob", "age" : 33 }
![Page 15: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/15.jpg)
15
Spring Data MongoDB – Configuration
![Page 16: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/16.jpg)
16
Spring Data MongoDB – Repository
![Page 17: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/17.jpg)
17
Use a data model which really matches to your data … Give it a try!
http://www.flickr.com/photos/juniorvelo/3267647833
![Page 18: How to Use NoSQL - nosqlroadshow.comnosqlroadshow.com/dl/NoSQL-Road-Show/slides/Howt... · How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich](https://reader031.fdocuments.us/reader031/viewer/2022041019/5eceaa2f1f3056299e53b622/html5/thumbnails/18.jpg)
18
Q & A
Patrick Baumgartner patrick.baumgartner [at] swiftmind [dot] com http://www.swiftmind.com http://www.twitter.com/patbaumgartner