SlideShare una empresa de Scribd logo
1 de 45
Descargar para leer sin conexión
1© 2015 Pivotal Software, Inc. All rights reserved. 1© 2015 Pivotal Software, Inc. All rights reserved.
Microservices: Why and How?
Netflix OSS/Spring Cloud & Pivotal Cloud Foundry
Matt Stine (@mstine)
Principal Engineer & Senior Product Manager
August 2015
2© 2015 Pivotal Software, Inc. All rights reserved.
DEFINE: Microservice
Loosely coupled service oriented
architecture with bounded contexts
If every service has to be updated in concert,
it’s not loosely coupled!
If you have to know about surrounding
services you don’t have a bounded context.
3© 2015 Pivotal Software, Inc. All rights reserved.
Not Monoliths
Relational Database
Data Access
Service
HTML JavaScript MVC
Service
Monolithic ApplicationBrowser
4© 2015 Pivotal Software, Inc. All rights reserved.
Not Traditional (ESB-centric) SOA
Enterprise Service Bus
Service Service Service Service
Service Service Service Service
UI UI
5© 2015 Pivotal Software, Inc. All rights reserved.
But Microservices!
6© 2015 Pivotal Software, Inc. All rights reserved.
7© 2015 Pivotal Software, Inc. All rights reserved.
8© 2015 Pivotal Software, Inc. All rights reserved.
But no Microservice is an Island…
9© 2015 Pivotal Software, Inc. All rights reserved.
Example Distributed System: Minified
10© 2015 Pivotal Software, Inc. All rights reserved.
Some emergent challenges of microservices
systems…
Ÿ  Configuration Management
Ÿ  Service Registration & Discovery
Ÿ  Routing & Load Balancing
Ÿ  Fault Tolerance (Circuit Breakers!)
Ÿ  Monitoring
11© 2015 Pivotal Software, Inc. All rights reserved.
Example: Coordination Boiler Plate
12© 2015 Pivotal Software, Inc. All rights reserved.
•  Eureka
•  Hystrix + Turbine
•  Ribbon
•  Feign
•  Zuul
http://netflix.github.io
13© 2015 Pivotal Software, Inc. All rights reserved.
http://projects.spring.io/spring-cloud
14© 2015 Pivotal Software, Inc. All rights reserved.
Example: Spring Cloud + Netflix OSS
15© 2015 Pivotal Software, Inc. All rights reserved.
Config Server
16© 2015 Pivotal Software, Inc. All rights reserved.
Config Server + Cloud Bus
17© 2015 Pivotal Software, Inc. All rights reserved.
Service Registration/Discovery
18© 2015 Pivotal Software, Inc. All rights reserved.
Service Registration/Discovery
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
public class CustomerApp extends RepositoryRestMvcConfiguration {
@Override
protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration
config) {
config.exposeIdsFor(Customer.class);
}
public static void main(String[] args) {
SpringApplication.run(CustomerApp.class, args);
}
}
19© 2015 Pivotal Software, Inc. All rights reserved.
Fault Tolerance – Circuit Breakers
20© 2015 Pivotal Software, Inc. All rights reserved.
Fault Tolerance – Circuit Breakers
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
public class CustomerApp extends RepositoryRestMvcConfiguration {
@Override
protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration
config) {
config.exposeIdsFor(Customer.class);
}
public static void main(String[] args) {
SpringApplication.run(CustomerApp.class, args);
}
}
21© 2015 Pivotal Software, Inc. All rights reserved.
@HystrixCommand(fallbackMethod = "defaultLink")
public Link getStoresByLocationLink(Map<String, Object> parameters) {
URI storesUri = URI.create(uri);
try {
ServiceInstance instance = loadBalancer.choose("stores");
storesUri = URI.create(String.format("http://%s:%s",
instance.getHost(), instance.getPort()));
}
catch (RuntimeException e) {
// Eureka not available
}
Traverson traverson = new Traverson(storesUri, MediaTypes.HAL_JSON);
Link link = traverson.follow("stores", "search", "by-location")
.withTemplateParameters(parameters).asLink();
return link;
}
Enabling a Circuit Breaker
Client-Side Load Balancing
22© 2015 Pivotal Software, Inc. All rights reserved.
{
"id" : 3,
"firstname" : "Matt",
"lastname" : "Stine",
"address" : {
"street" : "9195 East Mineral Circle",
"zipCode" : "80112",
"city" : "Centennial",
"location" : {
"latitude" : 39.5738106,
"longitude" : -104.8816934
}
},
"_links" : {
"self" : {
"href" : "http://pivotalcustomers.cfapps.io/customers/3"
},
"stores-nearby" : {
"href" : "http://pivotalstores.cfapps.io/stores/search/
findByAddressLocationNear?location=39.5738106,-104.8816934&distance=50"
}
}
}
23© 2015 Pivotal Software, Inc. All rights reserved.
24© 2015 Pivotal Software, Inc. All rights reserved.
Circuit Breaker Fallback
public Link defaultLink(Map<String, Object> parameters) {
return null;
}
@HystrixCommand(fallbackMethod = "defaultLink")
public Link getStoresByLocationLink(Map<String, Object> parameters) {
//...
}
25© 2015 Pivotal Software, Inc. All rights reserved.
{
"id" : 3,
"firstname" : "Matt",
"lastname" : "Stine",
"address" : {
"street" : "9195 East Mineral Circle",
"zipCode" : "80112",
"city" : "Centennial",
"location" : {
"latitude" : 39.5738106,
"longitude" : -104.8816934
}
},
"_links" : {
"self" : {
"href" : "http://pivotalcustomers.cfapps.io/customers/3"
}
}
}
26© 2015 Pivotal Software, Inc. All rights reserved.
27© 2015 Pivotal Software, Inc. All rights reserved. 27© Copyright 2015 Pivotal. All rights reserved.
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
28© 2015 Pivotal Software, Inc. All rights reserved.
Paying for your lunch…
Ÿ  Significant Operations Overhead
Ÿ  Substantial DevOps Skills Required
Ÿ  Implicit Interfaces
Ÿ  Duplication of Effort
Ÿ  Distributed System Complexity
Ÿ  Asynchronicity is Difficult!
Ÿ  Testability Challenges
29© 2015 Pivotal Software, Inc. All rights reserved.
You must be this tall
to use
Microservices…
https://www.flickr.com/photos/gusset/3723961589
•  RAPID PROVISIONING
•  BASIC MONITORING
•  RAPID APPLICATION DEPLOYMENT
•  DEVOPS CULTURE
http://martinfowler.com/bliki/MicroservicePrerequisites.html
30© 2015 Pivotal Software, Inc. All rights reserved.
It takes a platform…
Cloud Foundry Spring Cloud
Services
31© 2015 Pivotal Software, Inc. All rights reserved.
Cloud Foundry Features
Ÿ  Environment Provisioning
Ÿ  On-Demand/Automatic Scaling
Ÿ  Failover/Resilience
Ÿ  Routing/Load Balancing
Ÿ  Data Service Operations
Ÿ  Monitoring
32© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Services Suite
Spring Cloud Services
Config Server Service Registry Circuit Breaker
Dashboard
33© 2015 Pivotal Software, Inc. All rights reserved.
Datastore
Message
Bus
Circuit Breaker
Load Balancer
Message
Bus
REST Workload
(Customer)
Circuit Breaker
Load Balancer
REST Workload
(Stores)
Datastore
Message
Bus
UI (Angular)
Circuit Breaker
Load Balancer
Production
Ready
Proxy
Service
Discovery
Config Server
Messaging
Circuit Breaker
Dashboard
Circuit Breaker
Metric
Aggregation
Bind
Production
Ready
Production
Ready
PCF Applications
PCF Services
Spring Cloud Services Suite – Logical View
34© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Services Suite
•  Installed via Pivotal Ops Manager
•  Adds all services to Pivotal Cloud Foundry
Marketplace
•  Dependencies:
•  MySQL for PCF
•  RabbitMQ for PCF
Spring Cloud
Services
35© 2015 Pivotal Software, Inc. All rights reserved.
App Manager Marketplace
36© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Config Server
Config Server
•  Spring Cloud Config Server
•  Service Binding via Spring Cloud
Connector
•  Git/SVN URL for Config Repo provided
via Service Dashboard (post-
provisioning)
•  Single tenant, scoped to CF space
(nothing prevents shared Git repo)
37© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Config Server Dashboard
38© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Service Registry
Service Registry
•  Service Registration and Discovery via
Netflix OSS Eureka
•  Service Binding via Spring Cloud Connector
•  Single-tenant, scoped to CF space
•  Registration via CF Route or DEA/Cell
IP:Port (must enable cross-container traffic)
39© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Service Registry Dashboard
40© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Services Suite
Circuit Breaker
Dashboard
•  Netflix OSS Turbine + Hystrix Dashboard
•  Aggregation via AMQP (RabbitMQ)
•  Binding via Spring Cloud Connector
•  Single-tenant, scoped to CF space
41© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Services Roadmap
Ÿ  Opinionated RBAC via OAuth2 / Integration with PCF UAA
Ÿ  Spring Cloud Bus Refresh/Restart (as a Service)
Ÿ  Spring Cloud Config Server Encryption/Decryption
Ÿ  Policy-based Inter-org/space Service Discovery
Ÿ  Distributed Tracing
Ÿ  Spring Cloud Dataflow (Spring XD 2.0)
Ÿ  API Gateway / Management (as a Service)
Ÿ  Polyglot Language Support (via Sidecar)
Ÿ  .NET Support (Native Bindings)
42© 2015 Pivotal Software, Inc. All rights reserved.
Policy-based Inter-org/space Service Discovery
43© 2015 Pivotal Software, Inc. All rights reserved.
μServices
with
Bindable Services
In-App Support Libraries
BETA
MAY 2015
44© 2015 Pivotal Software, Inc. All rights reserved.
Published March 16, 2015
Available to you compliments
of Pivotal!
http://bit.ly/cloud-native-book
Pivotal microservices spring_pcf_skillsmatter.pptx

