Slide 1

Slide 1 text

LEGACY to MOBILE FIRST Stewart Gleadow | REA Group | [email protected] | @stewgleadow

Slide 2

Slide 2 text

ARCHITECTURE GUIDELINES DEALING WITH LEGACY TECHNICAL CHALLENGES DELIVERY TEAM STRUCTURE 1. 2. 3. 4.

Slide 3

Slide 3 text

ARCHITECTURE GUIDELINES DEALING WITH LEGACY TECHNICAL CHALLENGES DELIVERY TEAM STRUCTURE 1. 2. 3. 4.

Slide 4

Slide 4 text

OUR IDEAL ARCHITECTURE

Slide 5

Slide 5 text

Easy to adapt, quick to extend Deployed in the cloud OUR IDEAL ARCHITECTURE

Slide 6

Slide 6 text

SUGGEST small SERVICES LISTINGS USERS

Slide 7

Slide 7 text

LISTINGS USERS SUGGEST {…} {…} {…} API DRIVEN

Slide 8

Slide 8 text

MOBILE API simple CLIENTS

Slide 9

Slide 9 text

LISTINGS USERS SUGGEST MOBILE API

Slide 10

Slide 10 text

THE RULES ARE MORE WHAT YOU’D call GUIDELINES

Slide 11

Slide 11 text

ARCHITECTURE GUIDELINES DEALING WITH LEGACY TECHNICAL CHALLENGES DELIVERY TEAM STRUCTURE 1. 2. 3. 4.

Slide 12

Slide 12 text

LEGACY JAVA

Slide 13

Slide 13 text

LEGACY JAVA

Slide 14

Slide 14 text

LEGACY JAVA API

Slide 15

Slide 15 text

LEGACY JAVA API

Slide 16

Slide 16 text

LEGACY JAVA API

Slide 17

Slide 17 text

IT’S DIFFICULT TO evolve and maintain MONOLITHIC SYSTEMS

Slide 18

Slide 18 text

LEGACY JAVA residential LEGACY JAVA commercial

Slide 19

Slide 19 text

LEGACY JAVA residential LEGACY JAVA commercial API API

Slide 20

Slide 20 text

LEGACY JAVA API

Slide 21

Slide 21 text

LEGACY JAVA SEARCH API LISTINGS

Slide 22

Slide 22 text

LEGACY JAVA SEARCH API USERS LISTINGS

Slide 23

Slide 23 text

LEGACY JAVA SEARCH API LISTINGS USERS

Slide 24

Slide 24 text

LEGACY JAVA SEARCH API LISTINGS USERS

Slide 25

Slide 25 text

