SlideShare a Scribd company logo
Josh Long (⻰龙之春)
@starbuxman
jlong@gopivotal.com
slideshare.net/joshlong
github.com/joshlong
http://spring.io


MICROSERVICES
BOOTIFUL
@starbuxman
Spring Developer Advocate
Josh Long (⻰龙之春)
@starbuxman josh.long@springsource.com|
Jean Claude
van Damme! Java mascot Duke some thing’s I’ve authored...
@starbuxman
@starbuxman
@starbuxman
@starbuxman
WEB
Controllers, REST,

WebSocket
INTEGRATION
Channels, Adapters,

Filters, Transformers
BATCH
Jobs, Steps,

Readers, Writers
BIG DATA
Ingestion, Export,

Orchestration, Hadoop
DATA
NON-RELATIONALRELATIONAL
CORE
GROOVYFRAMEWORK SECURITY REACTOR
GRAILS
Full-stack, Web
XD
Stream, Taps, Jobs
BOOT
Bootable, Minimal, Ops-Ready
@starbuxman
Microservices - just SOA redux? 



What does the DRY principle, microservices, SOA, and
Unix command line tools have in common? 



They promote singly-focused*, loosely-connected
systems
In object-oriented programming, the single responsibility principle states that every class
should have a single responsibility, and that responsibility should be entirely encapsulated by the
class. All its services should be narrowly aligned with that responsibility.!
*
http://en.wikipedia.org/wiki/Single_responsibility_principle
@starbuxman
Singly focused? 



Do as little as possible.
Express and expose a service, isolated and
encapsulated. 



@starbuxman
How do you expose a service? 

How do you do so simply?

Title Text
@starbuxman
…when somebody
says SOAP is
“SIMPLE”
@starbuxman
REST has no hard and fast rules.
REST is an architectural style, not a standard.
REST uses Headers to describe requests & responses
REST embraces HTTP verbs. (DRY)
@starbuxman
status codes convey the result of the server’s attempt to
satisfy the request. 



Categories:
1xx: informational

2xx: success

3xx: redirection

4xx: client error 

5xx: server error 

@starbuxman
The Richardson Maturity Model is a way to grade your
API according to the REST constraints with 4 levels of
increasing compliance
!
http://martinfowler.com/articles/richardsonMaturityModel.html
@starbuxman
The Richardson Maturity Model 



Level 0: swamp of POX

http://martinfowler.com/articles/richardsonMaturityModel.html
Uses HTTP mainly as a tunnel through one URI

e.g., SOAP, XML-RPC



Usually features on HTTP verb (POST)

@starbuxman
The Richardson Maturity Model 



Level 1: resources

http://martinfowler.com/articles/richardsonMaturityModel.html
Multiple URIs to distinguish related nouns 

e.g., /articles/1, /articles/2, vs. just /articles



@starbuxman
The Richardson Maturity Model 



Level 2: HTTP verbs

http://martinfowler.com/articles/richardsonMaturityModel.html
leverage transport-native properties to enhance service 

e.g., HTTP GET and PUT and DELETE and POST



Uses idiomatic HTTP controls like status codes, headers 

Demonstration
Our first @RestController
Demonstration
What about headers and status codes??
@starbuxman
The Richardson Maturity Model 



Level 3: Hypermedia Controls (aka, HATEOAS)

http://martinfowler.com/articles/richardsonMaturityModel.html
No a priori knowledge of service required

Navigation options are provided by service and hypermedia controls



Promotes longevity through a uniform interface



@starbuxman
Links provide possible navigations from a given resource
!
Links are dynamic, based on resource state.
!
<link href=“http://...:8080/users/232/customers” 

rel= “customers”/>
Demonstration
Working with Hypermedia and 

Spring HATEOAS
@starbuxman
Security is hard. Don’t reinvent
the wheel!
!
Things to worry about when developing
web applications? EVERYTHING
!
(cross-site scripting, session fixation, identification,
authorization, and authentication, encryption, and SO
much more.)
@starbuxman
Usernames and Passwords
!
If you can trust the client to keep a secret like a password, then it
can send the password using:


...HTTP Basic - passwords are sent plaintext!
... HTTP Digest - hashed passwords, but still plaintext.


SSL/TLS encryption helps prevent man-in-the-middle attacks
@starbuxman
Tim Bray says: Passwords don’t scale
!
Too easy to compromise.
!
Updating all your clients whenever you change
your password would be a nightmare!
!
@starbuxman
OAuth is a way for one (automated) client to securely identify
itself to another service
!
Assumes a user context:
!
“I authorize $CLIENTX to act on $USER_Y’s behalf”
!
OAuth is a way of authorizing a client with particular access (scopes)
!
@starbuxman
@starbuxman
@starbuxman
Demonstration
OAuth
@starbuxman
So, SSL/TLS is...?
!
an implementation of public key
cryptography:
!
!
!
public key cryptography only works because we
all agree to trust well known root CAs
so trust!
wow
@starbuxman
SSL/TLS is used routinely to verify the identify of servers.
!
Normally, the client confirms the server, but the server rarely requires the
client to transmit a certificate.
!
It’s easy enough to setup SSL/TLS on your web server.
!
@starbuxman
from “Release It!”: feature complete != production ready
!
A microservice needs to be able to slot into a system’s monitoring,
management, and other infrastructure
!
How do you add health checks?
!
JMX support? Analytics like Graphite?
Demonstration
Designing (or configuring!) for production
@starbuxman
What about routing? Load balancing? Enter the smart
service host, or, PaaS
!
You don’t want to handle this in your code.
!
You could build a platform that handles these things for you like Netflix,
Foursquare, eBay, Google and others did.
!
Or you could simply use a Platform-as-a-Service, like 