Más contenido relacionado

La actualidad más candente

vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
VMware Tanzu
 
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
VMware Tanzu
 

La actualidad más candente (20)

Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overview
 
Declarative Infrastructure with Cloud Foundry BOSH
Declarative Infrastructure with Cloud Foundry BOSHDeclarative Infrastructure with Cloud Foundry BOSH
Declarative Infrastructure with Cloud Foundry BOSH
 
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring Cloud
 
PCF Architecture
PCF Architecture PCF Architecture
PCF Architecture
 
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
 
Pivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical OverviewPivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical Overview
 
Pivotal Cloud Foundry 2.5: A First Look
Pivotal Cloud Foundry 2.5: A First LookPivotal Cloud Foundry 2.5: A First Look
Pivotal Cloud Foundry 2.5: A First Look
 
Architecture & Operations
Architecture & OperationsArchitecture & Operations
Architecture & Operations
 
How to Scale Operations for a Multi-Cloud Platform using PCF
How to Scale Operations for a Multi-Cloud Platform using PCFHow to Scale Operations for a Multi-Cloud Platform using PCF
How to Scale Operations for a Multi-Cloud Platform using PCF
 
James Watters - PCF Roadshow@Seoul
James Watters - PCF Roadshow@SeoulJames Watters - PCF Roadshow@Seoul
James Watters - PCF Roadshow@Seoul
 
