SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Spring 4.0 - Evolution
or Revolution
Dominique Bartholdi, Raffael Schmid 

Trivadis AG
“work with Java 8 and other JVM
languages (e.g. support Lambdas, …)”
“responding to, and setting trends in
(Developer Productivity), Big Data,
Cloud, REST and Micro Service
Architecture”
-Adrian Colyer, CTO Application Fabric at Pivotal
Agenda
INTRODUCTION
MODERNISATION
BIG DATA
MICRO SERVICE ARCHITECTURE
CONCLUSION
* not our focus
Introduction
INTRODUCTION
MODERNISATION
BIG DATA
MICRO SERVICE ARCHITECTURE
CONCLUSION
* not our focus
a bunch of history
2004
Spring 1.0:
“lightweight” container (DI)
AOP interception
Jdbc abstraction,
Transaction support
JPetStore, Petclinic
2006 2007
Spring 2.0:
bean configuration
dialects (make
common tasks
easier)
Spring 2.5:
reduce XML based
configuration
custom namespaces
Spring 3.0:
task scheduling, …
with annotation
support
REST web apps
JEE features
Spring 4.0 / Spring IO

(Yummy Noodle Bar)
20132009
Platform Overview
Core
Framework Security Groovy Reactor
Relational Non-Relational
Data
Integration Batch Big DataWeb
Workload

Types
Execution
Spring XD Spring Boot Grails
*
Modernisation Big Data
*
* *
Micro Services

