Managing Data at Scale: Microservices and Events. Randy linkedin.com/in/randyshoup

Similar documents
Managing Data in Microservices. Randy linkedin.com/in/randyshoup

BUILDING MICROSERVICES ON AZURE. ~ Vaibhav

Reactive Microservices Architecture on AWS

Design Micro Service Architectures the Right Way

Best Practices for Scaling Websites Lessons from ebay

Hi! NET Developer Group Braunschweig!

Microservice Splitting the Monolith. Software Engineering II Sharif University of Technology MohammadAmin Fazli

ebay Marketplace Architecture

1. Introduction. 2. Technology concepts

Connecting your Microservices and Cloud Services with Oracle Integration CON7348

Architectural challenges for building a low latency, scalable multi-tenant data warehouse

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver

Microservices Beyond the Hype. SATURN San Diego May 3, 2016 Paulo Merson

Cloud-Native Applications. Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0

Oracle Forms and Oracle APEX The Odd Couple

Principal Solutions Architect. Architecting in the Cloud

ebay s Architectural Principles

STATE OF MODERN APPLICATIONS IN THE CLOUD

Microservices Lessons Learned From a Startup Perspective

NoSQL systems: introduction and data models. Riccardo Torlone Università Roma Tre

Microservices. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Agenda. AWS Database Services Traditional vs AWS Data services model Amazon RDS Redshift DynamoDB ElastiCache

Technology Strategy and Roadmap. October 2015

monolith to micro-services? event sourcing can help Doug

Fluentd + MongoDB + Spark = Awesome Sauce

Distributed Architectures & Microservices. CS 475, Spring 2018 Concurrent & Distributed Systems

There is no such thing as a microservice!

Database Architecture 2 & Storage. Instructor: Matei Zaharia cs245.stanford.edu

Industry-leading Application PaaS Platform

Data Analytics at Logitech Snowflake + Tableau = #Winning

DELIVERING WITH MICROSERVICES HOW TO ITERATE TOWARDS SOPHISTICATION

[Docker] Containerization

Comparison of Event Choreography and Orchestration Techniques in Microservice Architecture

ebay, Inc. The ebay Architecture SD Forum 2006 Striking a balance between site stability, feature velocity, performance, and cost

Data-Intensive Distributed Computing

Microservices at Netflix Scale. First Principles, Tradeoffs, Lessons Learned Ruslan

5 Fundamental Strategies for Building a Data-centered Data Center

Architectural Code Analysis. Using it in building Microservices NYC Cloud Expo 2017 (June 6-8)

<Insert Picture Here> Future<JavaEE>

Microservices without the Servers: AWS Lambda in Action

August, HPE Propel Microservices & Jumpstart

Microservices on AWS. Matthias Jung, Solutions Architect AWS

Megastore: Providing Scalable, Highly Available Storage for Interactive Services & Spanner: Google s Globally- Distributed Database.

Migrating from Oracle to Espresso

CloudSwyft Learning-as-a-Service Course Catalog 2018 (Individual LaaS Course Catalog List)

Building a Data Strategy for a Digital World

HYBRID TRANSACTION/ANALYTICAL PROCESSING COLIN MACNAUGHTON

Prototyping Data Intensive Apps: TrendingTopics.org

How we built a highly scalable Machine Learning platform using Apache Mesos

How to re-invent your IT Architecture. André Christ, Co-CEO LeanIX

August Oracle - GoldenGate Statement of Direction

From business need to implementation Design the right information solution

From Single Purpose to Multi Purpose Data Lakes. Thomas Niewel Technical Sales Director DACH Denodo Technologies March, 2019

Webinar Series TMIP VISION

A domain model-centric approach to J2EE development. Keiron McCammon CTO Versant Corporation

Transform Your Enterprise Search and ediscovery on the AWS Cloud.

To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on CloudFoundry. Tony Erwin,

Making Data Integration Easy For Multiplatform Data Architectures With Diyotta 4.0. WEBINAR MAY 15 th, PM EST 10AM PST

Microservices Architekturen aufbauen, aber wie?

Oracle Applications in a Changing Business World. Legacy Oracle Applications Won't Be Around Forever. Will You?

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Transforming IT: From Silos To Services

Serverless Architecture Hochskalierbare Anwendungen ohne Server. Sascha Möllering, Solutions Architect

Complex event flows in distributed systems

Migrating Oracle Databases To Cassandra

A Journey to DynamoDB

What I ll be talking about. About me & bol.com The CI/CD bol.com Current setup. The future in the cloud

Designing a scalable twitter

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013

Microservices with Kafka Ecosystem. Guido Schmutz

