SlideShare una empresa de Scribd logo
1 de 82
Descargar para leer sin conexión
© Copyright 2015 Pivotal. All rights reserved.© Copyright 2015 Pivotal. All rights reserved.
To Microservices and Beyond!
SV Microservices/Cloud Native Meetup
May 13, 2015
1
Matt Stine (@mstine)
Principal Engineer and Senior Product Manager
© Copyright 2015 Pivotal. All rights reserved. 2
IT SEEMS THERE’S SOME HYPE…
M!CR0S3RV!C3$!!!!!
© Copyright 2015 Pivotal. All rights reserved. 3
https://twitter.com/mstine/status/557763539101032448
© Copyright 2015 Pivotal. All rights reserved.
DEFINE: Microservice
4
Loosely coupled service oriented
architecture with bounded contexts
Adrian Cockcroft
Technology Fellow, Battery Ventures
Former Netflix Chief Cloud Architect
© Copyright 2015 Pivotal. All rights reserved.
DEFINE: Microservice
5
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.
© Copyright 2015 Pivotal. All rights reserved.
Not Monoliths
6
Relational Database
Data Access
Service
HTML JavaScript MVC
Service
Monolithic ApplicationBrowser
© Copyright 2015 Pivotal. All rights reserved. 7
Not Traditional (ESB-centric) SOA
Enterprise Service Bus
Service Service Service Service
Service Service Service Service
UI UI
© Copyright 2015 Pivotal. All rights reserved. 8
But Microservices!
From: http://www.slideshare.net/adriancockcroft/goto-berlin
© Copyright 2015 Pivotal. All rights reserved. 9
But why?
© Copyright 2015 Pivotal. All rights reserved. 10
Issues We’ll Confront
• Microservices are not an inherently superior architecture.
• We’re still building big systems from smaller things.
• Just like Docker won’t save the world, neither will
microservices. They’re not free.
• You absolutely cannot forget about data.
• Let’s begin!
© Copyright 2015 Pivotal. All rights reserved. 11
Not an end in themselves…
It’s about Continuous Delivery!
© Copyright 2015 Pivotal. All rights reserved.
What is Continuous Delivery?
12
$
Business
DevelopmentQA
Operations
Customer
© Copyright 2015 Pivotal. All rights reserved.
What is Continuous Delivery?
13
$
© Copyright 2015 Pivotal. All rights reserved. 14
Keep the Wheel Spinning!
Design
Develop
Test
Customer
Feedback
Customer
Delivery
Analytics
© Copyright 2015 Pivotal. All rights reserved. 15
Prod
Release
#1
Prod
Release
#2
Prod
Release
#3
AgileDevelopm
ent
Waterfall
Organization!
© Copyright 2015 Pivotal. All rights reserved.
Silo Delivery
16
Project
Mgmt
UX Dev QA DBA
Sys
Admin
Net
Admin
Storage
Admin
Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin
MONOLITHIC DELIVERY
© Copyright 2015 Pivotal. All rights reserved.
Continuous Delivery
17
Product
Mgr
UX Dev QA DBA
Sys
Admin
Net
Admin
Storage
Admin
BUSINESS CAPABILITY TEAMS
USING MICROSERVICES
PLATFORM OPERATIONS
TEAM
Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin
© Copyright 2015 Pivotal. All rights reserved.
Continuous Delivery
18
Product
Mgr
UX Dev QA DBA
Sys
Admin
Net
Admin
Storage
Admin
BUSINESS CAPABILITY TEAMS
USING MICROSERVICES
PLATFORM OPERATIONS
TEAM
Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin
Self
Service
API
© Copyright 2015 Pivotal. All rights reserved. 19
INVENTORY
Prod Release
Prod Release
Prod Release
CATALOG
Prod Release
Prod Release
Prod Release
REVIEWS
Prod Release
Prod Release
Prod Release
SHIPPING
Prod Release
Prod Release
Prod Release
© Copyright 2015 Pivotal. All rights reserved. 20
Microservices Enabling Continuous Delivery
• Decoupling Capabilities -> Decoupling Change Cycles
• Product Ownership: Tip to Tail
• We Build and Operate What We Understand BEST
• We Collaborate via API Contracts
• Microservice to Microservice
• Microservice to Platform
https://github.com/realestate-com-au/pact
© Copyright 2015 Pivotal. All rights reserved. 21
Systems over Services
Composition over Components
© Copyright 2015 Pivotal. All rights reserved.
Microframeworks for Microservices
22
Spring Boot
http://projects.spring.io/spring-boot
Dropwizard
http://dropwizard.io
http://12factor.net
© Copyright 2015 Pivotal. All rights reserved.
It can get pretty small…
23
@RestController
class ThisWillActuallyRun {
@RequestMapping("/")
String home() {
"Hello World!"
}
}
© Copyright 2015 Pivotal. All rights reserved.
With Spring Data REST!
24
http://projects.spring.io/spring-data-rest
@Entity
@Table(name = "city")
public class City implements Serializable {
!
@Id
@GeneratedValue
private Long id;
!
@Column(nullable = false)
private String name;
!
@Column(nullable = false)
private String county;
!
//...
!
}
© Copyright 2015 Pivotal. All rights reserved.
With Spring Data REST!
25
http://projects.spring.io/spring-data-rest
@RepositoryRestResource(collectionResourceRel = "cities", path = "cities")
public interface CityRepository extends PagingAndSortingRepository<City, Long> {}
@SpringBootApplication
@EnableJpaRepositories
@Import(RepositoryRestMvcConfiguration.class)
public class Application {
!
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
© Copyright 2015 Pivotal. All rights reserved.
With Spring Data REST!
26
http://projects.spring.io/spring-data-rest
{
"_links" : {
"next" : {
"href" : "http://localhost:8080/cities?page=1&size=20"
},
"self" : {
"href" : "http://localhost:8080/cities{?page,size,sort}",
"templated" : true
}
},
"_embedded" : {
"cities" : [ {
"name" : "HOLTSVILLE",
"county" : "SUFFOLK",
"stateCode" : "NY",
"postalCode" : "00501",
"latitude" : "+40.922326",
"longitude" : "-072.637078",
© Copyright 2015 Pivotal. All rights reserved.
But No Microservice is an Island…
27
© Copyright 2015 Pivotal. All rights reserved.
Example Distributed System: Minified
28
© Copyright 2015 Pivotal. All rights reserved. 29
Some emergent challenges of microservices
systems…
• Distributed/Versioned Configuration
• Service Registration/Discovery
• Routing/Load Balancing
• Fault Tolerance (Circuit Breakers!)
© Copyright 2015 Pivotal. All rights reserved.
Example: Coordination Boiler Plate
30
© Copyright 2015 Pivotal. All rights reserved. 31
• Eureka
• Hystrix + Turbine
• Ribbon
• Feign
• Zuul
http://netflix.github.io
© Copyright 2015 Pivotal. All rights reserved. 32
http://projects.spring.io/spring-cloud
@SpringCloudOSS
© Copyright 2015 Pivotal. All rights reserved.
Example: Spring Cloud + Netflix OSS
33
© Copyright 2015 Pivotal. All rights reserved. 34
Config Server
© Copyright 2015 Pivotal. All rights reserved. 35
Config Server + Cloud Bus
© Copyright 2015 Pivotal. All rights reserved.
Running a Config Server
36
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {
!
public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}
!
}
© Copyright 2015 Pivotal. All rights reserved. 37
Service Registration/Discovery
© Copyright 2015 Pivotal. All rights reserved.
Running a Eureka Server
38
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {
!
public static void main(String[] args) {
SpringApplication.run(EurekaApplication.class, args);
}
!
}
© Copyright 2015 Pivotal. All rights reserved.
Service Registration/Discovery
39
@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);
}
!
}
© Copyright 2015 Pivotal. All rights reserved.
Service Registration/Discovery
40
© Copyright 2015 Pivotal. All rights reserved.
Fault Tolerance - Circuit Breakers
41
© Copyright 2015 Pivotal. All rights reserved.
Fault Tolerance - Circuit Breakers
42
@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);
}
!
}
© Copyright 2015 Pivotal. All rights reserved.
Enabling a Circuit Breaker
43
@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;
}
Client-Side Load Balancing
© Copyright 2015 Pivotal. All rights reserved. 44
{
"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"
}
}
}
© Copyright 2015 Pivotal. All rights reserved. 45
© Copyright 2015 Pivotal. All rights reserved.
Circuit Breaker Fallback
46
public Link defaultLink(Map<String, Object> parameters) {
return null;
}
@HystrixCommand(fallbackMethod = "defaultLink")
public Link getStoresByLocationLink(Map<String, Object> parameters) {
//...
}
© Copyright 2015 Pivotal. All rights reserved. 47
{
"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 is gone!!!
© Copyright 2015 Pivotal. All rights reserved. 48
© Copyright 2015 Pivotal. All rights reserved. 49
Operationalized
Architecture
You have to pay for your lunch!
© Copyright 2015 Pivotal. All rights reserved.© Copyright 2015 Pivotal. All rights reserved. 50
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
© Copyright 2015 Pivotal. All rights reserved. 51
Paying for your lunch…
• Significant Operations Overhead
• Substantial DevOps Skills Required
• Implicit Interfaces
• Duplication of Effort
• Distributed System Complexity
• Asynchronicity is Difficult!
• Testability Challenges
© Copyright 2015 Pivotal. All rights reserved.
You must be this tall
to use
Microservices…
52
http://martinfowler.com/bliki/MicroservicePrerequisites.html
https://www.flickr.com/photos/gusset/3723961589
• RAPID PROVISIONING
• BASIC MONITORING
• RAPID APPLICATION DEPLOYMENT
• DEVOPS CULTURE
© Copyright 2015 Pivotal. All rights reserved.
It takes a platform…
53
http://techblog.netflix.com/2013/01/optimizing-netflix-api.html
http://techblog.netflix.com/2014/03/the-netflix-dynamic-scripting-platform.html
© Copyright 2015 Pivotal. All rights reserved.
It takes a platform…
54
Cloud Foundry Spring Cloud
© Copyright 2015 Pivotal. All rights reserved. 55
Platform Features
• Environment Provisioning
• On-Demand/Automatic Scaling
• Failover/Resilience
• Routing/Load Balancing
• Data Service Operations
• Monitoring
© Copyright 2015 Pivotal. All rights reserved.
Environment Provisioning/App Deployment
56
Router
Cloud Controller
Service Broker
Node(s)
DEA
DEA
DEA
DEA
Blobstore DB
Runtime
1. Upload bits/metadata
2. Create/bind services
3. Stage via Buildpack
4. Deploy via Container
push app
+ app MD
SC
+ =
http://docs.cloudfoundry.org/devguide/deploy-apps/
© Copyright 2015 Pivotal. All rights reserved.
Environment Provisioning/App Deployment
57
Router
Cloud Controller
DEA
Blobstore DB
Runtime
Detect Compile Upload
No
System
Buildpacks
+ =
Yes
http://docs.cloudfoundry.org/buildpacks/
© Copyright 2015 Pivotal. All rights reserved.
Deployment/Load Balancing/Scaling
58
Blobstore
Router
Cloud Controller
DEA
Messaging (NATS)
DEA DEA
Runtime
Access
App
http://docs.cloudfoundry.org/concepts/architecture/warden.html
Container Container
© Copyright 2015 Pivotal. All rights reserved.
Failover/Resilience
59
Blobstore
Router
Cloud Controller
DEA
Messaging (NATS)
DEA DEA
Runtime
Health Manager
Actual StateDesired State
http://docs.cloudfoundry.org/concepts/architecture/#hm9k
Container Container Container
© Copyright 2015 Pivotal. All rights reserved. 60
Diego
https://github.com/cloudfoundry-incubator/diego-design-notes
© Copyright 2015 Pivotal. All rights reserved. 61
http://lattice.cf/
© Copyright 2015 Pivotal. All rights reserved.
Data Service Operations: Cluster Provisioning
62
Blobstore
BOSH
Health Monitor
DB
Deploy my
Services
IaaS
Worker VMsBOSH Director
NATS
Cassandra Node
Target VM
Cassandra Node
Target VM
Cassandra Node
Target VM
http://bosh.cloudfoundry.org/
© Copyright 2015 Pivotal. All rights reserved.
DB
Router
Data Service Operations: Application Binding
63
Service
credentials
reserve resources
obtain connection data
CLI Cloud
Controller
Service
Broker
Data
Service
Runtime
create service (HTTP)
bind service (HTTP)
create service (HTTP)
bind service (HTTP)
http://docs.cloudfoundry.org/services/api.html
© Copyright 2015 Pivotal. All rights reserved.
Monitoring
64
© Copyright 2015 Pivotal. All rights reserved. 65
It’s All About the Data
What about the BIG QUESTIONS?
© Copyright 2015 Pivotal. All rights reserved.
This won’t work…
66
© Copyright 2015 Pivotal. All rights reserved. 67
Instead!
© Copyright 2015 Pivotal. All rights reserved.
Bounded Contexts
68
Movie Movie
Actor
Genre
Media
Type
Media
Type
Kiosk
Location
Media
Product
Catalog
Inventory
© Copyright 2015 Pivotal. All rights reserved.
Polyglot Persistence
69
REST XYou shall not pass…
© Copyright 2015 Pivotal. All rights reserved.
But I have a question!
70
REST XYou shall not pass…
?
?
? ?
?
?
© Copyright 2015 Pivotal. All rights reserved.
Lambda Architecture
71
© Copyright 2015 Pivotal. All rights reserved.
Join via Events!
72
© Copyright 2015 Pivotal. All rights reserved. 73
http://projects.spring.io/spring-xd/
© Copyright 2015 Pivotal. All rights reserved. 74
© Copyright 2015 Pivotal. All rights reserved.
Redbox Conceptual Workflow
75
© Copyright 2015 Pivotal. All rights reserved.
SpringBox Microservices
76
Catalog Service
Inventory Service
Kiosk
Kiosk
Kiosk
Reservation
Service
https://github.com/cf-platform-eng/springbox-datacloud
© Copyright 2015 Pivotal. All rights reserved.
…and if you have a question:
77
Kiosk
Kiosk
Kiosk
Speed Layer
Batch Layer
Serving Layer
Event
Ingest
https://github.com/cf-platform-eng/springbox-datacloud
“What movie genres are most popular in what geographic locations?”
© Copyright 2015 Pivotal. All rights reserved.
“What movie genres are most popular in
what geographic locations?”
78
// Aggregate preferences across all kiosks:
stream create --name kiosk_agg_prefs --definition "rabbit --
queues=lambda.kiosk.events | field-value-counter --fieldName=genreIds"
!
// Tap aggregate preferences, filter for kiosk #1:
stream create --name kiosk_1_prefs --definition "tap:stream:kiosk_agg_prefs > filter
--expression=#jsonPath(payload,'$.locationId').equals(1) | field-value-counter --
fieldName=genreIds"
© Copyright 2015 Pivotal. All rights reserved.
“What movie genres are most popular in
what geographic locations?”
79
field-value-counter display --name kiosk_agg_prefs
field-value-counter display=kiosk_agg_prefs
------------------------------------------- - -----
VALUE - COUNT
Action | 14
Adventure | 6
Comedy | 27
Sci-Fi | 18
© Copyright 2015 Pivotal. All rights reserved. 80
Where We’ve Been…
• Microservices are an enabler to Continuous Delivery.
• Less about services, more about composed distributed
systems. Patterns can help.
• You’re going to need a platform.
• Decomposed data governance -> recomposed data
discovery.
• Thank You!
© Copyright 2015 Pivotal. All rights reserved. 81
I wrote a little cloud book…
Available to you
compliments of Pivotal!
!
!
Get the FREE e-book
at http://bit.ly/cloud-native-book!
A NEW PLATFORM FOR A NEW ERA

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entitySpring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
 
Cloud-Native Streaming and Event-Driven Microservices
Cloud-Native Streaming and Event-Driven MicroservicesCloud-Native Streaming and Event-Driven Microservices
Cloud-Native Streaming and Event-Driven Microservices
 
What Is Spring?
What Is Spring?What Is Spring?
What Is Spring?
 
Spring Boot Loves K8s
Spring Boot Loves K8sSpring Boot Loves K8s
Spring Boot Loves K8s
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
 
Spring Boot—Production Boost
Spring Boot—Production BoostSpring Boot—Production Boost
Spring Boot—Production Boost
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
 
Building Cloud Native Architectures with Spring
Building Cloud Native Architectures with SpringBuilding Cloud Native Architectures with Spring
Building Cloud Native Architectures with Spring
 
Spring Cloud Kubernetes: An Easier Path from Idea to Production
Spring Cloud Kubernetes: An Easier Path from Idea to ProductionSpring Cloud Kubernetes: An Easier Path from Idea to Production
Spring Cloud Kubernetes: An Easier Path from Idea to Production
 
Spring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSSpring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWS
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjp
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDB
 
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tServerless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
 
Spring Boot Observability
Spring Boot ObservabilitySpring Boot Observability
Spring Boot Observability
 
Crafting a New Enterprise App Platform with Cloud Foundry, Kubernetes, Istio,...
Crafting a New Enterprise App Platform with Cloud Foundry, Kubernetes, Istio,...Crafting a New Enterprise App Platform with Cloud Foundry, Kubernetes, Istio,...
Crafting a New Enterprise App Platform with Cloud Foundry, Kubernetes, Istio,...
 
A Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in JavaA Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in Java
 
DevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s SolutionDevOps KPIs as a Service: Daimler’s Solution
DevOps KPIs as a Service: Daimler’s Solution
 
Full Steam Ahead, R2DBC!
Full Steam Ahead, R2DBC!Full Steam Ahead, R2DBC!
Full Steam Ahead, R2DBC!
 
From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020
 
Resilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsResilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIs
 

Destacado

Destacado (20)

Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
 
Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)
 
