15
Microservices, Spring Cloud & Cloud Foundry Emilio García - @unindanachado

Microservices, Spring Cloud & Cloud Foundry

Embed Size (px)

Citation preview

Page 1: Microservices, Spring Cloud & Cloud Foundry

Microservices, Spring Cloud & Cloud Foundry

Emilio García - @unindanachado

Page 2: Microservices, Spring Cloud & Cloud Foundry

Agenda• Greetings + quick poll• Microservices

– Advantages– Challenges

• 4 Distributed System Patterns– Centralized configuration– Service registry– Dynamic routing– Circuit breakers

• Spring Boot & Spring Cloud– Why should you be using Spring Boot & Spring Cloud– Netflix OSS

• Cloud Foundry– Super fast pros and cons

Page 3: Microservices, Spring Cloud & Cloud Foundry

https://b.socrative.com/student

Room: MICROCLOUD

Page 4: Microservices, Spring Cloud & Cloud Foundry

Microservices

• Is there a formal definition for “Microservice Architecture”?– NO

• What’s the difference between monolithic and microservice styles?– Ease to maintain– Deployment– Scaling– Ease to revamp

Page 5: Microservices, Spring Cloud & Cloud Foundry

Microservices

Advantages• Can use “the right tool for the job”• Can replace entire components easier• Can scale only specific components• Super cloud friendly• Will push you to DevOps

Challenges• Success depends on componentization• Could become very complex to

manage• How to index all services?• Requires orchestration / choreography• Team skill factor?

Page 6: Microservices, Spring Cloud & Cloud Foundry

How you address those challenges?

• Leverage automation

• Apply patterns– Centralized configuration– Service registry– Intelligent routing– Circuit breakers

Centralized Configuratio

n

Service Registry

Dynamic Routing

Circuit Breakers

Page 7: Microservices, Spring Cloud & Cloud Foundry

How does it look like?

Configuration Repository

Product Services

Customer Services #1

Other Services

Customer Services #2

EmployeeServices

Service Instances

Service Registry (Directory)

Edge Server

Client

Request

Request

Page 8: Microservices, Spring Cloud & Cloud Foundry

So, what about Spring Boot?• Works on top of spring framework• Extreme configuration reduction• Prefers convention over configuration• Prefers annotations over XML• Can run any application with a single (and simple) command

• Integrates well with maven and gradle• Smart dependency management• Can generate fat Jars or standard wars• Can deploy on traditional servers• It really increases productivity

Page 9: Microservices, Spring Cloud & Cloud Foundry

…and Spring Cloud?

“provides tools for developers to quickly build some of the common patterns in distributed systems”

Spring Cloud Config Server

Spring Cloud Netflix Zuul

Spring Cloud Netflix Eureka

Spring Cloud Netflix Hystrix

Page 10: Microservices, Spring Cloud & Cloud Foundry

Guess what?

Configuration Repository

Product Services

Customer Services #1

Other Services

Customer Services #2

EmployeeServices

Service Instances

Service Registry (Directory)

Edge Server

Client

Request

RequestConfig Services

Config Server

Spring Boot / Cloud

Zuul Proxy

Eureka Server

Spring Boot and Spring Cloud fits in our schema just fine:

Page 11: Microservices, Spring Cloud & Cloud Foundry

DEMO

Page 12: Microservices, Spring Cloud & Cloud Foundry

Last but not least: Cloud Foundry

• PaaS• Joint effort from several companies• Led by pivotal• Organized in ORGs, Spaces and Apps• Has a very easy to use CLI• Reliable, fast, versatile• Increasingly number of services to use in your apps• Support several technologies: Java, Go, Php, Angular and also .NET!

Page 13: Microservices, Spring Cloud & Cloud Foundry

Cloud Foundry

Most liked features:

• Global Router• Autoscale• Apps Manager web console• Can create an script for everything• Can have it running locally (using BOSH Lite)

Page 14: Microservices, Spring Cloud & Cloud Foundry

Final Notes

References• Martin Fowler’s article• Spring Cloud Projects• Spring Cloud Config Server• Spring Cloud Netflix Reference

Contact• Twitter: @unindanachado• LinkedIn: linkedin.com/emiliorgr • Email: [email protected]

Page 15: Microservices, Spring Cloud & Cloud Foundry

Thanks

We support WarmiLab, join us!