SlideShare a Scribd company logo
1 of 43
Download to read offline
µService Architecture:
A Personal Journey of Discovery

Fred George
fredgeorge@acm.org
@fgeorge52


Copyright © 2012 by Fred George. All rights reserved.   1
In the Beginning...




Copyright © 2012 by Fred George. All rights reserved.   2
2004:
1M loc - Largest Certified
J2EE Application




Copyright © 2012 by Fred George. All rights reserved.   3
It Started
Well...
Martin Fowler
consulted, then
joined ThoughtWorks




Copyright © 2009 by Fred George   4
What I Found in 2004

✦    1M locs
✦    2,000 tests
✦    70% success rate on Acceptance Test was Acceptable
✦    Bug database with over 1000 entries
✦    Still being changed
✦    New tests almost non-existent


Copyright © 2012 by Fred George. All rights reserved.     5
Unit Test Counts




Copyright © 2012 by Fred George. All rights reserved.   6
assertNotNull (new Loan(50));

      ✦     Easy (reasonably) unit test
      ✦     On Saturday without interruptions




               5 hours later, it passed!
Copyright © 2012 by Fred George. All rights reserved.   7
2004:
1M loc - Largest Certified
J2EE Application

“100K loc trying to get out”
                                                        Jeff Bay




Copyright © 2012 by Fred George. All rights reserved.              8
Why? What Happened?
                                                              Sloppy
             Lazy?

                                         Technical Debt
                                                        No power to refuse!
Inexperienced!


Copyright © 2012 by Fred George. All rights reserved.                         9
Evolution...




Copyright © 2012 by Fred George. All rights reserved.   10
2005: SOA in Chinese Bank
   Cash,
                                                    Loans   Mortgage   Insurance
  Balances




Copyright © 2012 by Fred George. All rights reserved.                              11
Solution: Pub/Sub

                                                                    e d
      ✦     Events “published”

                                                              c t
      ✦

      ✦
            Interested applications “subscribe”



                                                        j e
            Applications then “publish” interaction requests
      ✦




                        R e
            UI elements render appropriate interactions




Copyright © 2012 by Fred George. All rights reserved.                     12
2004: 2005
1M loc - Largest Certified
J2EE Application

“20 5K loc trying to get
out”

“100K loc trying to get out”
Copyright © 2012 by Fred George. All rights reserved.   13
2005: Medical Systems



                                                   Information “Nuggets”




Copyright © 2012 by Fred George. All rights reserved.                      14
From:                        CAT Scan

               About:                           Jane Doe

                                                                            e d
         Urgency:
                   Time:
                                         23 Apr 2012
                                           20:13:45
                                                Concern
                                                               c t         Summary




           Validity:
                                         26 Apr 2012
                                           20:13:45

                                                        j e            Only relevant
                                                                          until...




                        R e                        Information “Nuggets”


Copyright © 2012 by Fred George. All rights reserved.                                  15
2005: Services for
Investment Management
                                                                    p e
✦    Prototyping new system architecture

                                                              t y
                                                          o
✦    Baysian Service Principles (Jeff Bay)



                                                        t
      ✦     It’s okay to run more than one version at the same
            time


✦
      ✦




                                r o
            You can only deploy one service at a time
     Decoupling result: Deploying 3 times a day!


               P
Copyright © 2012 by Fred George. All rights reserved.                     16
2006: Batch Processing
Replacement Orders

✦    Client needed to replace parts on cars
      ✦     Many variations based on car, location of car
✦    Vendor estimated 15- months
                         18
✦    Unacceptable to business




Copyright © 2012 by Fred George. All rights reserved.       17
2006: Batch Processing
Replacement Orders




Copyright © 2012 by Fred George. All rights reserved.   18
Refined Packet Design

 ?         Addr ?                         ?             ?    ?


                                                                   ?   ?   ? VIN   ?   ?



                    Date                ?           ?       ? Name ?