Managing data consistency in a microservice architecture using Sagas

VMware Cloud Application Platform

Amazon Web Services. Block 402, 4 th Floor, Saptagiri Towers, Above Pantaloons, Begumpet Main Road, Hyderabad Telangana India

The SMACK Stack: Spark*, Mesos*, Akka, Cassandra*, Kafka* Elizabeth K. Dublin Apache Kafka Meetup, 30 August 2017.

AN EVENTFUL TOUR FROM ENTERPRISE INTEGRATION TO SERVERLESS. Marius Bogoevici Christian Posta 9 May, 2018

Introducing RecoverX 2.5

SUMMARY LAYERED ARCHITECTURE

How to Route Internet Traffic between A Mobile Application and IoT Device?

What s New at AWS? looking at just a few new things for Enterprise. Philipp Behre, Enterprise Solutions Architect, Amazon Web Services

Cloud + Big Data Putting it all Together

WHITEPAPER. Embracing Containers & Microservices for future-proof application modernization

Intermedia s Private Cloud Exchange

Microservices What, Why? ( 마이크로서비스를꼭써야하나 )

Developing Microsoft Azure Solutions (70-532) Syllabus

Database Architectures

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

Evolution of Big Data Facebook. Architecture Summit, Shenzhen, August 2012 Ashish Thusoo

Five Common Myths About Scaling MySQL

10. Business Process Management

ACID Is So Yesterday: Maintaining Data Consistency with Sagas

A Global In-memory Data System for MySQL Daniel Austin, PayPal Technical Staff

CISC 7610 Lecture 2b The beginnings of NoSQL

Serverless in the Java ecosystem

Amazon Aurora Relational databases reimagined.

Oracle Data Integrator 12c: ETL Integration Bootcamp and New Features

Composite Software Data Virtualization The Five Most Popular Uses of Data Virtualization

CockroachDB on DC/OS. Ben Darnell, CTO, Cockroach Labs

Shen PingCAP 2017

Migrate from Netezza Workload Migration

1 Dulcian, Inc., 2001 All rights reserved. Oracle9i Data Warehouse Review. Agenda

Transcription:

Managing Data at Scale: Microservices and Events Randy Shoup @randyshoup linkedin.com/in/randyshoup

Background VP Engineering at Stitch Fix o Combining Art and Science to revolutionize apparel retail Consulting CTO as a service o Helping companies scale engineering organizations and technology Director of Engineering for Google App Engine o World s largest Platform-as-a-Service Chief Engineer / Distinguished Architect at ebay o Multiple generations of ebay s infrastructure

Stitch Fix

Stitch Fix

Stitch Fix

Stitch Fix

Combining Art and [Data] Science 1:1 Ratio of Data Science to Engineering o >75 software engineers o >75 data scientists and algorithm developers o Unique in our industry Apply intelligence to *every* part of the business o Buying o Inventory management o Logistics optimization o Styling recommendations o Demand prediction Humans and machines augmenting each other

Inventory Styling at Stitch Fix Personal styling

Personalized Recommendations Inventory Algorithmic recommendations Machine learning

Expert Human Curation Algorithmic recommendations Human curation

Evolution to Microservices ebay 5 th generation today Monolithic Perl à Monolithic C++ à Java à microservices Twitter 3 rd generation today Monolithic Rails à JS / Rails / Scala à microservices Amazon Nth generation today Monolithic Perl / C++ à Java / Scala à microservices @randyshoup linkedin.com/in/randyshoup

No one starts with microservices Past a certain scale, everyone ends up with microservices

First Law of Distributed Object Design: Don t distribute your objects! -- Martin Fowler

If you don t end up regretting your early technology decisions, you probably overengineered.

Microservices Single-purpose Simple, well-defined interface Modular and independent A B C D E

Microservices are nothing more than SOA done properly. -- me

Microservices Single-purpose Simple, well-defined interface Modular and independent Isolated persistence (!) A B C D E

Microservice Persistence Approach 1: Operate your own data store o Store to your own instance(s) of {Postgres, MySQL, etc.}, owned and operated by the service team Approach 2: Use a persistence service o Store to your own schema in {Dynamo, RDS, Spanner, etc.}, operated as a service by another team or by a third-party provider o Isolated from all other users of the service è Only external access to data store is through published service interface

Microservices Pros Cons Each unit is simple Independent scaling and performance Independent testing and deployment Optimal technology stack Multiple cooperating units Exchange in-process for network latencies More sophisticated deployment and monitoring tools Overall system complexity Security boundary

Why Rearchitect? Velocity o Time to market is constrained by coupling and lack of isolation in the monolith o Teams step on each others toes, and can no longer develop independently o Difficult for new engineers to be productive Scaling o Vertical scaling of the monolith no longer works o Parts of the system need to scale independently of others