Microserviços - Universidade Metodista - EETI 2016
Microserviços - Universidade Metodista - EETI 2016Microserviços - Universidade Metodista - EETI 2016
Microserviços - Universidade Metodista - EETI 2016
 
Spring Cloud and Netflix OSS overview v1
Spring Cloud and Netflix OSS overview v1Spring Cloud and Netflix OSS overview v1
Spring Cloud and Netflix OSS overview v1
 
Adventures with Microservices
Adventures with MicroservicesAdventures with Microservices
Adventures with Microservices
 
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
 
Microservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskMicroservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack risk
 
Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)
Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)
Microservices: uma abordagem para arquitetura de aplicações (Devcamp 2015)
 
Decomposing applications for scalability and deployability (devnexus 2013)
Decomposing applications for scalability and deployability (devnexus 2013)Decomposing applications for scalability and deployability (devnexus 2013)
Decomposing applications for scalability and deployability (devnexus 2013)
 
Vantagens e desvantagens de uma arquitetura microservices
Vantagens e desvantagens de uma arquitetura microservicesVantagens e desvantagens de uma arquitetura microservices
Vantagens e desvantagens de uma arquitetura microservices
 
Linux principles and philosophy
Linux principles and philosophyLinux principles and philosophy
Linux principles and philosophy
 