Cloud Foundry, Heroku, OpenShift, or Azure
SPRING WORKS WELL IN THE CLOUD
@starbuxman
Questions?
References
spring.io
github.com/joshlong/bookmarks
github.com/joshlong/boot-it-up
github.com/joshlong/boot-examples
docs.spring.io/spring-boot/
! Josh Long (⻰龙之春)
@starbuxman
jlong@gopivotal.com
slideshare.net/joshlong
github.com/joshlong
http://spring.io

More Related Content

PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Matt Raible
 
PDF
Introduction to Spring Boot
Trey Howard
 
PDF
Java REST API Framework Comparison - UberConf 2021
Matt Raible
 
PDF
Spring boot introduction
Rasheed Waraich
 
PDF
REST APIs with Spring
Joshua Long
 
PDF
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Joshua Long
 
PDF
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Matt Raible
 
PDF
Economies of Scaling Software
Joshua Long
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Matt Raible
 
Introduction to Spring Boot
Trey Howard
 
Java REST API Framework Comparison - UberConf 2021
Matt Raible
 
Spring boot introduction
Rasheed Waraich
 
REST APIs with Spring
Joshua Long
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Joshua Long
 
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Matt Raible
 
Economies of Scaling Software
Joshua Long
 

What's hot (20)

PPT
Spring Boot in Action
Alex Movila
 
PPTX
Spring Boot & WebSocket
Ming-Ying Wu
 
PPTX
Spring Boot Tutorial
Naphachara Rattanawilai
 
PDF
Spring Boot and Microservices
seges
 
PPTX
Spring Boot and REST API
07.pallav
 
ODP
Xke spring boot
sourabh aggarwal
 
PDF
Have You Seen Spring Lately?
Joshua Long
 
PDF
Rest with Spring
Eugen Paraschiv
 
PDF
Spring boot
Bhagwat Kumar
 
PDF
Building a Spring Boot Application - Ask the Audience!
🎤 Hanno Embregts 🎸
 
PPTX
Introduction to spring boot
Santosh Kumar Kar
 
PPTX
Spring boot - an introduction
Jonathan Holloway
 
PDF
Sails.js Intro
Nicholas Jansma
 
PDF
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Shekhar Gulati
 
PDF
Spring Boot
Pei-Tang Huang
 
PDF
Spring Boot
HongSeong Jeon
 
PDF
Spring Boot
Jaran Flaath
 
PPTX
How to customize Spring Boot?
GilWon Oh
 
PDF
Introduction to Spring Boot!
Jakub Kubrynski
 
PPTX
Making Watir and Cucumber an efficient tool for Web UI Automation
Ruslan Strazhnyk
 
Spring Boot in Action
Alex Movila
 
Spring Boot & WebSocket
Ming-Ying Wu
 
Spring Boot Tutorial
Naphachara Rattanawilai
 
Spring Boot and Microservices
seges
 
Spring Boot and REST API
07.pallav
 
Xke spring boot
sourabh aggarwal
 
Have You Seen Spring Lately?
Joshua Long
 
Rest with Spring
Eugen Paraschiv
 
Spring boot
Bhagwat Kumar
 
Building a Spring Boot Application - Ask the Audience!
🎤 Hanno Embregts 🎸
 
Introduction to spring boot
Santosh Kumar Kar
 
Spring boot - an introduction
Jonathan Holloway
 
Sails.js Intro
Nicholas Jansma
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Shekhar Gulati
 
Spring Boot
Pei-Tang Huang
 
Spring Boot
HongSeong Jeon
 
Spring Boot
Jaran Flaath
 
How to customize Spring Boot?
GilWon Oh
 
Introduction to Spring Boot!
Jakub Kubrynski
 
Making Watir and Cucumber an efficient tool for Web UI Automation
Ruslan Strazhnyk
 
Ad

Similar to Microservices with Spring Boot (20)

PPTX
Spring Test Framework
GlobalLogic Ukraine
 
PPTX
RESTful Web Services
Gordon Dickens
 
PDF
Facebook & Twitter API
Fabrice Delhoste
 
KEY
Multi client Development with Spring
Joshua Long
 
PPTX
Rest presentation
srividhyau
 
PPTX
Party + REST = Win
Jimmy Sieben
 
PPTX
Restful webservice
Dong Ngoc
 
PDF
Securty Testing For RESTful Applications
Source Conference
 
PDF
Exploring REST Purity and Pragmatism
WSO2
 
