To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior...

75
© Copyright 2014 Pivotal. All rights reserved. © Copyright 2014 Pivotal. All rights reserved. To Microservices and Beyond! YOW! Conference 2014 1 Matt Stine (@mstine) - Senior Product Manager, Spring for Pivotal CF Simon Elisha (@simon_elisha) - CTO & Senior Manager, Field Engineering

Transcript of To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior...

Page 1: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.© Copyright 2014 Pivotal. All rights reserved.

To Microservices and Beyond!YOW! Conference 2014

1

Matt Stine (@mstine) - Senior Product Manager, Spring for Pivotal CF Simon Elisha (@simon_elisha) - CTO & Senior Manager, Field Engineering

Page 2: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 2

IT SEEMS THERE’S SOME HYPE…

M!CR0S3RV!C3$!!!!!

Page 3: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

DEFINE: Microservice

3

Loosely coupled service oriented architecture with bounded contexts

Adrian Cockcroft Technology Fellow, Battery Ventures Former Netflix Chief Cloud Architect

Page 4: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

DEFINE: Microservice

4

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.

Page 5: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Not Monoliths

5

Relational Database

Data Access

Service

HTML JavaScript MVC

Service

Monolithic ApplicationBrowser

Page 6: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 6

Not Traditional (ESB-centric) SOA

Enterprise Service Bus

Service Service Service Service

Service Service Service Service

UI UI

Page 7: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 7

But Microservices!

Page 8: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 8

But why?

Page 9: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 9

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!

Page 10: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 10

Not an end in themselves…It’s about Continuous Delivery!

Page 11: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

What is Continuous Delivery?

11

$Busin

ess

Devel

opm

ent

QA

Ope

ratio

nsCu

stom

er

Page 12: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

What is Continuous Delivery?

12

$

Page 13: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 13

Keep the Wheel Spinning!

Design Develop

Test

Customer Feedback Customer

Delivery

Analytics

Page 14: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 14

Prod Release #1

Prod Release #2

Prod Release #3

Agile Development

Waterfall Organization!

Page 15: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Silo Delivery

15

Project Mgmt UX Dev QA DBA Sys

AdminNet

AdminStorage Admin

Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin

MONOLITHIC DELIVERY

Page 16: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Continuous Delivery

16

Product Mgr UX Dev QA DBA Sys

AdminNet

AdminStorage Admin

BUSINESS CAPABILITY TEAMS USING MICROSERVICES

PLATFORM OPERATIONS TEAM

Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin

Page 17: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Continuous Delivery

17

Product Mgr UX Dev QA DBA Sys

AdminNet

AdminStorage Admin

BUSINESS CAPABILITY TEAMS USING MICROSERVICES

PLATFORM OPERATIONS TEAM

Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin

Self Service

API

Page 18: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 18

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

Page 19: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 19

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

Page 20: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 20

Systems over ServicesComposition over Components

Page 21: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Microframeworks for Microservices

21

Spring Boot http://projects.spring.io/spring-boot

Dropwizard http://dropwizard.io

Page 22: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

It can get pretty small…

22

@RestController class ThisWillActuallyRun { @RequestMapping("/") String home() { Hello World! } }

Page 23: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

With Spring Data REST!

23

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; !//... !}

Page 24: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

With Spring Data REST!

24

http://projects.spring.io/spring-data-rest

@RepositoryRestResource(collectionResourceRel = "cities", path = "cities") public interface CityRepository extends PagingAndSortingRepository<City, Long> {}

@Configuration @ComponentScan @EnableAutoConfiguration @EnableJpaRepositories @Import(RepositoryRestMvcConfiguration.class) public class Application { ! public static void main(String[] args) { SpringApplication.run(Application.class, args); } }

Page 25: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

With Spring Data REST!

25

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",

Page 26: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

But No Microservice is an Island…

26

Page 27: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Example Distributed System: Minified

27

Page 28: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 28

Some emergent features of microservices systems…

•Distributed/Versioned Configuration

• Service Registration/Discovery

• Routing/Load Balancing

• Fault Tolerance (Circuit Breakers, Bulkheads, …)

Page 29: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Example: Coordination Boiler Plate

29

Page 30: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 30

• Eureka

•Hystrix + Turbine

• Ribbon

• Feign

• Zuul

•Archaius

+

http://netflix.github.io

Page 31: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 31

http://projects.spring.io/spring-cloud

Page 32: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Example: Spring Cloud + Netflix OSS

32

Page 33: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Running a Config Server

33

@Configuration @EnableAutoConfiguration @EnableEurekaClient @EnableConfigServer public class ConfigServerApplication { ! public static void main(String[] args) { SpringApplication.run(ConfigServerApplication.class, args); } !}

Page 34: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Running a Eureka Server

34

@ComponentScan @Configuration @EnableAutoConfiguration @EnableEurekaServer @EnableEurekaClient public class EurekaApplication { ! public static void main(String[] args) { SpringApplication.run(EurekaApplication.class, args); } !}