Pivotal Web Services - a Real World Example of Running Cloud Foundry at Scale...
Pivotal Web Services - a Real World Example of Running Cloud Foundry at Scale...Pivotal Web Services - a Real World Example of Running Cloud Foundry at Scale...
Pivotal Web Services - a Real World Example of Running Cloud Foundry at Scale...
 
Pivotal One: The Platform For Building Great Software
Pivotal One: The Platform For Building Great Software Pivotal One: The Platform For Building Great Software
Pivotal One: The Platform For Building Great Software
 
What's new in Pivotal Cloud Foundry 1.6
What's new in Pivotal Cloud Foundry 1.6What's new in Pivotal Cloud Foundry 1.6
What's new in Pivotal Cloud Foundry 1.6
 
LIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud FoundryLIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud Foundry
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
 
Pivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical OverviewPivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical Overview
 
Moving at the speed of startup with Pivotal Cloud Foundry 1.11
Moving at the speed of startup with Pivotal Cloud Foundry 1.11Moving at the speed of startup with Pivotal Cloud Foundry 1.11
Moving at the speed of startup with Pivotal Cloud Foundry 1.11
 
Cloud Foundry Platform Operations - CF Summit 2015
Cloud Foundry Platform Operations - CF Summit 2015Cloud Foundry Platform Operations - CF Summit 2015
Cloud Foundry Platform Operations - CF Summit 2015
 

