SlideShare a Scribd company logo
1 of 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)

More Related Content

Viewers also liked

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
sutrioctavianasitorus
 
Aspire one series service guide
Aspire one series service guideAspire one series service guide
Aspire one series service guide
Setyo Prasadja
 
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-lesson5
stthomas8
 
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
Siamfesp Sindicato
 
Microorganisms
MicroorganismsMicroorganisms
Microorganisms
sunilbhil
 

Viewers also liked (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
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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