Linux principles and philosophy
Linux principles and philosophyLinux principles and philosophy
Linux principles and philosophy
 
Unix philosophy and principles
Unix philosophy and principlesUnix philosophy and principles
Unix philosophy and principles
 
Mobile Knife Fighting at JSConf US
Mobile Knife Fighting at JSConf US Mobile Knife Fighting at JSConf US
Mobile Knife Fighting at JSConf US
 
Eduards Sizovs - Micro Service Architecture
Eduards Sizovs - Micro Service Architecture Eduards Sizovs - Micro Service Architecture
Eduards Sizovs - Micro Service Architecture
 
API Microservices with Node.js and Docker
API Microservices with Node.js and DockerAPI Microservices with Node.js and Docker
API Microservices with Node.js and Docker
 
Microservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache Cassandra
 
Bringing the Unix Philosophy to Big Data
Bringing the Unix Philosophy to Big DataBringing the Unix Philosophy to Big Data
Bringing the Unix Philosophy to Big Data
 
Mocking Test - QA Ninja Conf 2016
Mocking Test - QA Ninja Conf 2016Mocking Test - QA Ninja Conf 2016
Mocking Test - QA Ninja Conf 2016
 
Unix Philosophy
Unix PhilosophyUnix Philosophy
Unix Philosophy
 