(Developer Productivity)
Spring 4.0
Spring 4.0
INTRODUCTION
MODERNISATION
BIG DATA
MICRO SERVICE ARCHITECTURE
CONCLUSION
* not our focus
Java 8 Lambdas
with Spring's JdbcTemplate
JdbcTemplate jt = new JdbcTemplate();
jt.query(QUERY, new PreparedStatementSetter() {
@Override

public void setValues(PreparedStatement ps) throws SQLException {
ps.setString(1, “Sales");

}
}, new RowMapper<Person>() {
@Override

public Person mapRow(ResultSet rs, int rowNum) throws SQLException {

return new Person(rs.getString(1), rs.getInt(2));

}

});
Java 8 Lambdas
with Spring's JdbcTemplate
JdbcTemplate jt = new JdbcTemplate(dataSource);
jt.query( QUERY, 

ps -> ps.setString(1, “Sales"), 

(rs, row) -> new Person(rs.getString(1), rs.getInt(2))

);
JSR 310: 

Date & Time
public class Customer {
@DateTimeFormat(iso=ISO.DATE) //default

private LocalDate birthDate;
@DateTimeFormat(pattern="M/d/yy h:mm")

private LocalDateTime lastContact;

…

}
Generics-based
Injection Matching
@Service

public class BookService {
@Autowired

public BookService(Repository<Book> repo) {
...
}
}
Generics-based
Injection Matching
@Bean

public Repository<Book> bookRepository() {
return new BookRepositoryImpl();
}
Web Sockets
@Configuration

@EnableWebSocket

public class MyWebSocketConfig implements WebSocketConfigurer {
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
WebSocketHandler echoHandler = new EchoHandler();

registry.addHandler(echoHandler, "/echo").withSockJS();
}
}
public interface WebSocketHandler {
void handleMessage(WebSocketSession s, WebSocketMessage<?> m);
}
and many more…
Conditional Bean definitions
@Conditional
@Autowired @Lazy on injection
points
@Order injection of arrays and lists
Groovy style Spring configs
BIG DATA
INTRODUCTION
MODERNISATION
BIG DATA
MICRO SERVICE ARCHITECTURE
CONCLUSION
-Pivotal
“Spring XD (Extreme Data) is a
unified, distributed, and extensible
service for data ingestion, real
time analytics, batch

processing, and data export.”
Spring XD
Spring XD
Combining established Spring
Technology: Spring Integration, Spring
Batch and Spring Data
Providing a scalable container
architecture
Domain Specific Language (DSL) for
configuration
Single vs
Distributed
XD Admin
XD Container
Module
Module
XD Admin
XD Container
Module
Module
XD Container
Module
Module
single node distributed nodes
in-memory
rabbit or redis
from source to sink
Sources
TAP Real time
analytics
Processor Sink Storage
Batch Jobs
STREAM
JOBS
Sources
- HTTP
- Tail
- File
- Mail
- Twitter Search
- Twitter Stream
- Gemfire
- Gemfire CQ
- Syslog
- TCP
- TCP Client
- JMS
- RabbitMQ
- Time
- MQTT
Stream Config
Create the stream

xd:> stream create --definition "HTTP | file"
--name mystream
use pipe (|) to connect source “HTTP” to
sink “file”
set name of stream to “mystream”
Remove the stream

xd:> stream destroy —name mystream
Spring XD Demo
twitter
stream
log
language
counter
tweet counter
stream create tweets --definition

"twitterstream | log”
stream create tweetcount --definition

"tap:stream:tweets > aggregatecounter”
stream create tweetlang --definition 

"tap:stream:tweets > field-value-counter --fieldName=lang"
MICRO SERVICE
ARCHITECTURE
INTRODUCTION
MODERNISATION
BIG DATA
MICRO SERVICE ARCHITECTURE
CONCLUSION
What’s exactly a MICRO
SERVICE ARCHITECTURE?
Develop a single application as suite of
small services
Organise services around business
capabilities (not technologies)
Smart endpoints, dumb pipes (less BPEL,
more REST)
Services do one thing (small enough to
throw away, fit into the head)
* http://martinfowler.com/articles/microservices.html
MICRO SERVICE vs.
monolithic architecture
* http://martinfowler.com/articles/microservices.html
functionality in one
single process
scaling by
replicating the
monolith
a micro architecture puts
each functionality into a
service
scaling by
distributing
services
Objectives for
MICRO SERVICES
simple packaging (executable jar) ->
embedded web containers
monitoring, expose insights
fast instantiation
polyglot persistence (SQL, NoSQL)
…
Spring Boot comes into
play
Spring Boot makes it easy to create stand-alone (Spring
based) applications that you can “just run”
Radically faster getting started experience
Well defined set of dependencies
Auto-configuration
“Non-functional” features out of the box
Metrics, Counters, Monitoring with Actuator
SSH access through remote shell
Spring Boot by
Example
Spring Boot
Conclusion
Not production-ready yet (version 1.0.0
still RC 5), but surprisingly stable
Packaging not only JAR
Will influence a bunch of other Spring
Projects (e.g. Spring XD, Roo, etc.)
Perfect tool for quickly building Spring
based applications
CONCLUSION
INTRODUCTION
MODERNISATION
BIG DATA
MICRO SERVICE ARCHITECTURE
CONCLUSION
* not our focus
Overall
Spring 4.0 evolved over the last
years
Spring IO most probably a
revolutionary approach (not only in
terms of marketing)
Questions
Dominique Bartholdi

emaiL: dominique.bartholdi@trivadis.com
!
Raffael Schmid

emaiL: raffael.schmid@trivadis.com

Contenu connexe

Tendances

Cloud Compiler
Cloud Compiler Cloud Compiler
Cloud Compiler
Being Topper
 

Tendances (20)

Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in Containers
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
Spring framework core
Spring framework coreSpring framework core
Spring framework core
 
Cloud Compiler
Cloud Compiler Cloud Compiler
Cloud Compiler
 
Building microservices sample application
Building microservices sample applicationBuilding microservices sample application
Building microservices sample application
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
Contributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 GalaxyContributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 Galaxy
 
Next stop: Spring 4
Next stop: Spring 4Next stop: Spring 4
Next stop: Spring 4
 
2020-02-10 Java on Azure Solution Briefing
2020-02-10 Java on Azure Solution Briefing2020-02-10 Java on Azure Solution Briefing
2020-02-10 Java on Azure Solution Briefing
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
 
Introduction to Reactive Microservices Architecture.
Introduction to Reactive Microservices Architecture.Introduction to Reactive Microservices Architecture.
Introduction to Reactive Microservices Architecture.
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC framework
 

En vedette

Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplate
Guo Albert
 
UCMDB _Predictive Change Impact Analysis circa 2009
UCMDB _Predictive Change Impact Analysis circa 2009UCMDB _Predictive Change Impact Analysis circa 2009
UCMDB _Predictive Change Impact Analysis circa 2009
djasso7494
 

En vedette (20)

Spring Boot Lightning Talk
Spring Boot Lightning TalkSpring Boot Lightning Talk
Spring Boot Lightning Talk
 
Microservices - Peixe Urbano Tech Talks
Microservices - Peixe Urbano Tech TalksMicroservices - Peixe Urbano Tech Talks
Microservices - Peixe Urbano Tech Talks
 
Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplate
 
Microservices pros and cons
Microservices pros and consMicroservices pros and cons
Microservices pros and cons
 
Spring Data - Intro (Odessa Java TechTalks)
Spring Data - Intro (Odessa Java TechTalks)Spring Data - Intro (Odessa Java TechTalks)
Spring Data - Intro (Odessa Java TechTalks)
 
UCMDB _Predictive Change Impact Analysis circa 2009
UCMDB _Predictive Change Impact Analysis circa 2009UCMDB _Predictive Change Impact Analysis circa 2009
UCMDB _Predictive Change Impact Analysis circa 2009
 
Ucmdb DDM and DDMA
Ucmdb DDM and DDMAUcmdb DDM and DDMA
Ucmdb DDM and DDMA
 
Spring Framework - Data Access
Spring Framework - Data AccessSpring Framework - Data Access
Spring Framework - Data Access
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Microservices vs monolithic
Microservices vs monolithicMicroservices vs monolithic
Microservices vs monolithic
 
Microservices the Good Bad and the Ugly
Microservices the Good Bad and the UglyMicroservices the Good Bad and the Ugly
Microservices the Good Bad and the Ugly
 
BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
 
Enterprise, Architecture and IoT
Enterprise, Architecture and IoTEnterprise, Architecture and IoT
Enterprise, Architecture and IoT
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Accenture Liquid Application Studio
Accenture Liquid Application StudioAccenture Liquid Application Studio
Accenture Liquid Application Studio
 
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
From a monolith to microservices + REST: The evolution of LinkedIn's architec...From a monolith to microservices + REST: The evolution of LinkedIn's architec...
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
 
Java EE and Spring Side-by-Side
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-Side
 

Similaire à Spring 4.0 - Evolution or Revolution

Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
Денис Резник
 

Similaire à Spring 4.0 - Evolution or Revolution (20)

Top 8 WCM Trends 2010
Top 8 WCM Trends 2010Top 8 WCM Trends 2010
Top 8 WCM Trends 2010
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java Developers
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
 
Lesson learns from Japan cloud trend
Lesson learns from Japan cloud trendLesson learns from Japan cloud trend
Lesson learns from Japan cloud trend
 
DICE & Cloudify – Quality Big Data Made Easy
DICE & Cloudify – Quality Big Data Made EasyDICE & Cloudify – Quality Big Data Made Easy
DICE & Cloudify – Quality Big Data Made Easy
 
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
 
Big Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI MobileBig Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI Mobile
 
Serverless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat SystemServerless by Example: Building a Real-Time Chat System
Serverless by Example: Building a Real-Time Chat System
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Automated Multiplatform Compilation and Validation of a Collaborative Reposit...
Automated Multiplatform Compilation and Validation of a Collaborative Reposit...Automated Multiplatform Compilation and Validation of a Collaborative Reposit...
Automated Multiplatform Compilation and Validation of a Collaborative Reposit...
 
Dataservices: Processing Big Data the Microservice Way
Dataservices: Processing Big Data the Microservice WayDataservices: Processing Big Data the Microservice Way
Dataservices: Processing Big Data the Microservice Way
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Spark meets Spring
Spark meets SpringSpark meets Spring
Spark meets Spring
 
Aspnet
AspnetAspnet
Aspnet
 
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
 
Data In Cloud
Data In CloudData In Cloud
Data In Cloud
 
Cloud-based Data Lake for Analytics and AI
Cloud-based Data Lake for Analytics and AICloud-based Data Lake for Analytics and AI
Cloud-based Data Lake for Analytics and AI
 
[AWSKRUG 아키텍처 모임] 세일즈부스트 인프라스트럭처 사례 공유
[AWSKRUG 아키텍처 모임] 세일즈부스트 인프라스트럭처 사례 공유[AWSKRUG 아키텍처 모임] 세일즈부스트 인프라스트럭처 사례 공유
[AWSKRUG 아키텍처 모임] 세일즈부스트 인프라스트럭처 사례 공유
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Dernier (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 

Spring 4.0 - Evolution or Revolution

  • 1. Spring 4.0 - Evolution or Revolution Dominique Bartholdi, Raffael Schmid 
 Trivadis AG
  • 2. “work with Java 8 and other JVM languages (e.g. support Lambdas, …)” “responding to, and setting trends in (Developer Productivity), Big Data, Cloud, REST and Micro Service Architecture” -Adrian Colyer, CTO Application Fabric at Pivotal
  • 3. Agenda INTRODUCTION MODERNISATION BIG DATA MICRO SERVICE ARCHITECTURE CONCLUSION * not our focus
  • 4. Introduction INTRODUCTION MODERNISATION BIG DATA MICRO SERVICE ARCHITECTURE CONCLUSION * not our focus
  • 5. a bunch of history 2004 Spring 1.0: “lightweight” container (DI) AOP interception Jdbc abstraction, Transaction support JPetStore, Petclinic 2006 2007 Spring 2.0: bean configuration dialects (make common tasks easier) Spring 2.5: reduce XML based configuration custom namespaces Spring 3.0: task scheduling, … with annotation support REST web apps JEE features Spring 4.0 / Spring IO
 (Yummy Noodle Bar) 20132009
  • 6. Platform Overview Core Framework Security Groovy Reactor Relational Non-Relational Data Integration Batch Big DataWeb Workload
 Types Execution Spring XD Spring Boot Grails * Modernisation Big Data * * * Micro Services
 (Developer Productivity) Spring 4.0
  • 7. Spring 4.0 INTRODUCTION MODERNISATION BIG DATA MICRO SERVICE ARCHITECTURE CONCLUSION * not our focus
  • 8. Java 8 Lambdas with Spring's JdbcTemplate JdbcTemplate jt = new JdbcTemplate(); jt.query(QUERY, new PreparedStatementSetter() { @Override
 public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, “Sales");
 } }, new RowMapper<Person>() { @Override
 public Person mapRow(ResultSet rs, int rowNum) throws SQLException {
 return new Person(rs.getString(1), rs.getInt(2));
 }
 });
  • 9. Java 8 Lambdas with Spring's JdbcTemplate JdbcTemplate jt = new JdbcTemplate(dataSource); jt.query( QUERY, 
 ps -> ps.setString(1, “Sales"), 
 (rs, row) -> new Person(rs.getString(1), rs.getInt(2))
 );
  • 10. JSR 310: 
 Date & Time public class Customer { @DateTimeFormat(iso=ISO.DATE) //default
 private LocalDate birthDate; @DateTimeFormat(pattern="M/d/yy h:mm")
 private LocalDateTime lastContact;
 …
 }
  • 11. Generics-based Injection Matching @Service
 public class BookService { @Autowired
 public BookService(Repository<Book> repo) { ... } }
  • 12. Generics-based Injection Matching @Bean
 public Repository<Book> bookRepository() { return new BookRepositoryImpl(); }
  • 13. Web Sockets @Configuration
 @EnableWebSocket
 public class MyWebSocketConfig implements WebSocketConfigurer { public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { WebSocketHandler echoHandler = new EchoHandler();
 registry.addHandler(echoHandler, "/echo").withSockJS(); } } public interface WebSocketHandler { void handleMessage(WebSocketSession s, WebSocketMessage<?> m); }
  • 14. and many more… Conditional Bean definitions @Conditional @Autowired @Lazy on injection points @Order injection of arrays and lists Groovy style Spring configs
  • 15. BIG DATA INTRODUCTION MODERNISATION BIG DATA MICRO SERVICE ARCHITECTURE CONCLUSION
  • 16. -Pivotal “Spring XD (Extreme Data) is a unified, distributed, and extensible service for data ingestion, real time analytics, batch
 processing, and data export.” Spring XD
  • 17. Spring XD Combining established Spring Technology: Spring Integration, Spring Batch and Spring Data Providing a scalable container architecture Domain Specific Language (DSL) for configuration
  • 18. Single vs Distributed XD Admin XD Container Module Module XD Admin XD Container Module Module XD Container Module Module single node distributed nodes in-memory rabbit or redis
  • 19. from source to sink Sources TAP Real time analytics Processor Sink Storage Batch Jobs STREAM JOBS
  • 20. Sources - HTTP - Tail - File - Mail - Twitter Search - Twitter Stream - Gemfire - Gemfire CQ - Syslog - TCP - TCP Client - JMS - RabbitMQ - Time - MQTT
  • 21. Stream Config Create the stream
 xd:> stream create --definition "HTTP | file" --name mystream use pipe (|) to connect source “HTTP” to sink “file” set name of stream to “mystream” Remove the stream
 xd:> stream destroy —name mystream
  • 22. Spring XD Demo twitter stream log language counter tweet counter stream create tweets --definition
 "twitterstream | log” stream create tweetcount --definition
 "tap:stream:tweets > aggregatecounter” stream create tweetlang --definition 
 "tap:stream:tweets > field-value-counter --fieldName=lang"
  • 24. What’s exactly a MICRO SERVICE ARCHITECTURE? Develop a single application as suite of small services Organise services around business capabilities (not technologies) Smart endpoints, dumb pipes (less BPEL, more REST) Services do one thing (small enough to throw away, fit into the head) * http://martinfowler.com/articles/microservices.html
  • 25. MICRO SERVICE vs. monolithic architecture * http://martinfowler.com/articles/microservices.html functionality in one single process scaling by replicating the monolith a micro architecture puts each functionality into a service scaling by distributing services
  • 26. Objectives for MICRO SERVICES simple packaging (executable jar) -> embedded web containers monitoring, expose insights fast instantiation polyglot persistence (SQL, NoSQL) …
  • 27. Spring Boot comes into play Spring Boot makes it easy to create stand-alone (Spring based) applications that you can “just run” Radically faster getting started experience Well defined set of dependencies Auto-configuration “Non-functional” features out of the box Metrics, Counters, Monitoring with Actuator SSH access through remote shell
  • 29. Spring Boot Conclusion Not production-ready yet (version 1.0.0 still RC 5), but surprisingly stable Packaging not only JAR Will influence a bunch of other Spring Projects (e.g. Spring XD, Roo, etc.) Perfect tool for quickly building Spring based applications
  • 30. CONCLUSION INTRODUCTION MODERNISATION BIG DATA MICRO SERVICE ARCHITECTURE CONCLUSION * not our focus
  • 31. Overall Spring 4.0 evolved over the last years Spring IO most probably a revolutionary approach (not only in terms of marketing)