PDF
Exploring REST Purity and Pragmatism - Tuesday, November 6, 2012
WSO2
 
PDF
Spring MVC to iOS and the REST
Roy Clarkson
 
PDF
wsadddddddddddddddddeb-servsdddddddddddaaaaaaaice.pdf
PrincessMonicaCostel
 
PDF
What is REST?
Saeid Zebardast
 
PDF
Rest ful tools for lazy experts
ColdFusionConference
 
PDF
RESTFul Tools For Lazy Experts - CFSummit 2016
Ortus Solutions, Corp
 
PPTX
RESTful Web Services.pptxbnbjmgbjbvvhvhj
rani marri
 
PDF
ReST Vs SOA(P) ... Yawn
ozten
 
PDF
Implementing Microservices Security Patterns & Protocols with Spring
VMware Tanzu
 
PDF
Building Next-Gen Web Applications with the Spring 3 Web Stack
Jeremy Grelle
 
PPTX
Unit 3_detailed_automotiving_mobiles.pptx
VijaySasanM21IT
 
Spring Test Framework
GlobalLogic Ukraine
 
RESTful Web Services
Gordon Dickens
 
Facebook & Twitter API
Fabrice Delhoste
 
Multi client Development with Spring
Joshua Long
 
Rest presentation
srividhyau
 
Party + REST = Win
Jimmy Sieben
 
Restful webservice
Dong Ngoc
 
Securty Testing For RESTful Applications
Source Conference
 
Exploring REST Purity and Pragmatism
WSO2
 
Exploring REST Purity and Pragmatism - Tuesday, November 6, 2012
WSO2
 
Spring MVC to iOS and the REST
Roy Clarkson
 
wsadddddddddddddddddeb-servsdddddddddddaaaaaaaice.pdf
PrincessMonicaCostel
 
What is REST?
Saeid Zebardast
 
Rest ful tools for lazy experts
ColdFusionConference
 
RESTFul Tools For Lazy Experts - CFSummit 2016
Ortus Solutions, Corp
 
RESTful Web Services.pptxbnbjmgbjbvvhvhj
rani marri
 
ReST Vs SOA(P) ... Yawn
ozten
 
Implementing Microservices Security Patterns & Protocols with Spring
VMware Tanzu
 
Building Next-Gen Web Applications with the Spring 3 Web Stack
Jeremy Grelle
 
Unit 3_detailed_automotiving_mobiles.pptx
VijaySasanM21IT
 
Ad

More from Joshua Long (20)

PDF
Bootiful Code with Spring Boot
Joshua Long
 
PDF
Boot It Up
Joshua Long
 
PDF
Java Configuration Deep Dive with Spring
Joshua Long
 
PDF
the Spring Update from JavaOne 2013
Joshua Long
 
PDF
the Spring 4 update
Joshua Long
 
PDF
Extending spring
Joshua Long
 
PDF
The spring 32 update final
Joshua Long
 
KEY
Multi Client Development with Spring
Joshua Long
 
KEY
Integration and Batch Processing on Cloud Foundry
Joshua Long
 
KEY
using Spring and MongoDB on Cloud Foundry
Joshua Long
 
PDF
Spring in-the-cloud
Joshua Long
 
KEY
Multi Client Development with Spring
Joshua Long
 
KEY
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
Joshua Long
 
KEY
A Walking Tour of (almost) all of Springdom
Joshua Long
 
KEY
Spring Batch Behind the Scenes
Joshua Long
 
KEY
Cloud Foundry Bootcamp
Joshua Long
 
KEY
Spring in the Cloud - using Spring with Cloud Foundry
Joshua Long
 
PPT
Spring and Cloud Foundry; a Marriage Made in Heaven
Joshua Long
 
PPT
Spring 3.1: a Walking Tour
Joshua Long
 
PDF
Extending Spring for Custom Usage
Joshua Long
 
Bootiful Code with Spring Boot
Joshua Long
 
Boot It Up
Joshua Long
 
Java Configuration Deep Dive with Spring
Joshua Long
 
the Spring Update from JavaOne 2013
Joshua Long
 
the Spring 4 update
Joshua Long
 
Extending spring
Joshua Long
 
The spring 32 update final
Joshua Long
 
Multi Client Development with Spring
Joshua Long
 
Integration and Batch Processing on Cloud Foundry
Joshua Long
 
using Spring and MongoDB on Cloud Foundry
Joshua Long
 
Spring in-the-cloud
Joshua Long
 
Multi Client Development with Spring
Joshua Long
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
Joshua Long
 
A Walking Tour of (almost) all of Springdom
Joshua Long
 
Spring Batch Behind the Scenes
Joshua Long
 
Cloud Foundry Bootcamp
Joshua Long
 
Spring in the Cloud - using Spring with Cloud Foundry
Joshua Long
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Joshua Long
 
Spring 3.1: a Walking Tour
Joshua Long
 
Extending Spring for Custom Usage
Joshua Long
 

Recently uploaded (20)

PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
PDF
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Software Development Company | KodekX
KodekX
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 

Microservices with Spring Boot