Copyright © 2012 by Fred George. All rights reserved.                                      19
?         Addr ?                         ?             ?   ?

                                                                      d
                                                                  Join Table

                                                                    e
              •Need VIN
              •Need zzz
              •Inject aaa
                             r ks
                            e e
                           v e
                          i w
                                                                •Need Addr
                                                                •Inject Name

                        l
                       e 9
                     D  •Need Name
                        •Need rrr
                        •Inject VIN


                       i n
Copyright © 2012 by Fred George. All rights reserved.                          20
New Observations and
Revelations
✦    Services are like Classes
      ✦     Small, crisp conceptualization
      ✦     Services got very tiny (100 loc)
✦    Smalltalk message passing perfect for services
✦    Encapsulation
      ✦     Database segregated among services w/o sharing
      ✦     Service publishes conclusions, not raw data

Copyright © 2012 by Fred George. All rights reserved.        21
New Problems and
Challenges
                                                                    d ?
✦    “WTF is going on ?”

                                                              r e
      ✦

      ✦
            Cycles, lost packets
            Needed to redefine tracking, logging

                                                        v e
✦    Inexperienced team in defining services
      ✦

                                            l
            Approach compromised in Release 2 i
✦



             D e
     Won award at TW Tech Day... for being a bad idea!


Copyright © 2012 by Fred George. All rights reserved.                     22
2004: 2005 2006
1M loc - Largest Certified
J2EE Application
 200 500 loc
“20 5K loc trying to get
out”

Copyright © 2012 by Fred George. All rights reserved.   23
Experiences at...




Copyright © 2012 by Fred George. All rights reserved.   24
2007: Forward Needs to
Monitor AdWords Accounts
                                                                    e d
                                                                t
✦    Pub/sub model based on Linda Spaces (tuples)
            Segregate databases to services


                                                              c
      ✦

            Define agent services for each user


                                                          e
      ✦

            Start to automate activities and recommendations


                                                        j
      ✦

✦    Off-shore for implementation
✦

      ✦
            solution    R e
     CTO killed it (former Oracle executive)
            Replaced with a more traditional, SQL DB-driven

Copyright © 2012 by Fred George. All rights reserved.                     25
2008: CardWall

                                                                    e d
✦    Front-end automated Card Wall in Agile
                                                              e r
✦    Back-end emerged as a set of services analyzing data

                                                        i v
                                              l
      ✦     One service, one role


✦
      ✦



                               D
     Migrated to Hadoop Cluster as it grew  e
            Post alerts (with recommendations) to users




Copyright © 2012 by Fred George. All rights reserved.                     26
New Observations and
Revelations
✦    Services became disposable
✦    Loosely coupled via RESTful Json packets or DB
      ✦     Albeit still knowledgeable about flow
✦    Self-monitoring services replaces Unit Tests
✦    Business monitoring replaces Acceptance Tests
✦    Services language-agnostic


Copyright © 2012 by Fred George. All rights reserved.   27
Current State...




Copyright © 2012 by Fred George. All rights reserved.   28
Copyright © 2012 by Fred George. All rights reserved.   29
Copyright © 2012 by Fred George. All rights reserved.   30
Design: Events, not Entities




Copyright © 2012 by Fred George. All rights reserved.   31
Design: History, not Current




Copyright © 2012 by Fred George. All rights reserved.   32
Legacy System
              Web                                        Web
       Services                                         Services
                                                                                ETL/
                Biz                                       Biz                   Data
                                                                               Muddling
             Data                                        Data

                                                                   Reporting

Copyright © 2012 by Fred George. All rights reserved.                                 33
Cloud of Signals
                                                                          Email Read
     Postcode

                                                        Email Address
       Name
                                                                        Postal Address

                     Server Load
                                                               URL Request
Copyright © 2012 by Fred George. All rights reserved.                                    34
Data Ecosystem
   Producers                                                Kafka         Consumers
                                                        Postal Address
App                                                                         R
                            App
                                                                                    Hive
Service                                                 Email Address
                                                                         Monitoring
          Web Server                                    URL Request
                                                                                 Apps/
3rd Party                                                                       Services
                                                            Name
Web Hooks

Copyright © 2012 by Fred George. All rights reserved.                                      35
Cross-sell Tracking