Destacado

Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for MicroservicesCloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
Matt Stine
 

Destacado (14)

Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
 
Diego: Re-envisioning the Elastic Runtime (Cloud Foundry Summit 2014)
Diego: Re-envisioning the Elastic Runtime (Cloud Foundry Summit 2014)Diego: Re-envisioning the Elastic Runtime (Cloud Foundry Summit 2014)
Diego: Re-envisioning the Elastic Runtime (Cloud Foundry Summit 2014)
 
Pivotal Cloud Foundry
Pivotal Cloud FoundryPivotal Cloud Foundry
Pivotal Cloud Foundry
 
Cloud Foundry - An Open Innovation Platform
Cloud Foundry - An Open Innovation PlatformCloud Foundry - An Open Innovation Platform
Cloud Foundry - An Open Innovation Platform
 
Continuous Delivery of the Cloud Foundry Platform (as a service!)
Continuous Delivery of the Cloud Foundry Platform (as a service!)Continuous Delivery of the Cloud Foundry Platform (as a service!)
Continuous Delivery of the Cloud Foundry Platform (as a service!)
 
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
 
Cloud Foundry - #IBMOTS 2016
Cloud Foundry - #IBMOTS 2016Cloud Foundry - #IBMOTS 2016
Cloud Foundry - #IBMOTS 2016
 
Quantifying the Benefits of Cloud Foundry
Quantifying the Benefits of Cloud FoundryQuantifying the Benefits of Cloud Foundry
Quantifying the Benefits of Cloud Foundry
 
Cloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and moreCloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and more
 
From 0 to 1000 Apps: The First Year of Cloud Foundry at the Home Depot
From 0 to 1000 Apps: The First Year of Cloud Foundry at the Home DepotFrom 0 to 1000 Apps: The First Year of Cloud Foundry at the Home Depot
From 0 to 1000 Apps: The First Year of Cloud Foundry at the Home Depot
 
Cloud Foundry: The Best Place to Run Microservices
Cloud Foundry: The Best Place to Run MicroservicesCloud Foundry: The Best Place to Run Microservices
Cloud Foundry: The Best Place to Run Microservices
 
Pivotal Cloud Foundry: Cloud Native Architecture
Pivotal Cloud Foundry: Cloud Native ArchitecturePivotal Cloud Foundry: Cloud Native Architecture
Pivotal Cloud Foundry: Cloud Native Architecture
 
Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for MicroservicesCloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
 
Resilient Architecture
Resilient ArchitectureResilient Architecture
Resilient Architecture
 

Similar a Pivotal microservices spring_pcf_skillsmatter.pptx

Similar a Pivotal microservices spring_pcf_skillsmatter.pptx (20)

To Microservices and Beyond
To Microservices and BeyondTo Microservices and Beyond
To Microservices and Beyond
 
Cloud native pitch-younjin-20150925-v2
Cloud native pitch-younjin-20150925-v2Cloud native pitch-younjin-20150925-v2
Cloud native pitch-younjin-20150925-v2
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
 
Concevoir et déployer vos applications a base de microservices sur Cloud Foundry
Concevoir et déployer vos applications a base de microservices sur Cloud FoundryConcevoir et déployer vos applications a base de microservices sur Cloud Foundry
Concevoir et déployer vos applications a base de microservices sur Cloud Foundry
 
Removing Barriers Between Dev and Ops
Removing Barriers Between Dev and OpsRemoving Barriers Between Dev and Ops
Removing Barriers Between Dev and Ops
 
Removing Barriers Between Dev and Ops
Removing Barriers Between Dev and OpsRemoving Barriers Between Dev and Ops
Removing Barriers Between Dev and Ops
 
