SlideShare una empresa de Scribd logo
1 de 21
Hands-on NoSQL  MongoDB & Spring Integration http://automateddeveloper.blogspot.com
[object Object]
Neither I, nor this presentation, are in any way affiliated with SpringSource or MongoDB
Still want more?http://automateddeveloper.blogspot.com http://www.thirdmindmedia.co.uk info@thirdmindmedia.co.uk
What is NoSQL? ,[object Object]
The NoSQL umbrella covers a range of non-relational databases, including key-value, document , wide column store and graph based databases,[object Object]
Many leading web 2.0 sites now use NoSQL implementations:Facebook – Cassandra (originally developed in-house and later open-sourced Twitter – Hadoop & Cassandra Google – BigTable Digg – Cassandra FourSquare - MongoDB
In the News 4,850% Percent increase in NoSQL jobs since November 2009 as reported by SimplyHired.com $14million Amount raised in Series C Funding last week by CouchBase  for further investment in to NoSQL solutions(Aug2011) 8TB Amount of data generated everyday in Twitter, and needs to be supported by their NoSQL solution (figure from 2010)
MongoDB ,[object Object]
Dynamic schemas, storing data in JSON style documents that allows for addition of data on the fly
Supports indexing of documents
Auto-sharding supported, providing full horizontal scaling,[object Object]
As more and more web sites need to be able to handle huge amounts of data, there will be an increased need to be able to build professional sites incorporating NoSQL solutions,[object Object]
Getting Started ,[object Object]
Only the configuration to connect an existing Spring MVC app will be covered in detail
Before proceeding, install MongoDB – full details are available: http://www.mongodb.org/display/DOCS/Quickstart
If you plan to follow the walkthrough with the source code, it is provided as an Eclipse/Maven project and uses the M2Eclipse plugin,[object Object]
Using Spring Data we can model ourdomain using POJOsand annotations.,[object Object]
@Id on any member variable to be used as an identifier for the object (must be String/int/long)
The @Id field must either be named “id”, or the annotation used in combination with a MappingConverter,[object Object]
In our Resume example, only our top level “Resume” object needs to be annotated and we will only be persisting/retrieving at this level (Document based DB makes sense for this model, as a “ResumePage” only makes sense within the context of a “Resume” and not as an object in itself)

Más contenido relacionado

Destacado

Cassandra By Example: Data Modelling with CQL3
Cassandra By Example: Data Modelling with CQL3Cassandra By Example: Data Modelling with CQL3
Cassandra By Example: Data Modelling with CQL3Eric Evans
 
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri OctavianaAplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octavianasutrioctavianasitorus
 
Aspire one series service guide
Aspire one series service guideAspire one series service guide
Aspire one series service guideSetyo Prasadja
 
Chafer, 52 Bible Doctines: Man and sin part 2
Chafer, 52 Bible Doctines: Man and sin part 2Chafer, 52 Bible Doctines: Man and sin part 2
Chafer, 52 Bible Doctines: Man and sin part 2Richard Chamberlain
 
The quality of work and health inequalities – cross-national differences
The quality of work and health inequalities –  cross-national differences �The quality of work and health inequalities –  cross-national differences �
The quality of work and health inequalities – cross-national differences sophieproject
 
Book4 unit1-lesson5
Book4 unit1-lesson5Book4 unit1-lesson5
Book4 unit1-lesson5stthomas8
 
2012 06 FGV Custo Mão de Obra Encargos Sociai Brasil
2012 06   FGV Custo Mão de Obra Encargos Sociai Brasil2012 06   FGV Custo Mão de Obra Encargos Sociai Brasil
2012 06 FGV Custo Mão de Obra Encargos Sociai BrasilSiamfesp Sindicato
 
Say little, do more.
Say little, do more.Say little, do more.
Say little, do more.SURAJ MISHRA
 
Microorganisms
MicroorganismsMicroorganisms
Microorganismssunilbhil
 

Destacado (17)

Cassandra By Example: Data Modelling with CQL3
Cassandra By Example: Data Modelling with CQL3Cassandra By Example: Data Modelling with CQL3
Cassandra By Example: Data Modelling with CQL3
 
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri OctavianaAplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
 
Lulusan SMK PI class of 2014
Lulusan SMK PI class of 2014Lulusan SMK PI class of 2014
Lulusan SMK PI class of 2014
 
Aspire one series service guide
Aspire one series service guideAspire one series service guide
Aspire one series service guide
 
Que es google docs
Que es google docsQue es google docs
Que es google docs
 
Poor Pigs
Poor PigsPoor Pigs
Poor Pigs
 
Chafer, 52 Bible Doctines: Man and sin part 2
Chafer, 52 Bible Doctines: Man and sin part 2Chafer, 52 Bible Doctines: Man and sin part 2
Chafer, 52 Bible Doctines: Man and sin part 2
 
The quality of work and health inequalities – cross-national differences
The quality of work and health inequalities –  cross-national differences �The quality of work and health inequalities –  cross-national differences �
The quality of work and health inequalities – cross-national differences
 
Yg Ini 1
Yg Ini 1Yg Ini 1
Yg Ini 1
 
工作狂日记
工作狂日记工作狂日记
工作狂日记
 
Synapseindia android apps (operating system)
Synapseindia android apps (operating system)Synapseindia android apps (operating system)
Synapseindia android apps (operating system)
 
Visual Network Analysis
Visual Network AnalysisVisual Network Analysis
Visual Network Analysis
 
Book4 unit1-lesson5
Book4 unit1-lesson5Book4 unit1-lesson5
Book4 unit1-lesson5
 
2012 06 FGV Custo Mão de Obra Encargos Sociai Brasil
2012 06   FGV Custo Mão de Obra Encargos Sociai Brasil2012 06   FGV Custo Mão de Obra Encargos Sociai Brasil
2012 06 FGV Custo Mão de Obra Encargos Sociai Brasil
 
Ususnmptn2011
Ususnmptn2011Ususnmptn2011
Ususnmptn2011
 
Say little, do more.
Say little, do more.Say little, do more.
Say little, do more.
 
Microorganisms
MicroorganismsMicroorganisms
Microorganisms
 

Último

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Último (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

MongoDB & Spring MVC Integration

  • 1. Hands-on NoSQL MongoDB & Spring Integration http://automateddeveloper.blogspot.com
  • 2.
  • 3. Neither I, nor this presentation, are in any way affiliated with SpringSource or MongoDB
  • 4. Still want more?http://automateddeveloper.blogspot.com http://www.thirdmindmedia.co.uk info@thirdmindmedia.co.uk
  • 5.
  • 6.
  • 7. Many leading web 2.0 sites now use NoSQL implementations:Facebook – Cassandra (originally developed in-house and later open-sourced Twitter – Hadoop & Cassandra Google – BigTable Digg – Cassandra FourSquare - MongoDB
  • 8. In the News 4,850% Percent increase in NoSQL jobs since November 2009 as reported by SimplyHired.com $14million Amount raised in Series C Funding last week by CouchBase for further investment in to NoSQL solutions(Aug2011) 8TB Amount of data generated everyday in Twitter, and needs to be supported by their NoSQL solution (figure from 2010)
  • 9.
  • 10. Dynamic schemas, storing data in JSON style documents that allows for addition of data on the fly
  • 12.
  • 13.
  • 14.
  • 15. Only the configuration to connect an existing Spring MVC app will be covered in detail
  • 16. Before proceeding, install MongoDB – full details are available: http://www.mongodb.org/display/DOCS/Quickstart
  • 17.
  • 18.
  • 19. @Id on any member variable to be used as an identifier for the object (must be String/int/long)
  • 20.
  • 21. In our Resume example, only our top level “Resume” object needs to be annotated and we will only be persisting/retrieving at this level (Document based DB makes sense for this model, as a “ResumePage” only makes sense within the context of a “Resume” and not as an object in itself)
  • 22. Using JPA, all three objects would be annotated “@Entity” and all could be queried as independent objects@Document public class Resume@Idprivate String id; public class ResumePage public class PageSection
  • 23.
  • 24.
  • 25.
  • 26. There is no real change in the Service or Controller Layers to the normal Spring MVC approach
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. NoSQL should be considered as another tool in the arsenal – RDBMS is not going anywhere!
  • 33.
  • 34. Feel free to drop me an email or come by to the blog and leave a comment if you have any questions or feedback