SlideShare une entreprise Scribd logo
1  sur  18
How to Use NoSQL
in Enterprise Java Applications




Patrick Baumgartner

NoSQL Roadshow | Zürich | 26.04.2012
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
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


                                                                3
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
New Types of Data Stores




                           5
Integrating NoSQL Data Stores #1
We are not architects!




                            http://www.flickr.com/photos/sakeeb/4087246274


                                                                        6
Integrating NoSQL Data Stores #2
Don’t re-invent the wheel!




                             http://www.flickr.com/photos/dmott9/5921728819


                                                                         7
Integrating NoSQL Data Stores #3
There is some Spring!




                              http://www.springsource.org/spring-data


                                                                   8
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
Spring Data – Overview #1

  Relational Databases
  • JPA
  • JDBC Extensions

  Big Data
  • Apache Hadoop

  Data Grid
  • GemFire

  HTTP
  • REST

  Key Value Stores
  • Redis
  • Riak

                            10
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
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
Spring Data MongoDB – Example




                                13
Spring Data MongoDB – Entity



                  Stored JSON:
                  { "_id" : ObjectId("4f9886290364b533b3acd4ce"),
                    "_class" : "com.acme.hello.domain.Person",
                    "name" : "Bob",
                    "age" : 33
                  }




                                                               14
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.flickr.com/photos/juniorvelo/3267647833


                                                                                         17
Q&A




Patrick Baumgartner
patrick.baumgartner [at] swiftmind [dot] com
http://www.swiftmind.com http://www.twitter.com/patbaumgartner


                                                            18

Contenu connexe

Tendances

A compute infrastructure for data scientists
A compute infrastructure for data scientistsA compute infrastructure for data scientists
A compute infrastructure for data scientists
Stitch Fix Algorithms
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
Shawn Jones
 
Intro to NoSQL and MongoDB
Intro to NoSQL and MongoDBIntro to NoSQL and MongoDB
Intro to NoSQL and MongoDB
DATAVERSITY
 

Tendances (20)

Unifying Events and Logs into the Cloud
Unifying Events and Logs into the CloudUnifying Events and Logs into the Cloud
Unifying Events and Logs into the Cloud
 
NOSQL vs SQL
NOSQL vs SQLNOSQL vs SQL
NOSQL vs SQL
 
Using Web Data for Finance
Using Web Data for FinanceUsing Web Data for Finance
Using Web Data for Finance
 
introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Database
 
Augmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure dataAugmenting Mongo DB with treasure data
Augmenting Mongo DB with treasure data
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDB
 
A compute infrastructure for data scientists
A compute infrastructure for data scientistsA compute infrastructure for data scientists
A compute infrastructure for data scientists
 
NoSQL for SQL Users
NoSQL for SQL UsersNoSQL for SQL Users
NoSQL for SQL Users
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDBAn Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
 
Practical Use of a NoSQL
Practical Use of a NoSQLPractical Use of a NoSQL
Practical Use of a NoSQL
 
Big Data Spain 2016: Keynote
Big Data Spain 2016: KeynoteBig Data Spain 2016: Keynote
Big Data Spain 2016: Keynote
 
MongoDB - An Agile NoSQL Database
MongoDB - An Agile NoSQL DatabaseMongoDB - An Agile NoSQL Database
MongoDB - An Agile NoSQL Database
 
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
 
Nosql database presentation
Nosql database  presentationNosql database  presentation
Nosql database presentation
 
Why Organizations are Looking at Alternative Database Technologies – Introduc...
Why Organizations are Looking at Alternative Database Technologies – Introduc...Why Organizations are Looking at Alternative Database Technologies – Introduc...
Why Organizations are Looking at Alternative Database Technologies – Introduc...
 
Appli légère avec d3.js, sinatra, elasticsearch et capucine
Appli légère avec d3.js, sinatra, elasticsearch et capucineAppli légère avec d3.js, sinatra, elasticsearch et capucine
Appli légère avec d3.js, sinatra, elasticsearch et capucine
 
Intro to NoSQL and MongoDB
Intro to NoSQL and MongoDBIntro to NoSQL and MongoDB
Intro to NoSQL and MongoDB
 
Open source data ingestion
Open source data ingestionOpen source data ingestion
Open source data ingestion
 
MongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBookMongoDB World 2016: Poster Sessions eBook
MongoDB World 2016: Poster Sessions eBook
 

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

The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
DataPad Inc.
 
NoSQL for the SQL Server Pro
NoSQL for the SQL Server ProNoSQL for the SQL Server Pro
NoSQL for the SQL Server Pro
Lynn Langit
 
SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803
Andreas Grabner
 
Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...
Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...
Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...
Lviv Startup Club
 

Similaire à How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich (20)

How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow BaselHow to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
 
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
The Last Mile: Challenges and Opportunities in Data Tools (Strata 2014)
 