Pivotal Cloud Platform Roadshow Keynote
Pivotal Cloud Platform Roadshow KeynotePivotal Cloud Platform Roadshow Keynote
Pivotal Cloud Platform Roadshow Keynote
 
Removing Barriers Between Dev and Ops
Removing Barriers Between Dev and OpsRemoving Barriers Between Dev and Ops
Removing Barriers Between Dev and Ops
 
Netflix MSA and Pivotal
Netflix MSA and PivotalNetflix MSA and Pivotal
Netflix MSA and Pivotal
 
apidays LIVE Australia 2020 - Data with a Mission by Matt McLarty
apidays LIVE Australia 2020 -  Data with a Mission by Matt McLarty apidays LIVE Australia 2020 -  Data with a Mission by Matt McLarty
apidays LIVE Australia 2020 - Data with a Mission by Matt McLarty
 
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
 
Adapt or Die: Serverless Microservices
Adapt or Die: Serverless MicroservicesAdapt or Die: Serverless Microservices
Adapt or Die: Serverless Microservices
 
Tech Talk: CA Workload Automation Agent Monitor, Agents and Advanced Integrat...
Tech Talk: CA Workload Automation Agent Monitor, Agents and Advanced Integrat...Tech Talk: CA Workload Automation Agent Monitor, Agents and Advanced Integrat...
Tech Talk: CA Workload Automation Agent Monitor, Agents and Advanced Integrat...
 
Anypoint platform in a mobile-centric world
Anypoint platform in a mobile-centric worldAnypoint platform in a mobile-centric world
Anypoint platform in a mobile-centric world
 
Case Study: Rogers Communications Integrates CA API Management and CA Service...
Case Study: Rogers Communications Integrates CA API Management and CA Service...Case Study: Rogers Communications Integrates CA API Management and CA Service...
Case Study: Rogers Communications Integrates CA API Management and CA Service...
 
The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native Journey
 
SOACS-Overview.pdf
SOACS-Overview.pdfSOACS-Overview.pdf
SOACS-Overview.pdf
 
Transforming Healthcare One API at a Time at Kaiser Permanente
Transforming Healthcare One API at a Time at Kaiser PermanenteTransforming Healthcare One API at a Time at Kaiser Permanente
Transforming Healthcare One API at a Time at Kaiser Permanente
 
TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...
TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...
TechTalk: Accelerate Mobile Development using SDKs and Open APIs With CA API ...
 