Why Rearchitect? Deployment o Parts of the system need to deploy independently of others o Monolithic release is too slow, too complicated, too risky

The only thing a Big Bang migration guarantees is a big *Bang*. -- Martin Fowler

Extracting Microservices Problem: Monolithic shared DB stitchfix.com Styling app Warehouse app Merch app CS app Logistics app Payments service Profile service Clients Shipments Items Styles, SKUs Warehouses etc.

Extracting Microservices Decouple applications / services from shared DB stitchfix.com Styling app Warehouse app Merch app CS app Logistics app Payments service Profile service Clients Shipments Items Styles, SKUs Warehouses etc.

Extracting Microservices Decouple applications / services from shared DB Styling app Warehouse app core_client core_sku core_item

Extracting Microservices Step 1: Create a service Styling app Warehouse app client-service core_client core_sku core_item

Extracting Microservices Step 2: Applications use the service Styling app Warehouse app client-service core_client core_sku core_item

Extracting Microservices Step 3: Move data to private database Styling app Warehouse app client-service core_client core_sku core_item

Extracting Microservices Step 4: Rinse and Repeat Styling app Warehouse app client-service item-service core_client core_item core_sku

Extracting Microservices Step 4: Rinse and Repeat Styling app Warehouse app client-service item-service core_client core_item style-service core_sku

Extracting Microservices Step 4: Rinse and Repeat Styling app Warehouse app client-service item-service core_client core_item style-service core_sku

With Microservices, how do we do Shared Data Joins Transactions

Events as First-Class Construct A significant change in state o Statement that some interesting thing occurred Traditional 3-tier system o Presentation è interface / interaction o Application è stateless business logic o Persistence è database Fourth fundamental building block o State changes è events o 0 1 N consumers subscribe to the event, typically asynchronously @randyshoup linkedin.com/in/randyshoup

Microservices and Events Events are a first-class part of a service interface A service interface includes o Synchronous request-response (REST, grpc, etc) o Events the service produces o Events the service consumes o Bulk reads and writes (ETL) The interface includes any mechanism for getting data in or out of the service (!) @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Shared Data Monolithic database makes it easy to leverage shared data Where does shared data go in a microservices world? @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Shared Data Principle: Single System of Record o Every piece of data is owned by a single service o That service is the canonical system of record for that data customer-service styling-service customer-search billing-service Every other copy is a read-only, non-authoritative cache @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Shared Data Approach 1: Synchronous Lookup o Customer service owns customer data o Fulfillment service calls customer service in real time fulfillment-service customer-service @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Shared Data Approach 2: Async event + local cache o Customer service owns customer data o Customer service sends address-updated event when customer address changes o Fulfillment service caches current customer address customer-service fulfillment-service @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Shared Data Approach 3: Shared metadata library o Read-only metadata, basically immutable o E.g., size schemas, colors, fabrics, US States, etc. item-service receiving-service style-service

Microservice Techniques: Joins Monolithic database makes it easy to join tables SELECT FROM A INNER JOIN B ON Splitting the data across microservices makes joins very hard @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Joins Approach 1: Join in Client Application o Get a single customer from customer-service o Query matching orders for that customer from order-service order-history-page customer-service order-service Customers Orders

Microservice Techniques: Joins Approach 2: Service that Materializes the View o Listen to events from item-service, events from order-service o Maintain denormalized join of items and orders together in local storage item-service order-feedback-service item-feedback-service Items Order Feedback

Microservice Techniques: Joins Many common systems do this o Materialized view in database systems o Most NoSQL systems o Search engines o Analytic systems @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Workflows and Sagas Monolithic database makes transactions across multiple entities easy BEGIN; INSERT INTO A ; UPDATE B...; COMMIT; Splitting data across services makes transactions very hard @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Workflows and Sagas Transaction è Saga o Model the transaction as a state machine of atomic events Reimplement as a workflow A B C Roll back by applying compensating operations in reverse A B C @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Workflows and Sagas Many common systems do this o Payment processing o Expense approval o Travel o Any multi-step workflow @randyshoup linkedin.com/in/randyshoup

Microservice Techniques: Workflows and Sagas Simple event-driven processing o Very lightweight logic o Stateless o Triggered by an event ƛ ƛ ƛ A B C ƛ ƛ ƛ A B C è Consider Function-as-a-Service ( Serverless ) @randyshoup linkedin.com/in/randyshoup

With Microservices, how do we do Shared Data Joins Transactions

Events!

Thank You! @randyshoup linkedin.com/in/randyshoup