SlideShare a Scribd company logo
1 of 80
The anatomy of
Spring Data
Bio – Maksym Govorischev
Bio
Bio
Bio
Bio
Bio
Quick agenda
Quick agenda
• Spring Data
Quick agenda
• Spring Data
• Scalability
Quick agenda
• Spring Data
• Scalability (not the one you expect)
Quick agenda
• Spring Data
• Scalability (not the one you expect)
• Evolutionary & hexagonal architecture
Quick agenda
• Spring Data
• Scalability (not the one you expect)
• Evolutionary & hexagonal architecture
• Human stupidity
Human stupidity
Simple data model
Stack
+ +
Gradle Project
Spring Boot App
Repository
Simple RESTful controller
…
Redis server
Spring Data module structure
Spring Data module structure
Redis configuration
Redis configuration
Redis configuration
Template based approach
Template based approach
Template based approach
Template based approach
Spring Data module structure
Repository based approach
Repository based approach
Repository based approach
CrudRepository API
Repository based approach
…
Repositories vs Templates
Stack
+ +
Stack
+ +
MongoDB server
MongoDB configuration
MongoDB configuration
MongoDB configuration
application.properties:
Mapping modifications
…
Mapping modifications
…
Mapping modifications
…
Repository updates
Repository updates
New functionality enabled
New functionality enabled
New functionality enabled
New functionality enabled
New functionality enabled
spring-data-commons
spring-data-mongodb
Paging and sorting support
Adding Spring Data REST
Configuring REST resource for repository
No need in controller anymore
No need in controller anymore
Repository composition
Repository composition
CdiRepository
Repository composition
CdiRepository
MongoRepositoryFactory
RepositoryFactorySupport
Repository composition
CdiRepository
MongoRepositoryFactory
RepositoryFactorySupport
RepositoryComposition
Repository composition
CdiRepository
MongoRepositoryFactory
RepositoryFactorySupport
RepositoryComposition
Base implementation
Discovered fragments
Repository composition
CdiRepository
MongoRepositoryFactory
RepositoryFactorySupport
RepositoryComposition
Base implementation
Discovered fragments
Create Dispatching Proxy
Repository composition
CdiRepository
MongoRepositoryFactory
RepositoryFactorySupport
RepositoryComposition
Base implementation
Discovered fragments
Create Dispatching Proxy
Add QueryExecutorMethodInterceptor
Repository composition
CdiRepository
MongoRepositoryFactory
RepositoryFactorySupport
RepositoryComposition
Base implementation
Discovered fragments
Create Dispatching Proxy
Add QueryExecutorMethodInterceptor
MongoQueryLookupStrategy.resolveQuery
MongoQueryLookupStrategy.resolveQuery
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct
Subject
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
Subject Predicate
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
Subject Predicate
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
TitleOrDescriptionOrderByIdAscTitleAsc
Subject Predicate
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
TitleOrDescriptionOrderByIdAscTitleAsc
Subject Predicate
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
TitleOrDescriptionOrderByIdAscTitleAsc
IdAscTitleAscTitleOrDescription
Subject Predicate
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
TitleOrDescriptionOrderByIdAscTitleAsc
IdAscTitleAscTitleOrDescription
Subject Predicate
Query method parsing – see PartTree & Part classes
findDistinctByTitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
findDistinct TitleOrDescriptionAllIgnoreCaseOrderByIdAscTitleAsc
TitleOrDescriptionOrderByIdAscTitleAsc
IdAscTitleAscTitleOrDescription
Subject Predicate
Things left untouched
• Repository customizations (partially)
• Projections
• Transactions
Summary
• Reduce time to market
• Be flexible & avoid premature design
• Hexagonal architecture
• Scale your skills
• Have fun
Thank you
maksym_govorischev
mgovorischev

More Related Content

What's hot

213 event processingtalk-deviewkorea.key
213 event processingtalk-deviewkorea.key213 event processingtalk-deviewkorea.key
213 event processingtalk-deviewkorea.key
NAVER D2
 
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
Dr.-Ing. Thomas Hartmann
 

What's hot (20)

213 event processingtalk-deviewkorea.key
213 event processingtalk-deviewkorea.key213 event processingtalk-deviewkorea.key
213 event processingtalk-deviewkorea.key
 
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
 
Elastic Stack Roadmap Deep Dive
Elastic Stack Roadmap Deep DiveElastic Stack Roadmap Deep Dive
Elastic Stack Roadmap Deep Dive
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Elasticsearch in Netflix
Elasticsearch in NetflixElasticsearch in Netflix
Elasticsearch in Netflix
 
Log analytics with ELK stack
Log analytics with ELK stackLog analytics with ELK stack
Log analytics with ELK stack
 
Circos plot
Circos plot Circos plot
Circos plot
 
Fine-grained Authorization in a Containerized World
Fine-grained Authorization in a Containerized WorldFine-grained Authorization in a Containerized World
Fine-grained Authorization in a Containerized World
 