Similar a To Microservices and Beyond

Similar a To Microservices and Beyond (20)

Pivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxPivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptx
 
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
 
Orchestrating Legacy Services Into Contemporary RESTful WEB APIs With CA App ...
Orchestrating Legacy Services Into Contemporary RESTful WEB APIs With CA App ...Orchestrating Legacy Services Into Contemporary RESTful WEB APIs With CA App ...
Orchestrating Legacy Services Into Contemporary RESTful WEB APIs With CA App ...
 
CA Gen Exploration – What's New and Cool in Application Development
CA Gen Exploration – What's New and Cool in Application DevelopmentCA Gen Exploration – What's New and Cool in Application Development
CA Gen Exploration – What's New and Cool in Application Development
 
Tech Talk: Master Your Continuous Delivery Pipeline with a New Level of Orche...
Tech Talk: Master Your Continuous Delivery Pipeline with a New Level of Orche...Tech Talk: Master Your Continuous Delivery Pipeline with a New Level of Orche...
Tech Talk: Master Your Continuous Delivery Pipeline with a New Level of Orche...
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
 
Ready, Set, Shop! The Pressure is on For Your Applications to Perform Flawl...
Ready, Set, Shop! The Pressure is on For Your Applications to Perform Flawl...Ready, Set, Shop! The Pressure is on For Your Applications to Perform Flawl...
Ready, Set, Shop! The Pressure is on For Your Applications to Perform Flawl...
 
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
 