Copyright © 2012 by Fred George. All rights reserved.   36
User Paths Through Site




Copyright © 2012 by Fred George. All rights reserved.   37
Agile Best Practices Not Used
              Trust w
✦ Stand ups collocation                                  ✦   Unit tests
✦    Story narratives                                    ✦   Acceptance tests
                                                                              Small,
✦    Retrospectives                                      ✦   Refactoring
                                                                            short-lived
✦    Estimates                                           ✦   Patterns          apps
                                              Results,
✦    Iterations                              not blame   ✦   Continuous integration
✦    Mandatory pairing                                              Continuous
                                                                    deployment


Copyright © 2012 by Fred George. All rights reserved.                                 38
What About Technical Debt?
                                                                         Sloppy
             Lazy?

                                                        Technical Debt




                                                                 No power to refuse!
Inexperienced!


Copyright © 2012 by Fred George. All rights reserved.                                  39
Conclusions (so far)...




Copyright © 2012 by Fred George. All rights reserved.   40
Summary Principles of
µServices
✦    Very, very small
✦    Loosely coupled (including flow)
✦    Multiple versions acceptable (encouraged?)
✦    Self-execution monitoring of each service
✦    Publish interesting “stuff” (w/o requirement)
✦    “Application” seems to be poor conceptualization


Copyright © 2012 by Fred George. All rights reserved.   41
“Living Software” System
✦    Long-lived system; short-lived services (human body)
✦    Extremely dynamic with continuous deployments
      ✦     5- minutes between deployments typical
              10
✦    Accept it is complex (especially for testing)
      ✦     Acceptance test on business outcomes instead
✦    Radical impact to processes (Anarchy)
✦    There will be a learning curve for developers!

Copyright © 2012 by Fred George. All rights reserved.       42
µService Architecture:
A Personal Journey of Discovery

Fred George
fredgeorge@acm.org
@fgeorge52


Copyright © 2012 by Fred George. All rights reserved.   43

More Related Content

What's hot

Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanAraf Karsh Hamid
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services ArchitectureAraf Karsh Hamid
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMohamedElGohary71
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsAraf Karsh Hamid
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice ArchitectureWSO2
 
Event-driven microservices
Event-driven microservicesEvent-driven microservices
Event-driven microservicesAndrew Schofield
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitecturePaul Mooney
 
Evolution of Microservices - Craft Conference
Evolution of Microservices - Craft ConferenceEvolution of Microservices - Craft Conference
Evolution of Microservices - Craft ConferenceAdrian Cockcroft
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principlesSanjoy Kumar Roy
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Azure API Management
Azure API ManagementAzure API Management
Azure API ManagementDaniel Toomey
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailogjuljo
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 
Microservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web ServicesMicroservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web ServicesAmazon Web Services
 
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Your Journey to Cloud-Native Begins with DevOps, Microservices, and ContainersYour Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Your Journey to Cloud-Native Begins with DevOps, Microservices, and ContainersAtlassian
 
API Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API ManagementAPI Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API ManagementBizTalk360
 

What's hot (20)

Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith Architecture
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice Architecture
 
Event-driven microservices
Event-driven microservicesEvent-driven microservices
Event-driven microservices
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Cloud Migration Workshop
Cloud Migration WorkshopCloud Migration Workshop
Cloud Migration Workshop
 
Evolution of Microservices - Craft Conference
Evolution of Microservices - Craft ConferenceEvolution of Microservices - Craft Conference
Evolution of Microservices - Craft Conference
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Api observability
Api observability Api observability
Api observability
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web ServicesMicroservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web Services
 
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Your Journey to Cloud-Native Begins with DevOps, Microservices, and ContainersYour Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
 
API Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API ManagementAPI Management Part 1 - An Introduction to Azure API Management
API Management Part 1 - An Introduction to Azure API Management
 

Viewers also liked

Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programmingMichael Neale
 
How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...
How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...
How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...Kevin Goldsmith
 
Application Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at NetflixApplication Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at NetflixMuleSoft
 
Mastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesMastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesJosh Evans
 