Page 35: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Service Registration/Discovery

35

@EnableAutoConfiguration @ComponentScan @EnableScheduling @EnableHystrix @EnableEurekaClient 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); } !}

Page 36: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Service Registration/Discovery

36

Page 37: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Fault Tolerance

37

@EnableAutoConfiguration @ComponentScan @EnableScheduling @EnableHystrix @EnableEurekaClient 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); } !}

Page 38: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Enabling a Circuit Breaker

38

@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

Page 39: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 39

{ "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" } } }

Page 40: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 40

Page 41: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Circuit Breaker Fallback

41

public Link defaultLink(Map<String, Object> parameters) { return null; }

@HystrixCommand(fallbackMethod = "defaultLink") public Link getStoresByLocationLink(Map<String, Object> parameters) { //... }

Page 42: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 42

{ "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!!!

Page 43: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 43

Page 44: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 44

Operationalized ArchitectureYou have to pay for your lunch!

Page 45: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.© Copyright 2014 Pivotal. All rights reserved. 45

http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html

Page 46: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 46

Paying for your lunch…• Significant Operations Overhead

• Substantial DevOps Skills Required

• Implicit Interfaces

•Duplication of Effort

•Distributed System Complexity

•Asynchronicity is Difficult!

• Testability Challenges

Page 47: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

You must be this tall to use Microservices…

47

http://martinfowler.com/bliki/MicroservicePrerequisites.html

https://www.flickr.com/photos/gusset/3723961589

• RAPID PROVISIONING

•BASIC MONITORING

• RAPID APPLICATION DEPLOYMENT

•DEVOPS CULTURE

Page 48: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

It takes a platform…

48

http://techblog.netflix.com/2013/01/optimizing-netflix-api.htmlhttp://techblog.netflix.com/2014/03/the-netflix-dynamic-scripting-platform.html

Page 49: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

It takes a platform…

49

Pivotal CF Spring Cloud

Page 50: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 50

Platform Features• Environment Provisioning

•On-Demand/Automatic Scaling

• Failover/Resilience

• Routing/Load Balancing

•Data Service Operations

•Monitoring

Page 51: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Environment Provisioning/App Deployment

51

Rou

ter

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/

Page 52: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Environment Provisioning/App Deployment

52

Rou

ter

Cloud Controller

DEA

Blobstore DB

Runtime

Detect Compile UploadNo

System Buildpacks

+ =

Yes

http://docs.cloudfoundry.org/buildpacks/

Page 53: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Deployment/Load Balancing/Scaling

53

Blobstore

R

oute

r Cloud Controller

DEA

Messaging (NATS)

DEA DEA

Runtime

Access App

http://docs.cloudfoundry.org/concepts/architecture/warden.html

Container Container

Page 54: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Failover/Resilience

54

Blobstore

R

oute

r Cloud Controller

DEA

Messaging (NATS)

DEA DEA

Runtime

Health ManagerActual StateDesired State

http://docs.cloudfoundry.org/concepts/architecture/#hm9k

Container Container Container

Page 55: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Data Service Operations: Cluster Provisioning

55

Blobstore

BOSH

Health Monitor

DBDeploy my Services

IaaS

Worker VMs BOSH Director

NATS Cassandra Node

Target VMCassandra Node

Target VMCassandra Node

Target VM

http://bosh.cloudfoundry.org/

Page 56: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

DB

Rou

ter

Data Service Operations: Application Binding

56

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

Page 57: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Monitoring

57

Page 58: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 58

It’s All About the DataWhat about the BIG QUESTIONS?

Page 59: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

This won’t work…

59

Page 60: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 60

Instead!

Page 61: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Bounded Contexts

61

Movie Movie

Actor

Genre

Media Type

Media Type

Kiosk

Location

Media

Product Catalog

Inventory

Page 62: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Polyglot Persistence

62

REST XYou shall not pass…

Page 63: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

But I have a question!

63

REST XYou shall not pass…

?

?

? ?

?

?

Page 64: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Lambda Architecture

64

Page 65: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Join via Events!

65

Page 66: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 66

http://projects.spring.io/spring-xd/

Page 67: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 67

Page 68: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 68

Page 69: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

Redbox Conceptual Workflow

69

Page 70: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

SpringBox Microservices

70

Catalog Service

Inventory Service

Kiosk

Kiosk

Kiosk

Reservation Service

https://github.com/cf-platform-eng/springbox-datacloud

Page 71: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

…and if you have a question:

71

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?”

Page 72: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

“What movie genres are most popular in what geographic locations?”

72

// 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"

Page 73: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved.

“What movie genres are most popular in what geographic locations?”

73

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

Page 74: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

© Copyright 2014 Pivotal. All rights reserved. 74

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!

Page 75: To Microservices and Beyond! - YOW! Conferences...•Microservices are not an inherently superior architecture. •We’re still building big systems from smaller things. •Just like

A NEW PLATFORM FOR A NEW ERA