Hands-On Lab: Integrate Your Monitoring Tools into an Automated Service Impac...
Hands-On Lab: Integrate Your Monitoring Tools into an Automated Service Impac...Hands-On Lab: Integrate Your Monitoring Tools into an Automated Service Impac...
Hands-On Lab: Integrate Your Monitoring Tools into an Automated Service Impac...
 
Cloud native pitch-younjin-20150925-v2
Cloud native pitch-younjin-20150925-v2Cloud native pitch-younjin-20150925-v2
Cloud native pitch-younjin-20150925-v2
 
Introduction to CA Service Virtualization
Introduction to CA Service VirtualizationIntroduction to CA Service Virtualization
Introduction to CA Service Virtualization
 
Case Study: Citrix Adopts DevOps Principles to Gain Efficiency and Speed Soft...
Case Study: Citrix Adopts DevOps Principles to Gain Efficiency and Speed Soft...Case Study: Citrix Adopts DevOps Principles to Gain Efficiency and Speed Soft...
Case Study: Citrix Adopts DevOps Principles to Gain Efficiency and Speed Soft...
 
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...
 
How Facebook's Technologies can define the future of VistA and Health IT
How Facebook's Technologies can define the future of VistA and Health ITHow Facebook's Technologies can define the future of VistA and Health IT
How Facebook's Technologies can define the future of VistA and Health IT
 
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...
 
Case Study: ING Builds Highly Available Continuous Delivery Pipeline with Mic...
Case Study: ING Builds Highly Available Continuous Delivery Pipeline with Mic...Case Study: ING Builds Highly Available Continuous Delivery Pipeline with Mic...
Case Study: ING Builds Highly Available Continuous Delivery Pipeline with Mic...
 
Pivotal spring boot-cloud workshop
Pivotal   spring boot-cloud workshopPivotal   spring boot-cloud workshop
Pivotal spring boot-cloud workshop
 
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...
 

Más de Matt Stine

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
 
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic RelationshipCloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Matt Stine
 
Information Sciences Solutions to Core Facility Problems at St. Jude Children...
Information Sciences Solutions to Core Facility Problems at St. Jude Children...Information Sciences Solutions to Core Facility Problems at St. Jude Children...
Information Sciences Solutions to Core Facility Problems at St. Jude Children...
Matt Stine
 
Java(tm) Technology On Google App Engine
Java(tm) Technology On Google App EngineJava(tm) Technology On Google App Engine
Java(tm) Technology On Google App Engine
Matt Stine
 
Deploying Grails to Morph App Space
Deploying Grails to Morph App SpaceDeploying Grails to Morph App Space
Deploying Grails to Morph App Space
Matt Stine
 

Más de Matt Stine (20)

Architectures That Bend but Don't Break
Architectures That Bend but Don't BreakArchitectures That Bend but Don't Break
Architectures That Bend but Don't Break
 
Cloud Native Architecture Patterns Tutorial
Cloud Native Architecture Patterns TutorialCloud Native Architecture Patterns Tutorial
Cloud Native Architecture Patterns Tutorial
 
Resilient Architecture
Resilient ArchitectureResilient Architecture
Resilient Architecture
 
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
 
Reactive Fault Tolerant Programming with Hystrix and RxJava
Reactive Fault Tolerant Programming with Hystrix and RxJavaReactive Fault Tolerant Programming with Hystrix and RxJava
Reactive Fault Tolerant Programming with Hystrix and RxJava
 
Deploying Microservices to Cloud Foundry
Deploying Microservices to Cloud FoundryDeploying Microservices to Cloud Foundry
Deploying Microservices to Cloud Foundry
 
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
 
Pivotal Cloud Platform Roadshow: Sign Up for Pivotal Web Services
Pivotal Cloud Platform Roadshow: Sign Up for Pivotal Web ServicesPivotal Cloud Platform Roadshow: Sign Up for Pivotal Web Services
Pivotal Cloud Platform Roadshow: Sign Up for Pivotal Web Services
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to Go
 
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic RelationshipCloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
 
It's the End of the Cloud as We Know It
It's the End of the Cloud as We Know ItIt's the End of the Cloud as We Know It
It's the End of the Cloud as We Know It
 
Vert.x
Vert.xVert.x
Vert.x
 
Functional solid
Functional solidFunctional solid
Functional solid
 
The Seven Wastes of Software Development
The Seven Wastes of Software DevelopmentThe Seven Wastes of Software Development
The Seven Wastes of Software Development
 
Information Sciences Solutions to Core Facility Problems at St. Jude Children...
Information Sciences Solutions to Core Facility Problems at St. Jude Children...Information Sciences Solutions to Core Facility Problems at St. Jude Children...
Information Sciences Solutions to Core Facility Problems at St. Jude Children...
 
Achieve Your Goals
Achieve Your GoalsAchieve Your Goals
Achieve Your Goals
 
Getting Things Done
Getting Things DoneGetting Things Done
Getting Things Done
 
Feelin' Groovy: An Afternoon of Reflexive Metaprogramming
Feelin' Groovy: An Afternoon of Reflexive MetaprogrammingFeelin' Groovy: An Afternoon of Reflexive Metaprogramming
Feelin' Groovy: An Afternoon of Reflexive Metaprogramming
 
Java(tm) Technology On Google App Engine
Java(tm) Technology On Google App EngineJava(tm) Technology On Google App Engine
Java(tm) Technology On Google App Engine
 