End-to-End Data Pipelines with Apache Spark
End-to-End Data Pipelines with Apache SparkEnd-to-End Data Pipelines with Apache Spark
End-to-End Data Pipelines with Apache Spark
 
NoSQL for the SQL Server Pro
NoSQL for the SQL Server ProNoSQL for the SQL Server Pro
NoSQL for the SQL Server Pro
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundry
 
Coming to cassandra from relational world (New)
Coming to cassandra from relational world (New)Coming to cassandra from relational world (New)
Coming to cassandra from relational world (New)
 
CCS334 BIG DATA ANALYTICS Session 2 Types NoSQL.pptx
CCS334 BIG DATA ANALYTICS Session 2 Types NoSQL.pptxCCS334 BIG DATA ANALYTICS Session 2 Types NoSQL.pptx
CCS334 BIG DATA ANALYTICS Session 2 Types NoSQL.pptx
 
MongoDB Scalability Best Practices
MongoDB Scalability Best PracticesMongoDB Scalability Best Practices
MongoDB Scalability Best Practices
 
Augmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure DataAugmenting Mongo DB with Treasure Data
Augmenting Mongo DB with Treasure Data
 
SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDB
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
NoSQL-Overview
NoSQL-OverviewNoSQL-Overview
NoSQL-Overview
 
The What and Why of NoSql
The What and Why of NoSqlThe What and Why of NoSql
The What and Why of NoSql
 
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
 
Exploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better TogetherExploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better Together
 
Spring Data - Intro (Odessa Java TechTalks)
Spring Data - Intro (Odessa Java TechTalks)Spring Data - Intro (Odessa Java TechTalks)
Spring Data - Intro (Odessa Java TechTalks)
 
Data Day Seattle 2015: Sarah Guido
Data Day Seattle 2015: Sarah GuidoData Day Seattle 2015: Sarah Guido
Data Day Seattle 2015: Sarah Guido
 
Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...
Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...
Vitalii Bondarenko - Масштабована бізнес-аналітика у Cloud Big Data Cluster. ...
 
NoSQL Simplified: Schema vs. Schema-less
NoSQL Simplified: Schema vs. Schema-lessNoSQL Simplified: Schema vs. Schema-less
NoSQL Simplified: Schema vs. Schema-less
 

Plus de Patrick Baumgartner

No Sql in Enterprise Java Applications
No Sql in Enterprise Java ApplicationsNo Sql in Enterprise Java Applications
No Sql in Enterprise Java Applications
Patrick Baumgartner
 
Daten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4jDaten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4j
Patrick Baumgartner
 
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGiOSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
Patrick Baumgartner
 

Plus de Patrick Baumgartner (10)

Customer is king
Customer is kingCustomer is king
Customer is king
 
Neo4j Introduction (for Techies)
Neo4j Introduction (for Techies)Neo4j Introduction (for Techies)
Neo4j Introduction (for Techies)
 
No Sql in Enterprise Java Applications
No Sql in Enterprise Java ApplicationsNo Sql in Enterprise Java Applications
No Sql in Enterprise Java Applications
 
Daten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4jDaten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4j
 
BED-Con - Tools für den täglichen Kampf als Entwickler
BED-Con - Tools für den täglichen Kampf als EntwicklerBED-Con - Tools für den täglichen Kampf als Entwickler
BED-Con - Tools für den täglichen Kampf als Entwickler
 
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, OehmichenJFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
 
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGiOSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi Alltag
 
OSGi with the Spring Framework
OSGi with the Spring FrameworkOSGi with the Spring Framework
OSGi with the Spring Framework
 
Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

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

  • 1. How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zürich | 26.04.2012
  • 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. 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 3
  • 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. New Types of Data Stores 5
  • 6. Integrating NoSQL Data Stores #1 We are not architects! http://www.flickr.com/photos/sakeeb/4087246274 6
  • 7. Integrating NoSQL Data Stores #2 Don’t re-invent the wheel! http://www.flickr.com/photos/dmott9/5921728819 7
  • 8. Integrating NoSQL Data Stores #3 There is some Spring! http://www.springsource.org/spring-data 8
  • 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. 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. 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. 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. Spring Data MongoDB – Example 13
  • 14. Spring Data MongoDB – Entity Stored JSON: { "_id" : ObjectId("4f9886290364b533b3acd4ce"), "_class" : "com.acme.hello.domain.Person", "name" : "Bob", "age" : 33 } 14
  • 15. Spring Data MongoDB – Configuration 15
  • 16. Spring Data MongoDB – Repository 16
  • 17. Give it a try! Use a data model which really matches to your data … http://www.flickr.com/photos/juniorvelo/3267647833 17
  • 18. Q&A Patrick Baumgartner patrick.baumgartner [at] swiftmind [dot] com http://www.swiftmind.com http://www.twitter.com/patbaumgartner 18