Slide 1

Slide 1 text

B O O T I F U L M I C R O S E RV I C E Josh Long (⻰龙之春) @starbuxman [email protected] github.com/joshlong T H E https://github.com/joshlong/qcon2015-sao-paolo-microservices-workshop

Slide 2

Slide 2 text

A B O U T M E . .

Slide 3

Slide 3 text

https://github.com/joshlong/qcon2015-sao-paolo-microservices-workshop Spring Developer Advocate Josh Long (⻰龙之春) @starbuxman [email protected] | Jean Claude van Damme! Java mascot Duke some thing’s I’ve authored... I am.. • open-source contributor 
 (Spring Boot, Spring Integration, 
 Vaadin, Activiti) • JavaOne rockstar • author of 5 books, 
 3 video trainings on Spring

Slide 4

Slide 4 text

Josh Long - @starbuxman Pivotal is..

Slide 5

Slide 5 text

T H E S TO RY S O FA R . .

Slide 6

Slide 6 text

Josh Long - @starbuxman it’s not a new story..

Slide 7

Slide 7 text

Josh Long - @starbuxman ! Twitter moved from a Rails monolith to a microservice architecture ! Facebook moved from PHP monolith to a microservice architecture ! Netflix moved from a Java monolith to a microservice architecture the old architecture’s broken..

Slide 8

Slide 8 text

Josh Long - @starbuxman ! processing can’t scale up • concurrent, horizontal architectures are easier to scale • “process”-style concurrency is easy to scale still Moore’s Law is Broken Moore's law is the observation that, over the history of computing hardware, the number of transistors in a dense integrated circuit doubles approximately every two years. The law is named after Gordon E. Moore, co-founder of the Intel Corporation, who described the trend in his 1965 paper. http://en.wikipedia.org/wiki/Moore's_law

Slide 9

Slide 9 text

Josh Long - @starbuxman Data is overwhelming.. 44000% larger in 2020 than 2009 data production is expected to be :

Slide 10

Slide 10 text

mobile More than 
 1.5 MILLION activations daily * @Starbuxman https://github.com/joshlong/qcon2015-sao-paolo-microservices-workshop * http://www.androidcentral.com/larry-page-15-million-android-devices-activated-every-day

Slide 11

Slide 11 text

Josh Long - @starbuxman a Social World in 60 seconds 3125 photos uploaded 7630 messages sent 7610 searches 2MM videos viewed 2000 checkins 175k tweets 1090 visitors 700k messages sent * source: visual.ly/60-seconds-social-media

Slide 12

Slide 12 text

Josh Long - @starbuxman the Internet of Things ! IPv6 gives us more addresses ! devices are getting smaller, more ubiquitous ! “devices” include homes appliances (refrigerators, washers, coffee machines, dryers), roads, air pollution monitors, (human) body monitors, etc “In five years, by 2018, Earth will be home to 7.6 billion people, says the United Nations. By contrast, some 25 billion devices will be connected by 2015, and 50 billion by 2020, says Cisco.” http://www.businessinsider.com/what-you-need-to-know-about-the- internet-of-things-2013-3?op=1#ixzz3FxCafwWe

Slide 13

Slide 13 text

Josh Long - @starbuxman Conway’s Law

Slide 14

Slide 14 text

T H E M I C R O S E RV I C E

Slide 15

Slide 15 text