Deploying Grails to Morph App Space
Deploying Grails to Morph App SpaceDeploying Grails to Morph App Space
Deploying Grails to Morph App Space
 

Último

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

To Microservices and Beyond

  • 1. © Copyright 2015 Pivotal. All rights reserved.© Copyright 2015 Pivotal. All rights reserved. To Microservices and Beyond! SV Microservices/Cloud Native Meetup May 13, 2015 1 Matt Stine (@mstine) Principal Engineer and Senior Product Manager
  • 2. © Copyright 2015 Pivotal. All rights reserved. 2 IT SEEMS THERE’S SOME HYPE… M!CR0S3RV!C3$!!!!!
  • 3. © Copyright 2015 Pivotal. All rights reserved. 3 https://twitter.com/mstine/status/557763539101032448
  • 4. © Copyright 2015 Pivotal. All rights reserved. DEFINE: Microservice 4 Loosely coupled service oriented architecture with bounded contexts Adrian Cockcroft Technology Fellow, Battery Ventures Former Netflix Chief Cloud Architect
  • 5. © Copyright 2015 Pivotal. All rights reserved. DEFINE: Microservice 5 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.
  • 6. © Copyright 2015 Pivotal. All rights reserved. Not Monoliths 6 Relational Database Data Access Service HTML JavaScript MVC Service Monolithic ApplicationBrowser
  • 7. © Copyright 2015 Pivotal. All rights reserved. 7 Not Traditional (ESB-centric) SOA Enterprise Service Bus Service Service Service Service Service Service Service Service UI UI
  • 8. © Copyright 2015 Pivotal. All rights reserved. 8 But Microservices! From: http://www.slideshare.net/adriancockcroft/goto-berlin
  • 9. © Copyright 2015 Pivotal. All rights reserved. 9 But why?
  • 10. © Copyright 2015 Pivotal. All rights reserved. 10 Issues We’ll Confront • Microservices are not an inherently superior architecture. • We’re still building big systems from smaller things. • Just like Docker won’t save the world, neither will microservices. They’re not free. • You absolutely cannot forget about data. • Let’s begin!
  • 11. © Copyright 2015 Pivotal. All rights reserved. 11 Not an end in themselves… It’s about Continuous Delivery!
  • 12. © Copyright 2015 Pivotal. All rights reserved. What is Continuous Delivery? 12 $ Business DevelopmentQA Operations Customer
  • 13. © Copyright 2015 Pivotal. All rights reserved. What is Continuous Delivery? 13 $
  • 14. © Copyright 2015 Pivotal. All rights reserved. 14 Keep the Wheel Spinning! Design Develop Test Customer Feedback Customer Delivery Analytics
  • 15. © Copyright 2015 Pivotal. All rights reserved. 15 Prod Release #1 Prod Release #2 Prod Release #3 AgileDevelopm ent Waterfall Organization!
  • 16. © Copyright 2015 Pivotal. All rights reserved. Silo Delivery 16 Project Mgmt UX Dev QA DBA Sys Admin Net Admin Storage Admin Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin MONOLITHIC DELIVERY
  • 17. © Copyright 2015 Pivotal. All rights reserved. Continuous Delivery 17 Product Mgr UX Dev QA DBA Sys Admin Net Admin Storage Admin BUSINESS CAPABILITY TEAMS USING MICROSERVICES PLATFORM OPERATIONS TEAM Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin
  • 18. © Copyright 2015 Pivotal. All rights reserved. Continuous Delivery 18 Product Mgr UX Dev QA DBA Sys Admin Net Admin Storage Admin BUSINESS CAPABILITY TEAMS USING MICROSERVICES PLATFORM OPERATIONS TEAM Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin Self Service API
  • 19. © Copyright 2015 Pivotal. All rights reserved. 19 INVENTORY Prod Release Prod Release Prod Release CATALOG Prod Release Prod Release Prod Release REVIEWS Prod Release Prod Release Prod Release SHIPPING Prod Release Prod Release Prod Release
  • 20. © Copyright 2015 Pivotal. All rights reserved. 20 Microservices Enabling Continuous Delivery • Decoupling Capabilities -> Decoupling Change Cycles • Product Ownership: Tip to Tail • We Build and Operate What We Understand BEST • We Collaborate via API Contracts • Microservice to Microservice • Microservice to Platform https://github.com/realestate-com-au/pact
  • 21. © Copyright 2015 Pivotal. All rights reserved. 21 Systems over Services Composition over Components
  • 22. © Copyright 2015 Pivotal. All rights reserved. Microframeworks for Microservices 22 Spring Boot http://projects.spring.io/spring-boot Dropwizard http://dropwizard.io http://12factor.net
  • 23. © Copyright 2015 Pivotal. All rights reserved. It can get pretty small… 23 @RestController class ThisWillActuallyRun { @RequestMapping("/") String home() { "Hello World!" } }
  • 24. © Copyright 2015 Pivotal. All rights reserved. With Spring Data REST! 24 http://projects.spring.io/spring-data-rest @Entity @Table(name = "city") public class City implements Serializable { ! @Id @GeneratedValue private Long id; ! @Column(nullable = false) private String name; ! @Column(nullable = false) private String county; ! //... ! }
  • 25. © Copyright 2015 Pivotal. All rights reserved. With Spring Data REST! 25 http://projects.spring.io/spring-data-rest @RepositoryRestResource(collectionResourceRel = "cities", path = "cities") public interface CityRepository extends PagingAndSortingRepository<City, Long> {} @SpringBootApplication @EnableJpaRepositories @Import(RepositoryRestMvcConfiguration.class) public class Application { ! public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
  • 26. © Copyright 2015 Pivotal. All rights reserved. With Spring Data REST! 26 http://projects.spring.io/spring-data-rest { "_links" : { "next" : { "href" : "http://localhost:8080/cities?page=1&size=20" }, "self" : { "href" : "http://localhost:8080/cities{?page,size,sort}", "templated" : true } }, "_embedded" : { "cities" : [ { "name" : "HOLTSVILLE", "county" : "SUFFOLK", "stateCode" : "NY", "postalCode" : "00501", "latitude" : "+40.922326", "longitude" : "-072.637078",
  • 27. © Copyright 2015 Pivotal. All rights reserved. But No Microservice is an Island… 27
  • 28. © Copyright 2015 Pivotal. All rights reserved. Example Distributed System: Minified 28
  • 29. © Copyright 2015 Pivotal. All rights reserved. 29 Some emergent challenges of microservices systems… • Distributed/Versioned Configuration • Service Registration/Discovery • Routing/Load Balancing • Fault Tolerance (Circuit Breakers!)
  • 30. © Copyright 2015 Pivotal. All rights reserved. Example: Coordination Boiler Plate 30
  • 31. © Copyright 2015 Pivotal. All rights reserved. 31 • Eureka • Hystrix + Turbine • Ribbon • Feign • Zuul http://netflix.github.io
  • 32. © Copyright 2015 Pivotal. All rights reserved. 32 http://projects.spring.io/spring-cloud @SpringCloudOSS
  • 33. © Copyright 2015 Pivotal. All rights reserved. Example: Spring Cloud + Netflix OSS 33
  • 34. © Copyright 2015 Pivotal. All rights reserved. 34 Config Server
  • 35. © Copyright 2015 Pivotal. All rights reserved. 35 Config Server + Cloud Bus
  • 36. © Copyright 2015 Pivotal. All rights reserved. Running a Config Server 36 @SpringBootApplication @EnableConfigServer public class ConfigServerApplication { ! public static void main(String[] args) { SpringApplication.run(ConfigServerApplication.class, args); } ! }
  • 37. © Copyright 2015 Pivotal. All rights reserved. 37 Service Registration/Discovery
  • 38. © Copyright 2015 Pivotal. All rights reserved. Running a Eureka Server 38 @SpringBootApplication @EnableEurekaServer public class EurekaApplication { ! public static void main(String[] args) { SpringApplication.run(EurekaApplication.class, args); } ! }
  • 39. © Copyright 2015 Pivotal. All rights reserved. Service Registration/Discovery 39 @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); } ! }
  • 40. © Copyright 2015 Pivotal. All rights reserved. Service Registration/Discovery 40
  • 41. © Copyright 2015 Pivotal. All rights reserved. Fault Tolerance - Circuit Breakers 41
  • 42. © Copyright 2015 Pivotal. All rights reserved. Fault Tolerance - Circuit Breakers 42 @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); } ! }
  • 43. © Copyright 2015 Pivotal. All rights reserved. Enabling a Circuit Breaker 43 @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; } Client-Side Load Balancing
  • 44. © Copyright 2015 Pivotal. All rights reserved. 44 { "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" } } }
  • 45. © Copyright 2015 Pivotal. All rights reserved. 45
  • 46. © Copyright 2015 Pivotal. All rights reserved. Circuit Breaker Fallback 46 public Link defaultLink(Map<String, Object> parameters) { return null; } @HystrixCommand(fallbackMethod = "defaultLink") public Link getStoresByLocationLink(Map<String, Object> parameters) { //... }
  • 47. © Copyright 2015 Pivotal. All rights reserved. 47 { "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 is gone!!!
  • 48. © Copyright 2015 Pivotal. All rights reserved. 48
  • 49. © Copyright 2015 Pivotal. All rights reserved. 49 Operationalized Architecture You have to pay for your lunch!
  • 50. © Copyright 2015 Pivotal. All rights reserved.© Copyright 2015 Pivotal. All rights reserved. 50 http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 51. © Copyright 2015 Pivotal. All rights reserved. 51 Paying for your lunch… • Significant Operations Overhead • Substantial DevOps Skills Required • Implicit Interfaces • Duplication of Effort • Distributed System Complexity • Asynchronicity is Difficult! • Testability Challenges
  • 52. © Copyright 2015 Pivotal. All rights reserved. You must be this tall to use Microservices… 52 http://martinfowler.com/bliki/MicroservicePrerequisites.html https://www.flickr.com/photos/gusset/3723961589 • RAPID PROVISIONING • BASIC MONITORING • RAPID APPLICATION DEPLOYMENT • DEVOPS CULTURE
  • 53. © Copyright 2015 Pivotal. All rights reserved. It takes a platform… 53 http://techblog.netflix.com/2013/01/optimizing-netflix-api.html http://techblog.netflix.com/2014/03/the-netflix-dynamic-scripting-platform.html
  • 54. © Copyright 2015 Pivotal. All rights reserved. It takes a platform… 54 Cloud Foundry Spring Cloud
  • 55. © Copyright 2015 Pivotal. All rights reserved. 55 Platform Features • Environment Provisioning • On-Demand/Automatic Scaling • Failover/Resilience • Routing/Load Balancing • Data Service Operations • Monitoring
  • 56. © Copyright 2015 Pivotal. All rights reserved. Environment Provisioning/App Deployment 56 Router Cloud Controller Service Broker Node(s) DEA DEA DEA DEA Blobstore DB Runtime 1. Upload bits/metadata 2. Create/bind services 3. Stage via Buildpack 4. Deploy via Container push app + app MD SC + = http://docs.cloudfoundry.org/devguide/deploy-apps/
  • 57. © Copyright 2015 Pivotal. All rights reserved. Environment Provisioning/App Deployment 57 Router Cloud Controller DEA Blobstore DB Runtime Detect Compile Upload No System Buildpacks + = Yes http://docs.cloudfoundry.org/buildpacks/
  • 58. © Copyright 2015 Pivotal. All rights reserved. Deployment/Load Balancing/Scaling 58 Blobstore Router Cloud Controller DEA Messaging (NATS) DEA DEA Runtime Access App http://docs.cloudfoundry.org/concepts/architecture/warden.html Container Container
  • 59. © Copyright 2015 Pivotal. All rights reserved. Failover/Resilience 59 Blobstore Router Cloud Controller DEA Messaging (NATS) DEA DEA Runtime Health Manager Actual StateDesired State http://docs.cloudfoundry.org/concepts/architecture/#hm9k Container Container Container
  • 60. © Copyright 2015 Pivotal. All rights reserved. 60 Diego https://github.com/cloudfoundry-incubator/diego-design-notes
  • 61. © Copyright 2015 Pivotal. All rights reserved. 61 http://lattice.cf/
  • 62. © Copyright 2015 Pivotal. All rights reserved. Data Service Operations: Cluster Provisioning 62 Blobstore BOSH Health Monitor DB Deploy my Services IaaS Worker VMsBOSH Director NATS Cassandra Node Target VM Cassandra Node Target VM Cassandra Node Target VM http://bosh.cloudfoundry.org/
  • 63. © Copyright 2015 Pivotal. All rights reserved. DB Router Data Service Operations: Application Binding 63 Service credentials reserve resources obtain connection data CLI Cloud Controller Service Broker Data Service Runtime create service (HTTP) bind service (HTTP) create service (HTTP) bind service (HTTP) http://docs.cloudfoundry.org/services/api.html
  • 64. © Copyright 2015 Pivotal. All rights reserved. Monitoring 64
  • 65. © Copyright 2015 Pivotal. All rights reserved. 65 It’s All About the Data What about the BIG QUESTIONS?
  • 66. © Copyright 2015 Pivotal. All rights reserved. This won’t work… 66
  • 67. © Copyright 2015 Pivotal. All rights reserved. 67 Instead!
  • 68. © Copyright 2015 Pivotal. All rights reserved. Bounded Contexts 68 Movie Movie Actor Genre Media Type Media Type Kiosk Location Media Product Catalog Inventory
  • 69. © Copyright 2015 Pivotal. All rights reserved. Polyglot Persistence 69 REST XYou shall not pass…
  • 70. © Copyright 2015 Pivotal. All rights reserved. But I have a question! 70 REST XYou shall not pass… ? ? ? ? ? ?
  • 71. © Copyright 2015 Pivotal. All rights reserved. Lambda Architecture 71
  • 72. © Copyright 2015 Pivotal. All rights reserved. Join via Events! 72
  • 73. © Copyright 2015 Pivotal. All rights reserved. 73 http://projects.spring.io/spring-xd/
  • 74. © Copyright 2015 Pivotal. All rights reserved. 74
  • 75. © Copyright 2015 Pivotal. All rights reserved. Redbox Conceptual Workflow 75
  • 76. © Copyright 2015 Pivotal. All rights reserved. SpringBox Microservices 76 Catalog Service Inventory Service Kiosk Kiosk Kiosk Reservation Service https://github.com/cf-platform-eng/springbox-datacloud
  • 77. © Copyright 2015 Pivotal. All rights reserved. …and if you have a question: 77 Kiosk Kiosk Kiosk Speed Layer Batch Layer Serving Layer Event Ingest https://github.com/cf-platform-eng/springbox-datacloud “What movie genres are most popular in what geographic locations?”
  • 78. © Copyright 2015 Pivotal. All rights reserved. “What movie genres are most popular in what geographic locations?” 78 // Aggregate preferences across all kiosks: stream create --name kiosk_agg_prefs --definition "rabbit -- queues=lambda.kiosk.events | field-value-counter --fieldName=genreIds" ! // Tap aggregate preferences, filter for kiosk #1: stream create --name kiosk_1_prefs --definition "tap:stream:kiosk_agg_prefs > filter --expression=#jsonPath(payload,'$.locationId').equals(1) | field-value-counter -- fieldName=genreIds"
  • 79. © Copyright 2015 Pivotal. All rights reserved. “What movie genres are most popular in what geographic locations?” 79 field-value-counter display --name kiosk_agg_prefs field-value-counter display=kiosk_agg_prefs ------------------------------------------- - ----- VALUE - COUNT Action | 14 Adventure | 6 Comedy | 27 Sci-Fi | 18
  • 80. © Copyright 2015 Pivotal. All rights reserved. 80 Where We’ve Been… • Microservices are an enabler to Continuous Delivery. • Less about services, more about composed distributed systems. Patterns can help. • You’re going to need a platform. • Decomposed data governance -> recomposed data discovery. • Thank You!
  • 81. © Copyright 2015 Pivotal. All rights reserved. 81 I wrote a little cloud book… Available to you compliments of Pivotal! ! ! Get the FREE e-book at http://bit.ly/cloud-native-book!
  • 82. A NEW PLATFORM FOR A NEW ERA