Upload
emilio-garcia
View
206
Download
3
Embed Size (px)
Citation preview
Microservices, Spring Cloud & Cloud Foundry
Emilio García - @unindanachado
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
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
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?
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
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
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
…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
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:
DEMO
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!
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)
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]
Thanks
We support WarmiLab, join us!