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

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
 

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
 
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
 
PPTX
REST Methodologies
jrodbx
 
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
 
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
 
REST Methodologies
jrodbx
 
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
 
Ad

Recently uploaded (20)

PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Python basic programing language for automation
DanialHabibi2
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 

Microservices with Spring Boot