CA Service Virtualization 9.0—What's the Latest and Greatest
CA Service Virtualization 9.0—What's the Latest and GreatestCA Service Virtualization 9.0—What's the Latest and Greatest
CA Service Virtualization 9.0—What's the Latest and Greatest
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Pivotal microservices spring_pcf_skillsmatter.pptx

  • 1. 1© 2015 Pivotal Software, Inc. All rights reserved. 1© 2015 Pivotal Software, Inc. All rights reserved. Microservices: Why and How? Netflix OSS/Spring Cloud & Pivotal Cloud Foundry Matt Stine (@mstine) Principal Engineer & Senior Product Manager August 2015
  • 2. 2© 2015 Pivotal Software, Inc. All rights reserved. DEFINE: Microservice Loosely coupled service oriented architecture with bounded contexts If every service has to be updated in concert, it’s not loosely coupled! If you have to know about surrounding services you don’t have a bounded context.
  • 3. 3© 2015 Pivotal Software, Inc. All rights reserved. Not Monoliths Relational Database Data Access Service HTML JavaScript MVC Service Monolithic ApplicationBrowser
  • 4. 4© 2015 Pivotal Software, Inc. All rights reserved. Not Traditional (ESB-centric) SOA Enterprise Service Bus Service Service Service Service Service Service Service Service UI UI
  • 5. 5© 2015 Pivotal Software, Inc. All rights reserved. But Microservices!
  • 6. 6© 2015 Pivotal Software, Inc. All rights reserved.
  • 7. 7© 2015 Pivotal Software, Inc. All rights reserved.
  • 8. 8© 2015 Pivotal Software, Inc. All rights reserved. But no Microservice is an Island…
  • 9. 9© 2015 Pivotal Software, Inc. All rights reserved. Example Distributed System: Minified
  • 10. 10© 2015 Pivotal Software, Inc. All rights reserved. Some emergent challenges of microservices systems… Ÿ  Configuration Management Ÿ  Service Registration & Discovery Ÿ  Routing & Load Balancing Ÿ  Fault Tolerance (Circuit Breakers!) Ÿ  Monitoring
  • 11. 11© 2015 Pivotal Software, Inc. All rights reserved. Example: Coordination Boiler Plate
  • 12. 12© 2015 Pivotal Software, Inc. All rights reserved. •  Eureka •  Hystrix + Turbine •  Ribbon •  Feign •  Zuul http://netflix.github.io
  • 13. 13© 2015 Pivotal Software, Inc. All rights reserved. http://projects.spring.io/spring-cloud
  • 14. 14© 2015 Pivotal Software, Inc. All rights reserved. Example: Spring Cloud + Netflix OSS
  • 15. 15© 2015 Pivotal Software, Inc. All rights reserved. Config Server
  • 16. 16© 2015 Pivotal Software, Inc. All rights reserved. Config Server + Cloud Bus
  • 17. 17© 2015 Pivotal Software, Inc. All rights reserved. Service Registration/Discovery
  • 18. 18© 2015 Pivotal Software, Inc. All rights reserved. Service Registration/Discovery @SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); } }
  • 19. 19© 2015 Pivotal Software, Inc. All rights reserved. Fault Tolerance – Circuit Breakers
  • 20. 20© 2015 Pivotal Software, Inc. All rights reserved. Fault Tolerance – Circuit Breakers @SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); } }
  • 21. 21© 2015 Pivotal Software, Inc. All rights reserved. @HystrixCommand(fallbackMethod = "defaultLink") public Link getStoresByLocationLink(Map<String, Object> parameters) { URI storesUri = URI.create(uri); try { ServiceInstance instance = loadBalancer.choose("stores"); storesUri = URI.create(String.format("http://%s:%s", instance.getHost(), instance.getPort())); } catch (RuntimeException e) { // Eureka not available } Traverson traverson = new Traverson(storesUri, MediaTypes.HAL_JSON); Link link = traverson.follow("stores", "search", "by-location") .withTemplateParameters(parameters).asLink(); return link; } Enabling a Circuit Breaker Client-Side Load Balancing
  • 22. 22© 2015 Pivotal Software, Inc. All rights reserved. { "id" : 3, "firstname" : "Matt", "lastname" : "Stine", "address" : { "street" : "9195 East Mineral Circle", "zipCode" : "80112", "city" : "Centennial", "location" : { "latitude" : 39.5738106, "longitude" : -104.8816934 } }, "_links" : { "self" : { "href" : "http://pivotalcustomers.cfapps.io/customers/3" }, "stores-nearby" : { "href" : "http://pivotalstores.cfapps.io/stores/search/ findByAddressLocationNear?location=39.5738106,-104.8816934&distance=50" } } }
  • 23. 23© 2015 Pivotal Software, Inc. All rights reserved.
  • 24. 24© 2015 Pivotal Software, Inc. All rights reserved. Circuit Breaker Fallback public Link defaultLink(Map<String, Object> parameters) { return null; } @HystrixCommand(fallbackMethod = "defaultLink") public Link getStoresByLocationLink(Map<String, Object> parameters) { //... }
  • 25. 25© 2015 Pivotal Software, Inc. All rights reserved. { "id" : 3, "firstname" : "Matt", "lastname" : "Stine", "address" : { "street" : "9195 East Mineral Circle", "zipCode" : "80112", "city" : "Centennial", "location" : { "latitude" : 39.5738106, "longitude" : -104.8816934 } }, "_links" : { "self" : { "href" : "http://pivotalcustomers.cfapps.io/customers/3" } } }
  • 26. 26© 2015 Pivotal Software, Inc. All rights reserved.
  • 27. 27© 2015 Pivotal Software, Inc. All rights reserved. 27© Copyright 2015 Pivotal. All rights reserved. http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 28. 28© 2015 Pivotal Software, Inc. All rights reserved. Paying for your lunch… Ÿ  Significant Operations Overhead Ÿ  Substantial DevOps Skills Required Ÿ  Implicit Interfaces Ÿ  Duplication of Effort Ÿ  Distributed System Complexity Ÿ  Asynchronicity is Difficult! Ÿ  Testability Challenges
  • 29. 29© 2015 Pivotal Software, Inc. All rights reserved. You must be this tall to use Microservices… https://www.flickr.com/photos/gusset/3723961589 •  RAPID PROVISIONING •  BASIC MONITORING •  RAPID APPLICATION DEPLOYMENT •  DEVOPS CULTURE http://martinfowler.com/bliki/MicroservicePrerequisites.html
  • 30. 30© 2015 Pivotal Software, Inc. All rights reserved. It takes a platform… Cloud Foundry Spring Cloud Services
  • 31. 31© 2015 Pivotal Software, Inc. All rights reserved. Cloud Foundry Features Ÿ  Environment Provisioning Ÿ  On-Demand/Automatic Scaling Ÿ  Failover/Resilience Ÿ  Routing/Load Balancing Ÿ  Data Service Operations Ÿ  Monitoring
  • 32. 32© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Services Suite Spring Cloud Services Config Server Service Registry Circuit Breaker Dashboard
  • 33. 33© 2015 Pivotal Software, Inc. All rights reserved. Datastore Message Bus Circuit Breaker Load Balancer Message Bus REST Workload (Customer) Circuit Breaker Load Balancer REST Workload (Stores) Datastore Message Bus UI (Angular) Circuit Breaker Load Balancer Production Ready Proxy Service Discovery Config Server Messaging Circuit Breaker Dashboard Circuit Breaker Metric Aggregation Bind Production Ready Production Ready PCF Applications PCF Services Spring Cloud Services Suite – Logical View
  • 34. 34© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Services Suite •  Installed via Pivotal Ops Manager •  Adds all services to Pivotal Cloud Foundry Marketplace •  Dependencies: •  MySQL for PCF •  RabbitMQ for PCF Spring Cloud Services
  • 35. 35© 2015 Pivotal Software, Inc. All rights reserved. App Manager Marketplace
  • 36. 36© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Config Server Config Server •  Spring Cloud Config Server •  Service Binding via Spring Cloud Connector •  Git/SVN URL for Config Repo provided via Service Dashboard (post- provisioning) •  Single tenant, scoped to CF space (nothing prevents shared Git repo)
  • 37. 37© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Config Server Dashboard
  • 38. 38© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Service Registry Service Registry •  Service Registration and Discovery via Netflix OSS Eureka •  Service Binding via Spring Cloud Connector •  Single-tenant, scoped to CF space •  Registration via CF Route or DEA/Cell IP:Port (must enable cross-container traffic)
  • 39. 39© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Service Registry Dashboard
  • 40. 40© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Services Suite Circuit Breaker Dashboard •  Netflix OSS Turbine + Hystrix Dashboard •  Aggregation via AMQP (RabbitMQ) •  Binding via Spring Cloud Connector •  Single-tenant, scoped to CF space
  • 41. 41© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Services Roadmap Ÿ  Opinionated RBAC via OAuth2 / Integration with PCF UAA Ÿ  Spring Cloud Bus Refresh/Restart (as a Service) Ÿ  Spring Cloud Config Server Encryption/Decryption Ÿ  Policy-based Inter-org/space Service Discovery Ÿ  Distributed Tracing Ÿ  Spring Cloud Dataflow (Spring XD 2.0) Ÿ  API Gateway / Management (as a Service) Ÿ  Polyglot Language Support (via Sidecar) Ÿ  .NET Support (Native Bindings)
  • 42. 42© 2015 Pivotal Software, Inc. All rights reserved. Policy-based Inter-org/space Service Discovery
  • 43. 43© 2015 Pivotal Software, Inc. All rights reserved. μServices with Bindable Services In-App Support Libraries BETA MAY 2015
  • 44. 44© 2015 Pivotal Software, Inc. All rights reserved. Published March 16, 2015 Available to you compliments of Pivotal! http://bit.ly/cloud-native-book