Slide 1

Slide 1 text

© 2014 Pivotal Software, Inc. All rights reserved. 1

Slide 2

Slide 2 text

© 2014 Pivotal Software, Inc. All rights reserved. Microservices with Spring Cloud and Cloud Foundry Kenny Bastani Spring Developer Advocate 2

Slide 3

Slide 3 text

© 2014 Pivotal Software, Inc. All rights reserved. Speaker Intro 3

Slide 4

Slide 4 text

© 2014 Pivotal Software, Inc. All rights reserved. Kenny Bastani 4 @kennybastani Spring Developer Advocate

Slide 5

Slide 5 text

© 2014 Pivotal Software, Inc. All rights reserved. Agenda 5 1 Agenda 2 Microservices 3 Spring Boot 4 Spring Cloud 5 Cloud Foundry 6 HATEOAS - Self-describing APIs 7 Live code

Slide 6

Slide 6 text

© 2014 Pivotal Software, Inc. All rights reserved. Microservices “Kind of like a head ache, but more of them.” 6

Slide 7

Slide 7 text

Source: Adrian Cockcroft 
 http://www.slideshare.net/adrianco water-scrum-fall increases clock time, waste

Slide 8

Slide 8 text

Source: Adrian Cockcroft 
 http://www.slideshare.net/adrianco microservices enable feature teams

Slide 9

Slide 9 text

© 2014 Pivotal Software, Inc. All rights reserved. Twelve Factor Applications - http://12factor.net/ • Use declarative formats for setup automation, to minimize time and cost for new developers joining the project; • Have a clean contract with the underlying operating system, offering maximum portability between execution environments; • Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration; • Minimize divergence between development and production, enabling continuous deployment for maximum agility; • And can scale up without significant changes to tooling, architecture, or development practices. 9

Slide 10

Slide 10 text

© 2014 Pivotal Software, Inc. All rights reserved. 10

Slide 11

Slide 11 text

© 2014 Pivotal Software, Inc. All rights reserved. 11

Slide 12

Slide 12 text

© 2014 Pivotal Software, Inc. All rights reserved. What is Cloud Native? 12 • Cloud native is a mindset for continuously building and shipping your apps into production

Slide 13

Slide 13 text

© 2014 Pivotal Software, Inc. All rights reserved. Microservices - Polyglot Persistence • Each team gets one database and one service • Shared caches are platform provided services that are shared for consistency 13

Slide 14

Slide 14 text

© 2014 Pivotal Software, Inc. All rights reserved. Cloud-native Deployments • Each microservice can be containerized with their application dependencies • Containers get scheduled on virtual machines with an allotted resource policy 14

Slide 15

Slide 15 text

© 2014 Pivotal Software, Inc. All rights reserved. Auto-scaling • An elastic runtime handles auto-scaling of VMs with cloud providers • Microservices should be load balanced vertically and not horizontally 15

Slide 16

Slide 16 text

© 2014 Pivotal Software, Inc. All rights reserved. Composition & Orchestration • Each microservice needs to communicate outside containers • Service discovery provides an automatic method for finding other service dependencies 16

Slide 17

Slide 17 text

© 2014 Pivotal Software, Inc. All rights reserved. Spring Boot A JVM micro-framework for building microservices 17

Slide 18

Slide 18 text

spring boot it’s going to take an API.. lots of them! supports rapid development of production-ready applications and services

Slide 19

Slide 19 text

© 2014 Pivotal Software, Inc. All rights reserved. What is Spring Boot? 19

Slide 20

Slide 20 text

© 2014 Pivotal Software, Inc. All rights reserved. Spring Boot Roles 20

Slide 21

Slide 21 text

© 2014 Pivotal Software, Inc. All rights reserved. Automatic Configuration • An application class is annotated with @SpringBootApplication • Additional annotations are added to indicate the role of the Spring Boot application 21

Slide 22

Slide 22 text

© 2014 Pivotal Software, Inc. All rights reserved. Spring Boot for Microservices 22

Slide 23

Slide 23 text

© 2014 Pivotal Software, Inc. All rights reserved. Spring Cloud A toolset designed for building distributed systems 23

Slide 24

Slide 24 text

spring cloud Apache Zookeeper these logos are all trademark/copyright their respective owners (T-B, L-R): 
 
 Netflix, amazon.com, Apache Software Foundation, Cloud Foundry, Hashicorp they are ALL great organizations and we love their open-source and their APIs!! *

Slide 25

Slide 25 text

© 2014 Pivotal Software, Inc. All rights reserved. What is Spring Cloud? • Spring Cloud provides a way to turn Spring Boot microservices into distributed applications 25

Slide 26

Slide 26 text

© 2014 Pivotal Software, Inc. All rights reserved. What is Spring Cloud? 26 ✴ Service Discovery ✴ API Gateway ✴ Circuit Breakers ✴ Distributed Tracing

Slide 27

Slide 27 text

© 2014 Pivotal Software, Inc. All rights reserved. Service Discovery & Intelligent Routing 27

Slide 28

Slide 28 text

© 2014 Pivotal Software, Inc. All rights reserved. 28 Client-side load balancing

Slide 29

Slide 29 text

© 2014 Pivotal Software, Inc. All rights reserved. Configuration Service 29

Slide 30

Slide 30 text

© 2014 Pivotal Software, Inc. All rights reserved. API Gateway 30

Slide 31

Slide 31 text

© 2014 Pivotal Software, Inc. All rights reserved. Cloud Foundry “To always be shipping, you need a shipyard.” 31

Slide 32

Slide 32 text

© 2014 Pivotal Software, Inc. All rights reserved. Cloud Foundry is an opinionated platform for organizations that build and operate software as a core part of their business Opinionated Platforms 32 “I am good at selling many treehouses!” Opinionated “I once built a treehouse for my kids!” Unopinionated

Slide 33

Slide 33 text

© 2014 Pivotal Software, Inc. All rights reserved. HATEOAS Hypermedia as the Engine of Application State (REST APIs that self-describe) 33

Slide 34

Slide 34 text

© 2014 Pivotal Software, Inc. All rights reserved. It’s pronounced hawt-ee-oh-as 34

Slide 35

Slide 35 text

© 2014 Pivotal Software, Inc. All rights reserved. Richardson Maturity Model 35 Photo credit: Packt Publishing

Slide 36

Slide 36 text

© 2014 Pivotal Software, Inc. All rights reserved. Browsing REST APIs 36

Slide 37

Slide 37 text

© 2014 Pivotal Software, Inc. All rights reserved. ©2015 Apigee. All Rights Reserved. Each API call provides links 37

Slide 38

Slide 38 text

© 2014 Pivotal Software, Inc. All rights reserved. Thanks :)
 kbastani@pivotal.io
 38