Modern Enterprise integration Strategies
Modern Enterprise integration StrategiesModern Enterprise integration Strategies
Modern Enterprise integration StrategiesJesus Rodriguez
 
Microservices at Spotify
Microservices at SpotifyMicroservices at Spotify
Microservices at SpotifyKevin Goldsmith
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Giorgio Cefaro
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleSudhir Tonse
 

Viewers also liked (9)

Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programming
 
How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...
How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...
How Spotify Builds Products (Organization. Architecture, Autonomy, Accountabi...
 
Application Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at NetflixApplication Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at Netflix
 
Mastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesMastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to Microservices
 
Modern Enterprise integration Strategies
Modern Enterprise integration StrategiesModern Enterprise integration Strategies
Modern Enterprise integration Strategies
 
Microservices at Spotify
Microservices at SpotifyMicroservices at Spotify
Microservices at Spotify
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scale
 
From SOA to MSA
From SOA to MSAFrom SOA to MSA
From SOA to MSA
 

Similar to MicroService Architecture

Taking Hollywood Out of Production
Taking Hollywood Out of ProductionTaking Hollywood Out of Production
Taking Hollywood Out of ProductionR/GA
 
Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...
Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...
Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...Dave King
 
Inspire 2012 - Lollapalooza
Inspire 2012 - LollapaloozaInspire 2012 - Lollapalooza
Inspire 2012 - LollapaloozaRyan Manchee
 
Sharing the Success of OpenID Japan Success
Sharing the Success of OpenID Japan SuccessSharing the Success of OpenID Japan Success
Sharing the Success of OpenID Japan SuccessNat Sakimura
 
Global Say on Pay: Coming to Your Stock Plan in 2013
Global Say on Pay:  Coming to Your Stock Plan in 2013Global Say on Pay:  Coming to Your Stock Plan in 2013
Global Say on Pay: Coming to Your Stock Plan in 2013fwhittlesey
 
Inspire 1012- Dean Donaldson-Living in a material world
Inspire 1012- Dean Donaldson-Living in a material world Inspire 1012- Dean Donaldson-Living in a material world
Inspire 1012- Dean Donaldson-Living in a material world MediaMindGlobal
 
Inspire 1012 - Living in a Material World
Inspire 1012 - Living in a Material WorldInspire 1012 - Living in a Material World
Inspire 1012 - Living in a Material WorldDean Donaldson
 
Fighting counterfeit motion pictures
Fighting counterfeit motion picturesFighting counterfeit motion pictures
Fighting counterfeit motion picturesKenny Nguyen
 
Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Guy Harrison
 
Duck Dynasty Template - Oct 2012
Duck Dynasty Template - Oct 2012Duck Dynasty Template - Oct 2012
Duck Dynasty Template - Oct 2012Ashley Endlich
 
Fashion star s2 screenshot deck final 3.12.13
Fashion star s2 screenshot deck final 3.12.13Fashion star s2 screenshot deck final 3.12.13
Fashion star s2 screenshot deck final 3.12.13miotakahashi
 
Medinah 2012 slideshow
Medinah 2012 slideshowMedinah 2012 slideshow
Medinah 2012 slideshowEmtec Inc.
 
BYOD Trends, Challenges, Pitfalls and Tips
BYODTrends, Challenges, Pitfalls and TipsBYODTrends, Challenges, Pitfalls and Tips
BYOD Trends, Challenges, Pitfalls and TipsAxios Systems
 
Nouvelle Cuisine (2012)
Nouvelle Cuisine (2012)Nouvelle Cuisine (2012)
Nouvelle Cuisine (2012)Marc Jadoul
 
Purposeful Mobile: Thoughts on Mobile Research - Confirmit
Purposeful Mobile: Thoughts on Mobile Research - ConfirmitPurposeful Mobile: Thoughts on Mobile Research - Confirmit
Purposeful Mobile: Thoughts on Mobile Research - ConfirmitMerlien Institute
 
Ellie Mae Inc.: Redefining the Mortgage Industry with Search
Ellie Mae Inc.: Redefining the Mortgage Industry with SearchEllie Mae Inc.: Redefining the Mortgage Industry with Search
Ellie Mae Inc.: Redefining the Mortgage Industry with SearchElasticsearch
 
Defrag 2012: anticipation nation 2020
Defrag 2012: anticipation nation 2020 Defrag 2012: anticipation nation 2020
Defrag 2012: anticipation nation 2020 Paul Muller
 

Similar to MicroService Architecture (20)

Taking Hollywood Out of Production
Taking Hollywood Out of ProductionTaking Hollywood Out of Production
Taking Hollywood Out of Production
 
Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...
Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...
Mobile Research in Emerging Markets - Heineken Goes Mobile in Africa and The ...
 
Being Influential Online
Being Influential OnlineBeing Influential Online
Being Influential Online
 
Inspire 2012 - Lollapalooza
Inspire 2012 - LollapaloozaInspire 2012 - Lollapalooza
Inspire 2012 - Lollapalooza
 
Sharing the Success of OpenID Japan Success
Sharing the Success of OpenID Japan SuccessSharing the Success of OpenID Japan Success
Sharing the Success of OpenID Japan Success
 
Leading Change
Leading ChangeLeading Change
Leading Change
 
Global Say on Pay: Coming to Your Stock Plan in 2013
Global Say on Pay:  Coming to Your Stock Plan in 2013Global Say on Pay:  Coming to Your Stock Plan in 2013
Global Say on Pay: Coming to Your Stock Plan in 2013
 
Inspire 1012- Dean Donaldson-Living in a material world
Inspire 1012- Dean Donaldson-Living in a material world Inspire 1012- Dean Donaldson-Living in a material world
Inspire 1012- Dean Donaldson-Living in a material world
 
Inspire 1012 - Living in a Material World
Inspire 1012 - Living in a Material WorldInspire 1012 - Living in a Material World
Inspire 1012 - Living in a Material World
 
Fighting counterfeit motion pictures
Fighting counterfeit motion picturesFighting counterfeit motion pictures
Fighting counterfeit motion pictures
 
Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data
 
Duck Dynasty Template - Oct 2012
Duck Dynasty Template - Oct 2012Duck Dynasty Template - Oct 2012
Duck Dynasty Template - Oct 2012
 
Fashion star s2 screenshot deck final 3.12.13
Fashion star s2 screenshot deck final 3.12.13Fashion star s2 screenshot deck final 3.12.13
Fashion star s2 screenshot deck final 3.12.13
 
Medinah 2012 slideshow
Medinah 2012 slideshowMedinah 2012 slideshow
Medinah 2012 slideshow
 
BYOD Trends, Challenges, Pitfalls and Tips
BYODTrends, Challenges, Pitfalls and TipsBYODTrends, Challenges, Pitfalls and Tips
BYOD Trends, Challenges, Pitfalls and Tips
 
Nouvelle Cuisine (2012)
Nouvelle Cuisine (2012)Nouvelle Cuisine (2012)
Nouvelle Cuisine (2012)
 
Purposeful Mobile: Thoughts on Mobile Research - Confirmit
Purposeful Mobile: Thoughts on Mobile Research - ConfirmitPurposeful Mobile: Thoughts on Mobile Research - Confirmit
Purposeful Mobile: Thoughts on Mobile Research - Confirmit
 
Opening Keynote
Opening KeynoteOpening Keynote
Opening Keynote
 
Ellie Mae Inc.: Redefining the Mortgage Industry with Search
Ellie Mae Inc.: Redefining the Mortgage Industry with SearchEllie Mae Inc.: Redefining the Mortgage Industry with Search
Ellie Mae Inc.: Redefining the Mortgage Industry with Search
 
Defrag 2012: anticipation nation 2020
Defrag 2012: anticipation nation 2020 Defrag 2012: anticipation nation 2020
Defrag 2012: anticipation nation 2020
 

More from Fred George

Go Faster - Remove Inhibitors to Rapid Innovation
Go Faster - Remove Inhibitors to Rapid InnovationGo Faster - Remove Inhibitors to Rapid Innovation
Go Faster - Remove Inhibitors to Rapid InnovationFred George
 
Programmer Anarchy and Managerless Processes
Programmer Anarchy and Managerless ProcessesProgrammer Anarchy and Managerless Processes
Programmer Anarchy and Managerless ProcessesFred George
 
Secret Assumption of Agile
Secret Assumption of AgileSecret Assumption of Agile
Secret Assumption of AgileFred George
 
Agile is the New Black
Agile is the New BlackAgile is the New Black
Agile is the New BlackFred George
 
It's a Bird, It's a Plan, No It's Superman
It's a Bird, It's a Plan, No It's SupermanIt's a Bird, It's a Plan, No It's Superman
It's a Bird, It's a Plan, No It's SupermanFred George
 
Programmer Anarchy (Chinese Mandarin)
Programmer Anarchy (Chinese Mandarin)Programmer Anarchy (Chinese Mandarin)
Programmer Anarchy (Chinese Mandarin)Fred George
 
Programmer Anarchy (English)
Programmer Anarchy (English)Programmer Anarchy (English)
Programmer Anarchy (English)Fred George
 
Secret Assumption of Agile (Chinese)
Secret Assumption of Agile (Chinese)Secret Assumption of Agile (Chinese)
Secret Assumption of Agile (Chinese)Fred George
 
It's A Bird, It's a Plane, ... (in Chinese)
It's A Bird, It's a Plane, ... (in Chinese)It's A Bird, It's a Plane, ... (in Chinese)
It's A Bird, It's a Plane, ... (in Chinese)Fred George
 

More from Fred George (9)

Go Faster - Remove Inhibitors to Rapid Innovation
Go Faster - Remove Inhibitors to Rapid InnovationGo Faster - Remove Inhibitors to Rapid Innovation
Go Faster - Remove Inhibitors to Rapid Innovation
 
Programmer Anarchy and Managerless Processes
Programmer Anarchy and Managerless ProcessesProgrammer Anarchy and Managerless Processes
Programmer Anarchy and Managerless Processes
 
Secret Assumption of Agile
Secret Assumption of AgileSecret Assumption of Agile
Secret Assumption of Agile
 
Agile is the New Black
Agile is the New BlackAgile is the New Black
Agile is the New Black
 
It's a Bird, It's a Plan, No It's Superman
It's a Bird, It's a Plan, No It's SupermanIt's a Bird, It's a Plan, No It's Superman
It's a Bird, It's a Plan, No It's Superman
 
Programmer Anarchy (Chinese Mandarin)
Programmer Anarchy (Chinese Mandarin)Programmer Anarchy (Chinese Mandarin)
Programmer Anarchy (Chinese Mandarin)
 
Programmer Anarchy (English)
Programmer Anarchy (English)Programmer Anarchy (English)
Programmer Anarchy (English)
 
Secret Assumption of Agile (Chinese)
Secret Assumption of Agile (Chinese)Secret Assumption of Agile (Chinese)
Secret Assumption of Agile (Chinese)
 
It's A Bird, It's a Plane, ... (in Chinese)
It's A Bird, It's a Plane, ... (in Chinese)It's A Bird, It's a Plane, ... (in Chinese)
It's A Bird, It's a Plane, ... (in Chinese)
 

MicroService Architecture

  • 1. µService Architecture: A Personal Journey of Discovery Fred George fredgeorge@acm.org @fgeorge52 Copyright © 2012 by Fred George. All rights reserved. 1
  • 2. In the Beginning... Copyright © 2012 by Fred George. All rights reserved. 2
  • 3. 2004: 1M loc - Largest Certified J2EE Application Copyright © 2012 by Fred George. All rights reserved. 3
  • 4. It Started Well... Martin Fowler consulted, then joined ThoughtWorks Copyright © 2009 by Fred George 4
  • 5. What I Found in 2004 ✦ 1M locs ✦ 2,000 tests ✦ 70% success rate on Acceptance Test was Acceptable ✦ Bug database with over 1000 entries ✦ Still being changed ✦ New tests almost non-existent Copyright © 2012 by Fred George. All rights reserved. 5
  • 6. Unit Test Counts Copyright © 2012 by Fred George. All rights reserved. 6
  • 7. assertNotNull (new Loan(50)); ✦ Easy (reasonably) unit test ✦ On Saturday without interruptions 5 hours later, it passed! Copyright © 2012 by Fred George. All rights reserved. 7
  • 8. 2004: 1M loc - Largest Certified J2EE Application “100K loc trying to get out” Jeff Bay Copyright © 2012 by Fred George. All rights reserved. 8
  • 9. Why? What Happened? Sloppy Lazy? Technical Debt No power to refuse! Inexperienced! Copyright © 2012 by Fred George. All rights reserved. 9
  • 10. Evolution... Copyright © 2012 by Fred George. All rights reserved. 10
  • 11. 2005: SOA in Chinese Bank Cash, Loans Mortgage Insurance Balances Copyright © 2012 by Fred George. All rights reserved. 11
  • 12. Solution: Pub/Sub e d ✦ Events “published” c t ✦ ✦ Interested applications “subscribe” j e Applications then “publish” interaction requests ✦ R e UI elements render appropriate interactions Copyright © 2012 by Fred George. All rights reserved. 12
  • 13. 2004: 2005 1M loc - Largest Certified J2EE Application “20 5K loc trying to get out” “100K loc trying to get out” Copyright © 2012 by Fred George. All rights reserved. 13
  • 14. 2005: Medical Systems Information “Nuggets” Copyright © 2012 by Fred George. All rights reserved. 14
  • 15. From: CAT Scan About: Jane Doe e d Urgency: Time: 23 Apr 2012 20:13:45 Concern c t Summary Validity: 26 Apr 2012 20:13:45 j e Only relevant until... R e Information “Nuggets” Copyright © 2012 by Fred George. All rights reserved. 15
  • 16. 2005: Services for Investment Management p e ✦ Prototyping new system architecture t y o ✦ Baysian Service Principles (Jeff Bay) t ✦ It’s okay to run more than one version at the same time ✦ ✦ r o You can only deploy one service at a time Decoupling result: Deploying 3 times a day! P Copyright © 2012 by Fred George. All rights reserved. 16
  • 17. 2006: Batch Processing Replacement Orders ✦ Client needed to replace parts on cars ✦ Many variations based on car, location of car ✦ Vendor estimated 15- months 18 ✦ Unacceptable to business Copyright © 2012 by Fred George. All rights reserved. 17
  • 18. 2006: Batch Processing Replacement Orders Copyright © 2012 by Fred George. All rights reserved. 18
  • 19. Refined Packet Design ? Addr ? ? ? ? ? ? ? VIN ? ? Date ? ? ? Name ? Copyright © 2012 by Fred George. All rights reserved. 19
  • 20. ? Addr ? ? ? ? d Join Table e •Need VIN •Need zzz •Inject aaa r ks e e v e i w •Need Addr •Inject Name l e 9 D •Need Name •Need rrr •Inject VIN i n Copyright © 2012 by Fred George. All rights reserved. 20
  • 21. New Observations and Revelations ✦ Services are like Classes ✦ Small, crisp conceptualization ✦ Services got very tiny (100 loc) ✦ Smalltalk message passing perfect for services ✦ Encapsulation ✦ Database segregated among services w/o sharing ✦ Service publishes conclusions, not raw data Copyright © 2012 by Fred George. All rights reserved. 21
  • 22. New Problems and Challenges d ? ✦ “WTF is going on ?” r e ✦ ✦ Cycles, lost packets Needed to redefine tracking, logging v e ✦ Inexperienced team in defining services ✦ l Approach compromised in Release 2 i ✦ D e Won award at TW Tech Day... for being a bad idea! Copyright © 2012 by Fred George. All rights reserved. 22
  • 23. 2004: 2005 2006 1M loc - Largest Certified J2EE Application 200 500 loc “20 5K loc trying to get out” Copyright © 2012 by Fred George. All rights reserved. 23
  • 24. Experiences at... Copyright © 2012 by Fred George. All rights reserved. 24
  • 25. 2007: Forward Needs to Monitor AdWords Accounts e d t ✦ Pub/sub model based on Linda Spaces (tuples) Segregate databases to services c ✦ Define agent services for each user e ✦ Start to automate activities and recommendations j ✦ ✦ Off-shore for implementation ✦ ✦ solution R e CTO killed it (former Oracle executive) Replaced with a more traditional, SQL DB-driven Copyright © 2012 by Fred George. All rights reserved. 25
  • 26. 2008: CardWall e d ✦ Front-end automated Card Wall in Agile e r ✦ Back-end emerged as a set of services analyzing data i v l ✦ One service, one role ✦ ✦ D Migrated to Hadoop Cluster as it grew e Post alerts (with recommendations) to users Copyright © 2012 by Fred George. All rights reserved. 26
  • 27. New Observations and Revelations ✦ Services became disposable ✦ Loosely coupled via RESTful Json packets or DB ✦ Albeit still knowledgeable about flow ✦ Self-monitoring services replaces Unit Tests ✦ Business monitoring replaces Acceptance Tests ✦ Services language-agnostic Copyright © 2012 by Fred George. All rights reserved. 27
  • 28. Current State... Copyright © 2012 by Fred George. All rights reserved. 28
  • 29. Copyright © 2012 by Fred George. All rights reserved. 29
  • 30. Copyright © 2012 by Fred George. All rights reserved. 30
  • 31. Design: Events, not Entities Copyright © 2012 by Fred George. All rights reserved. 31
  • 32. Design: History, not Current Copyright © 2012 by Fred George. All rights reserved. 32
  • 33. Legacy System Web Web Services Services ETL/ Biz Biz Data Muddling Data Data Reporting Copyright © 2012 by Fred George. All rights reserved. 33
  • 34. Cloud of Signals Email Read Postcode Email Address Name Postal Address Server Load URL Request Copyright © 2012 by Fred George. All rights reserved. 34
  • 35. Data Ecosystem Producers Kafka Consumers Postal Address App R App Hive Service Email Address Monitoring Web Server URL Request Apps/ 3rd Party Services Name Web Hooks Copyright © 2012 by Fred George. All rights reserved. 35
  • 36. Cross-sell Tracking Copyright © 2012 by Fred George. All rights reserved. 36
  • 37. User Paths Through Site Copyright © 2012 by Fred George. All rights reserved. 37
  • 38. Agile Best Practices Not Used Trust w ✦ Stand ups collocation ✦ Unit tests ✦ Story narratives ✦ Acceptance tests Small, ✦ Retrospectives ✦ Refactoring short-lived ✦ Estimates ✦ Patterns apps Results, ✦ Iterations not blame ✦ Continuous integration ✦ Mandatory pairing Continuous deployment Copyright © 2012 by Fred George. All rights reserved. 38
  • 39. What About Technical Debt? Sloppy Lazy? Technical Debt No power to refuse! Inexperienced! Copyright © 2012 by Fred George. All rights reserved. 39
  • 40. Conclusions (so far)... Copyright © 2012 by Fred George. All rights reserved. 40
  • 41. Summary Principles of µServices ✦ Very, very small ✦ Loosely coupled (including flow) ✦ Multiple versions acceptable (encouraged?) ✦ Self-execution monitoring of each service ✦ Publish interesting “stuff” (w/o requirement) ✦ “Application” seems to be poor conceptualization Copyright © 2012 by Fred George. All rights reserved. 41
  • 42. “Living Software” System ✦ Long-lived system; short-lived services (human body) ✦ Extremely dynamic with continuous deployments ✦ 5- minutes between deployments typical 10 ✦ Accept it is complex (especially for testing) ✦ Acceptance test on business outcomes instead ✦ Radical impact to processes (Anarchy) ✦ There will be a learning curve for developers! Copyright © 2012 by Fred George. All rights reserved. 42
  • 43. µService Architecture: A Personal Journey of Discovery Fred George fredgeorge@acm.org @fgeorge52 Copyright © 2012 by Fred George. All rights reserved. 43