building rest apis with spring boot and spring cloud

34
Building REST APIs with Spring Cloud and Spring Boot Kenny Bastani Spring Developer Advocate 1

Upload: kenny-bastani

Post on 07-Jan-2017

2.988 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Building REST APIs with Spring Boot and Spring Cloud

Building REST APIs with Spring Cloud and Spring BootKenny BastaniSpring Developer Advocate

1

Page 2: Building REST APIs with Spring Boot and Spring Cloud

Speaker Intro

2

Page 3: Building REST APIs with Spring Boot and Spring Cloud

©2015 Apigee. All Rights Reserved.

Speaker Intro

3

I’m a developer who advocates good tools.(I tweet about building highly scalable “Hello World” apps for a living)

Page 4: Building REST APIs with Spring Boot and Spring Cloud

©2015 Apigee. All Rights Reserved.

Agenda

4

1. Agenda2. What is Cloud Native?3. Microservices4. Spring Boot5. Spring Cloud6. Lattice7. Cloud Foundry8. HATEOAS - Self-describing APIs9. Reverse Proxy Sidecar & Demo

Page 5: Building REST APIs with Spring Boot and Spring Cloud

What is Cloud Native?

5

A culture of operators and developers tackling software complexity together

Page 6: Building REST APIs with Spring Boot and Spring Cloud

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.

6

Page 7: Building REST APIs with Spring Boot and Spring Cloud

7

https://18f.gsa.gov/2015/10/09/cloud-gov-launch/

Page 8: Building REST APIs with Spring Boot and Spring Cloud

Microservices

8

“Kind of like a headache, but more of them.”

Page 9: Building REST APIs with Spring Boot and Spring Cloud

Microservices

9

Each team gets one database and one service

Shared caches (Couchbase) are platform provided services that are shared for consistency

Page 10: Building REST APIs with Spring Boot and Spring Cloud

Cloud-native Microservice Deployments

10

Each microservice can be containerized with their application dependencies

Containers get scheduled on VMs with an allotted resource policy

Page 11: Building REST APIs with Spring Boot and Spring Cloud

Auto-scaling

11

An elastic runtime handles auto-scaling of VMs with cloud providers

Microservices should be load balanced vertically and not horizontally

Page 12: Building REST APIs with Spring Boot and Spring Cloud

Composition & Orchestration

12

Each microservice needs to communicate outside containers

Service discovery provides an automatic method for finding other service dependencies

Page 13: Building REST APIs with Spring Boot and Spring Cloud

Spring Boot

13

A JVM micro-framework for building microservices

Page 14: Building REST APIs with Spring Boot and Spring Cloud

What is Spring Boot?

14

Page 15: Building REST APIs with Spring Boot and Spring Cloud

Spring Boot Roles

15

Page 16: Building REST APIs with Spring Boot and Spring Cloud

16

Page 17: Building REST APIs with Spring Boot and Spring Cloud

Spring Boot

17

Page 18: Building REST APIs with Spring Boot and Spring Cloud

Spring Cloud

18

A toolset designed for building distributed systems

Page 19: Building REST APIs with Spring Boot and Spring Cloud

The cupcake metaphor

19

Page 20: Building REST APIs with Spring Boot and Spring Cloud

What is Spring Cloud?

20

1

2

3

Service Discovery

Circuit Breakers

API Gateway

4 Distributed Tracing

Page 21: Building REST APIs with Spring Boot and Spring Cloud

Service Discovery & Intelligent Routing

21

Page 22: Building REST APIs with Spring Boot and Spring Cloud

Configuration Service

22

Page 23: Building REST APIs with Spring Boot and Spring Cloud

API Gateway

23

Page 24: Building REST APIs with Spring Boot and Spring Cloud

Lattice

24

A cloud-native platform for deploying and scaling containers in production

Page 25: Building REST APIs with Spring Boot and Spring Cloud

Containers, containers, containersLattice helps you manage Docker container deployments on clusters of VMsChoose the cloud provider you want, deploys containers from Docker hub

25

Page 26: Building REST APIs with Spring Boot and Spring Cloud

Cloud Foundry

26

“To always be shipping, you need a shipyard”

Page 27: Building REST APIs with Spring Boot and Spring Cloud

Cloud Foundry

27

Cloud Foundry is an opinionated platform for organizationsthat build & operate software as a core part of their business

I once built a treehouse for

my kids!

I am good at selling many treehouses!

Opinionated Unopinionated

Page 28: Building REST APIs with Spring Boot and Spring Cloud

HATEOAS

28

Hypermedia as the Engine of Application State

(REST APIs that self-describe)

Page 29: Building REST APIs with Spring Boot and Spring Cloud

It’s pronounced hawt-ee-oh-as

29

Page 30: Building REST APIs with Spring Boot and Spring Cloud

Richardson Maturity Model

30

Photo credit: Packt Publishing

Page 31: Building REST APIs with Spring Boot and Spring Cloud

Browsing REST APIs

31

Page 32: Building REST APIs with Spring Boot and Spring Cloud

Each API call provides links

32

Page 33: Building REST APIs with Spring Boot and Spring Cloud

Demo

33

We’re going to launch some Spring Boot containers on AWS using Lattice

(Wish me luck)

Page 34: Building REST APIs with Spring Boot and Spring Cloud

Thanks!

34

I am on the Twitters

@kennybastani

Questions?

http://start.spring.io