_links : { autosuggest : { href : “https://autosuggest.realestate.com.au/suburbs{/address}”, templated : true }, search : { href : “https://listings.realestate.com.au/listings{?query}”, templated : true }, login : { href : “https://users.realestate.com.au/users”, templated : false } } JSON endpoint configuration

Slide 26

Slide 26 text

Static site in an S3 bucket

Slide 27

Slide 27 text

Scala API Java API Ruby API

Slide 28

Slide 28 text

Javascript UI library

Slide 29

Slide 29 text

ARCHITECTURE GUIDELINES DEALING WITH LEGACY TECHNICAL CHALLENGES DELIVERY TEAM STRUCTURE 1. 2. 3. 4.

Slide 30

Slide 30 text

LEGACY JAVA SEARCH API USERS LISTINGS (artists impression)

Slide 31

Slide 31 text

LEGACY JAVA SEARCH API USERS LISTINGS (artists impression)

Slide 32

Slide 32 text

LEGACY JAVA SEARCH API USERS SUGGEST SAVED LISTINGS (artists impression)

Slide 33

Slide 33 text

LEGACY JAVA SEARCH API USERS SUGGEST SAVED LISTINGS

Slide 34

Slide 34 text

LEGACY JAVA SEARCH API USERS SUGGEST SAVED LISTINGS

Slide 35

Slide 35 text

© Igor Motov, Spiderweb, http://www.flickr.com/photos/71411059@N00/6171222658/ (modified). Creative Commons 4.0 Traded a complicated monolith for a complex web of interacting services

Slide 36

Slide 36 text

{…} LISTINGS USERS {…}

Slide 37

Slide 37 text

{…} LISTINGS USERS Pact: consumer driven contact testing {…} github.com/realestate-com-au/pact github.com/dius/pact-jvm

Slide 38

Slide 38 text

my_service_provider. given("something exists"). upon_receiving("a request for something”). with(method: :get, path: '/something'). will_respond_with( status: 200, headers: {'Content-Type' => 'application/json'}, body: {name: 'A small something'} ) ! subject.get_something

Slide 39

Slide 39 text

FREEDOM vs CONSISTENCY

Slide 40

Slide 40 text

Freedom within a service but consistency in deployment and interactions

Slide 41

Slide 41 text

COOKIE-CUTTER APPROACH TO NEW SERVICES

Slide 42

Slide 42 text

LISTINGS USERS SUGGEST LISTINGS USERS SUGGEST PROD STAGING

Slide 43

Slide 43 text

LISTINGS USERS SUGGEST LISTINGS USERS SUGGEST PROD STAGING

Slide 44

Slide 44 text

USERS LISTINGS USERS SUGGEST (new version)

Slide 45

Slide 45 text

USERS LISTINGS USERS SUGGEST (new version)

Slide 46

Slide 46 text

USERS LISTINGS USERS SUGGEST (new version)

Slide 47

Slide 47 text

_links : { autosuggest : { href : “https://autosuggest.realestate.com.au/suburbs{/address}”, templated : true }, search : { href : “https://listings.realestate.com.au/listings{?query}”, templated : true }, login : { href : “https://users.realestate.com.au/users”, templated : false } } Use entry points to test different environments

Slide 48

Slide 48 text

_links : { autosuggest : { href : “https://autosuggest.realestate.com.au/suburbs{/address}”, templated : true }, search : { href : “https://listings.realestate.com.au/listings{?query}”, templated : true }, login : { href : “https://users.realestate.com.au/users”, templated : false } } Use entry points to test different environments

Slide 49

Slide 49 text

_links : { autosuggest : { href : “https://autosuggest.realestate.com.au/suburbs{/address}”, templated : true }, search : { href : “https://listings.realestate.com.au/listings{?query}”, templated : true }, login : { href : “https://users.realestate.com.au/users”, templated : false } } Use entry points to test different environments “https://users.test.realestate.com.au/users”

Slide 50

Slide 50 text

ARCHITECTURE GUIDELINES DEALING WITH LEGACY TECHNICAL CHALLENGES DELIVERY TEAM STRUCTURE 1. 2. 3. 4.

Slide 51

Slide 51 text

ruby JAVA iOS

Slide 52

Slide 52 text

ruby JAVA iOS “mobile team”

Slide 53

Slide 53 text

ruby JAVA iOS “mobile team”

Slide 54

Slide 54 text

ruby JAVA iOS “mobile team”

Slide 55

Slide 55 text

ruby JAVA iOS Cross-functional squads

Slide 56

Slide 56 text

Mobile team? Treat the apps as a product http://en.wikipedia.org/wiki/IPhone_5S End-to-end delivery of an app experience

Slide 57

Slide 57 text

ARCHITECTURE GUIDELINES DEALING WITH LEGACY TECHNICAL CHALLENGES DELIVERY TEAM STRUCTURE 1. 2. 3. 4.

Slide 58

Slide 58 text

COMPLEX SOFTWARE SYSTEMS ARE still hard

Slide 59

Slide 59 text

http://en.wikipedia.org/wiki/Lego SMALL SERVICES SIMPLE CLIENTS POWERFUL APIs

Slide 60

Slide 60 text

THANKS

Slide 61

Slide 61 text

THANKS

Slide 62

Slide 62 text

STEWART GLEADOW stewgleadow.com/talks @stewgleadow [email protected] REA Group / realestate.com.au Talks: Twitter: Email:

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

REFERENCES • Martin Fowler, Microservices: http://martinfowler.com/articles/microservices.html • Sam Newman, Demistifying Conways Law: http://www.thoughtworks.com/insights/blog/demystifying-conways-law • Michael Feathers, Microservices Until Macro Complexity: https://michaelfeathers.silvrback.com/microservices-until-macro-complexity • Anthony Green, What Is A Microservice And Why Does It Matter: http://www.brunton-spall.co.uk/post/2014/05/21/what-is-a-microservice-and-why-does-it-matter • Richard Clayton, Failing At Microservices: https://rclayton.silvrback.com/failing-at-microservices • Fred George, Microservices Architecture: http://yow.eventer.com/yow-2012-1012/micro-services-architecture-by-fred-george-1286 • Todd Hoff, Microservices Not A Free Lunch: http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html • Martin Fowler, Strangler Application: http://martinfowler.com/bliki/StranglerApplication.html • Mike Kelly, HAL JSON: http://stateless.co/hal_specification.html • Brandon Byars, Enterprise REST: http://martinfowler.com/articles/enterpriseREST.html • Stewart Gleadow, No App Is An Island: https://speakerdeck.com/sgleadow/no-app-is-an-island • Ronald Holshausen, Testing Interactions With Web Services Without Integration Tests In Ruby: http://techblog.realestate.com.au/testing-interactions-with-web-services-without- integration-tests-in-ruby/ • Ian Robinson, Consumer Driven Contracts: http://martinfowler.com/articles/consumerDrivenContracts.html • Beth Skurrie, Pact Github Repository: https://github.com/realestate-com-au/pact • Travis Dixon, Pact JVM Github Repository: https://github.com/DiUS/pact-jvm • Ronald Holshausen, Simlifying Micro-Service Testing With Pacts: http://dius.com.au/2014/05/19/simplifying-micro-service-testing-with-pacts/ • Henrik Kniberg & Anders Ivarsson, Scaling Agile @ Spotify: https://dl.dropboxusercontent.com/u/1018963/Articles/SpotifyScaling.pdf • Sam Newman, Practical Microservices: http://www.slideshare.net/spnewman/practical-microservices-yow-2013