Josh Long - @starbuxman A Mental Model for Scale Chris Richardson (@crichardson) 
 (http://microservices.io/articles/scalecube.html) introduced me to this “scale cube” from The Art of Scaling Software

Slide 16

Slide 16 text

Josh Long - @starbuxman ! all services communicate via APIs (not backend databases!) ! APIs should be consistent ! HATEOAS promotes discoverability ! should be easy to stand up ! APIs should provide uniform monitoring and system endpoints for ease of integration into production APIs how do we

Slide 17

Slide 17 text

Josh Long - @starbuxman ! each service should be deployable without blocking other teams ! promotes agility in iteration ! polyglot services ! avoids “DLL hell” by isolating dependencies to the service Independent Deployability

Slide 18

Slide 18 text

BUILDING ADAPTIVE APPLICATIONS IS HARD built on Cloud Foundry code will be open sourced. 
 Demo B U I L D I N G A P I S W I T H S P R I N G B O O T

Slide 19

Slide 19 text

D I S T R I B U T E D S Y S T E M S A R E H A R D

Slide 20

Slide 20 text

Josh Long - @starbuxman ! Google built a custom stack based on C++, Java, Go ! TaoBao built frameworks on Spring (open sourced, too! “Dabbo") ! custom RPC, service registration, coordination ! http://bit.ly/1xt6hIE “Spring at China Scale” ! Baidu have frameworks also built on top of Spring ! Netflix have a large stack based on Spring and Spring Boot ! Twitter built a custom stack based on Scala ! Facebook built a custom stack based on PHP/“Hack” Others have walked this path

Slide 21

Slide 21 text

Josh Long - @starbuxman title

Slide 22

Slide 22 text

BUILDING ADAPTIVE APPLICATIONS IS HARD built on Cloud Foundry code will be open sourced. 
 Demo B U I L D I N G R E S I L I E N T M I C R O S E RV I C E S W I T H S P R I N G C L O U D

Slide 23

Slide 23 text

Josh Long - @starbuxman ! Single sign on with Spring Security ! Node coordination with Zookeeper ! Service registration and discovery with Consul and Zookeeper Anything Else in Spring Cloud?

Slide 24

Slide 24 text

Josh Long - @starbuxman ! Netflix treat AMIs as containers ! Many organizations treat Tomcat as their container ! Docker is the container Deploy Containers

Slide 25

Slide 25 text

Josh Long - @starbuxman ! all services are stateless: if one’s struggling, replace it ! failure will happen Treat Servers as Cattle, Not Pets

Slide 26

Slide 26 text

Josh Long - @starbuxman ! embrace DevOps ! don’t throw code over the wall ! map your team to your business vertical ! Netflix have teams and then the platform group who provide infrastructure for teams. Integrated Teams, not Silos

Slide 27

Slide 27 text

why PaaS? @Starbuxman https://github.com/joshlong/qcon2015-sao-paolo-microservices-workshop Imagine if architects had to be the janitor for every building they designed. This is how the development team felt prior to moving to Windows Azure. Duncan Mackenzie Nov 07, 2011 http://www.infoq.com/articles/Channel-9-Azure “ ”

Slide 28

Slide 28 text

Josh Long - @starbuxman ! an open-source project administered by the Linux Foundation ! many implementers (HP, IBM, Baidu, etc) Cloud Foundry is..

Slide 29

Slide 29 text

Josh Long - @starbuxman ! Observe-Orient-Decode-Act ! embrace continuous delivery (easy if you’re doing everything else in this list!) the OODA Loop

Slide 30

Slide 30 text

Josh Long - @starbuxman ! scale is everybody’s problem now, not just Netflix/Twitter/Baidu/Alibaba, etc ! “cloud native” is the new norm. It doesn’t have to be hard. ! Spring Boot simplifies application & service development ! Spring Cloud simplifies service interactions ! Cloud Foundry lets you deploy all the things, consistently; removes operational friction ! “smaller is more” Takeaways

Slide 31

Slide 31 text

Josh Long - @starbuxman ! Former Netflix DevOps Guru Adrian Cockroft on DevOps + MS
 http://www.infoq.com/interviews/adrian-cockcroft-microservices-devops ! Bootiful Applications with Spring Boot
 http://www.youtube.com/watch?v=eCos5VTtZoI ! Chris Richardson’s http://microservices.io site and his 
 Decomposing Applications for Scalability talks ! The Netflix Techblog http://techblog.netflix.com where to go from here..

Slide 32

Slide 32 text

Josh Long - @starbuxman ! Fred Georges on Programmer Anarchy 
 http://www.infoq.com/news/2012/02/programmer-anarchy ! Matt Stine’s CF + Microservices: a Mutualistic Symbiotic Relationship 
 http://www.youtube.com/watch?v=RGZefc92tZs ! Martin Fowler’s article - http://martinfowler.com/articles/microservices.html where to go from here..

Slide 33

Slide 33 text

Josh Long - @starbuxman Questions? Josh Long (⻰龙之春) @starbuxman [email protected] speakerdeck.com/joshlong 
 github.com/joshlong 
 http://spring.io A NEW PLATFORM FOR A NEW ERA