How to Use NoSQLin Enterprise Java ApplicationsPatrick BaumgartnerNoSQL Roadshow | Zürich | 26.04.2012
Agenda•   Speaker Profile•   New Demands on Data Access•   New Types of Data Stores•   Integrating NoSQL Data Stores•   Sp...
Speaker ProfilePatrick Baumgartner•   Senior Software Consultant | Partner•   VMware/SpringSource Certified Instructor (Sp...
New Demands on Data Access                  • Structured and                    unstructured data                  • Massi...
New Types of Data Stores                           5
Integrating NoSQL Data Stores #1We are not architects!                            http://www.flickr.com/photos/sakeeb/4087...
Integrating NoSQL Data Stores #2Don’t re-invent the wheel!                             http://www.flickr.com/photos/dmott9...
Integrating NoSQL Data Stores #3There is some Spring!                              http://www.springsource.org/spring-data...
Spring Data• Same goals as the Spring Framework   – Productivity improvement   – Programming model consistency   – Portabi...
Spring Data – Overview #1  Relational Databases  • JPA  • JDBC Extensions  Big Data  • Apache Hadoop  Data Grid  • GemFire...
Spring Data – Overview #2  Document Stores  • Mongo DB  • Couch DB (planned)  Graph Databases  • Neo4J  Column Stores  • H...
Spring Data – Key Features• Low level data access API abstraction   – MongoTemplate, RiakTemplate, Neo4jTemplate   – Excep...
Spring Data MongoDB – Example                                13
Spring Data MongoDB – Entity                  Stored JSON:                  { "_id" : ObjectId("4f9886290364b533b3acd4ce")...
Spring Data MongoDB – Configuration                                      15
Spring Data MongoDB – Repository                                   16
Give it a try!Use a data model which really matches to your data …                                           http://www.fl...
Q&APatrick Baumgartnerpatrick.baumgartner [at] swiftmind [dot] comhttp://www.swiftmind.com http://www.twitter.com/patbaumg...
Upcoming SlideShare
Loading in …5
×

How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich

1,723 views

Published on

Once you begin developing with NoSQL technologies you will quickly realize that accessing data stores or services often requires in-depth knowledge of proprietary APIs that are typically not designed for use in enterprise Java applications. Sooner or later you might find yourself wanting to write an abstraction layer to encapsulate those APIs and simplify your application code. Luckily such an abstraction layer already exits: Spring Data.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,723
On SlideShare
0
From Embeds
0
Number of Embeds
565
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich

  1. 1. How to Use NoSQLin Enterprise Java ApplicationsPatrick BaumgartnerNoSQL Roadshow | Zürich | 26.04.2012
  2. 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 2
  3. 3. Speaker ProfilePatrick 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 3
  4. 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 • … 4
  5. 5. New Types of Data Stores 5
  6. 6. Integrating NoSQL Data Stores #1We are not architects! http://www.flickr.com/photos/sakeeb/4087246274 6
  7. 7. Integrating NoSQL Data Stores #2Don’t re-invent the wheel! http://www.flickr.com/photos/dmott9/5921728819 7
  8. 8. Integrating NoSQL Data Stores #3There is some Spring! http://www.springsource.org/spring-data 8
  9. 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 9
  10. 10. Spring Data – Overview #1 Relational Databases • JPA • JDBC Extensions Big Data • Apache Hadoop Data Grid • GemFire HTTP • REST Key Value Stores • Redis • Riak 10
  11. 11. Spring Data – Overview #2 Document Stores • Mongo DB • Couch DB (planned) Graph Databases • Neo4J Column Stores • HBase (planned) • Cassandra (planned) Blob Stores • Amazon S3 Common Infrastructure • Commons 11
  12. 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 12
  13. 13. Spring Data MongoDB – Example 13
  14. 14. Spring Data MongoDB – Entity Stored JSON: { "_id" : ObjectId("4f9886290364b533b3acd4ce"), "_class" : "com.acme.hello.domain.Person", "name" : "Bob", "age" : 33 } 14
  15. 15. Spring Data MongoDB – Configuration 15
  16. 16. Spring Data MongoDB – Repository 16
  17. 17. Give it a try!Use a data model which really matches to your data … http://www.flickr.com/photos/juniorvelo/3267647833 17
  18. 18. Q&APatrick Baumgartnerpatrick.baumgartner [at] swiftmind [dot] comhttp://www.swiftmind.com http://www.twitter.com/patbaumgartner 18

×