Access Control for HTTP Operations on Linked Data
Access Control for HTTP Operations on Linked DataAccess Control for HTTP Operations on Linked Data
Access Control for HTTP Operations on Linked Data
 
Elastic search overview
Elastic search overviewElastic search overview
Elastic search overview
 
Indexing big data in the cloud
Indexing big data in the cloudIndexing big data in the cloud
Indexing big data in the cloud
 
Microservices, Continuous Delivery, and Elasticsearch at Capital One
Microservices, Continuous Delivery, and Elasticsearch at Capital OneMicroservices, Continuous Delivery, and Elasticsearch at Capital One
Microservices, Continuous Delivery, and Elasticsearch at Capital One
 
Apache Druid Vision and Roadmap
Apache Druid Vision and RoadmapApache Druid Vision and Roadmap
Apache Druid Vision and Roadmap
 
Open source log analytics
Open source log analyticsOpen source log analytics
Open source log analytics
 
Building Data Applications with Apache Druid
Building Data Applications with Apache DruidBuilding Data Applications with Apache Druid
Building Data Applications with Apache Druid
 
Voxxed Athens 2018 - Elasticsearch (R)Evolution — You Know, for Search...
Voxxed Athens 2018 - Elasticsearch (R)Evolution — You Know, for Search...Voxxed Athens 2018 - Elasticsearch (R)Evolution — You Know, for Search...
Voxxed Athens 2018 - Elasticsearch (R)Evolution — You Know, for Search...
 
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
 
Presto Summit 2018 - 07 - Lyft
Presto Summit 2018 - 07 - LyftPresto Summit 2018 - 07 - Lyft
Presto Summit 2018 - 07 - Lyft
 
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
 
Up-front Design Considerations in FHIR Data Modeling
Up-front Design Considerations in FHIR Data Modeling Up-front Design Considerations in FHIR Data Modeling
Up-front Design Considerations in FHIR Data Modeling
 

Similar to JeeConf 2018 - The anatomy of Spring Data

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Justin Smestad
 
DataFinder concepts and example: General (20100503)
DataFinder concepts and example: General (20100503)DataFinder concepts and example: General (20100503)
DataFinder concepts and example: General (20100503)
Data Finder
 
Spring 4-groovy
Spring 4-groovySpring 4-groovy
Spring 4-groovy
GR8Conf
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
Toby Samples
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
MongoDB APAC
 

Similar to JeeConf 2018 - The anatomy of Spring Data (20)

Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Graph-Based Source Code Analysis of JavaScript Repositories
Graph-Based Source Code Analysis of JavaScript Repositories Graph-Based Source Code Analysis of JavaScript Repositories
Graph-Based Source Code Analysis of JavaScript Repositories
 
Real-world software design practices when developing ASP.NET web systems by B...
Real-world software design practices when developing ASP.NET web systems by B...Real-world software design practices when developing ASP.NET web systems by B...
Real-world software design practices when developing ASP.NET web systems by B...
 
DataFinder concepts and example: General (20100503)
DataFinder concepts and example: General (20100503)DataFinder concepts and example: General (20100503)
DataFinder concepts and example: General (20100503)
 
Bermon Painter - Rapid Prototyping with Vue.js - Codemotion Rome 2019
Bermon Painter - Rapid Prototyping with Vue.js - Codemotion Rome 2019Bermon Painter - Rapid Prototyping with Vue.js - Codemotion Rome 2019
Bermon Painter - Rapid Prototyping with Vue.js - Codemotion Rome 2019
 
Spring 4-groovy
Spring 4-groovySpring 4-groovy
Spring 4-groovy
 
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB Days Silicon Valley: Building Applications with the MEAN StackMongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
 
MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behl
 
TDD with phpspec2
TDD with phpspec2TDD with phpspec2
TDD with phpspec2
 
Training institute in Bangalore
Training institute in BangaloreTraining institute in Bangalore
Training institute in Bangalore
 
Best training institute
Best training institute Best training institute
Best training institute
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
 
What's new in MongoDB 2.6
What's new in MongoDB 2.6What's new in MongoDB 2.6
What's new in MongoDB 2.6
 
Building Read Models using event streams
Building Read Models using event streamsBuilding Read Models using event streams
Building Read Models using event streams
 
Repository Pattern with c# and Entity Framework
Repository Pattern with c# and Entity FrameworkRepository Pattern with c# and Entity Framework
Repository Pattern with c# and Entity Framework
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
eBay Cloud CMS - QCon 2012 - http://yidb.org/
eBay Cloud CMS - QCon 2012 - http://yidb.org/eBay Cloud CMS - QCon 2012 - http://yidb.org/
eBay Cloud CMS - QCon 2012 - http://yidb.org/
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
 

Recently uploaded

Recently uploaded (20)

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
 
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...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
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?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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 New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

JeeConf 2018 - The anatomy of Spring Data