Slide 1

Slide 1 text

Microservices - Yet another buzzword? Orlando Code Camp, 2015 Ovidiu Dimulescu @odimulescu www.odimulescu.com

Slide 2

Slide 2 text

The opinions and views expressed in this talk are my own, and do not necessarily reflect the opinions or views of my employer.

Slide 3

Slide 3 text

3 Why bother?

Slide 4

Slide 4 text

* http://commons.wikimedia.org/wiki/File:Beer_growler.jpg

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

* http://microxchg.io/2015/index.html

Slide 7

Slide 7 text

~1 out 5 sessions on Microservices directly or indirectly

Slide 8

Slide 8 text

* https://skillsmatter.com/conferences/6312-mucon

Slide 9

Slide 9 text

9 * Wikimedia

Slide 10

Slide 10 text

* http://commons.wikimedia.org/wiki/File:Windows_Phone_8_Startscreen.png * http://commons.wikimedia.org/wiki/File:IPhone_5C_PSD.png

Slide 11

Slide 11 text

11 Monolith App PM QA DEV DBA SA NetEng “On Premise” No / SQL (single datastore*)

Slide 12

Slide 12 text

12 Monolith App UI Data Access Business Domain

Slide 13

Slide 13 text

13 Monolith App UI Data Access Business Domain Comp I Comp II

Slide 14

Slide 14 text

14 * http://commons.wikimedia.org/wiki/File:Gnome-emblem-package.svg * http://commons.wikimedia.org/wiki/File:Inkscape_icons_dialog_layers.svg

Slide 15

Slide 15 text

15 Does the code reflect the architecture?

Slide 16

Slide 16 text

16 ? * http://commons.wikimedia.org/wiki/File:Component-cables.jpg * http://commons.wikimedia.org/wiki/File:Gnome-emblem-package.svg

Slide 17

Slide 17 text

17 APP UI Data Access Bussines Domain … APP UI Data Access Bussines Domain APP UI Data Access Bussines Domain Scalability model

Slide 18

Slide 18 text

18 ESB WS-* SOAP XML Svc I Svc II Svc N PM QA DEV DBA SA NetEng “On Premise” No / SQL (single datastore *) …

Slide 19

Slide 19 text

19 (Not so) Old world Layers oriented Scaling per app instead of per component Process oriented / friction prone Single language * Single datastore *

Slide 20

Slide 20 text

20 * http://en.wikipedia.org/wiki/User:Shijauddin#/media/File:I_am_a_Programmer.png

Slide 21

Slide 21 text

21 * http://en.wikipedia.org/wiki/User:Shijauddin#/media/File:I_am_a_Programmer.png

Slide 22

Slide 22 text

22 * http://commons.wikimedia.org/wiki/File:Four_continents.png * http://en.wikipedia.org/wiki/User:Shijauddin#/media/File:I_am_a_Programmer.png

Slide 23

Slide 23 text

23 * http://en.wikipedia.org/wiki/Conway%27s_law Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations Melvin Conway, 1968 Conway’s Law

Slide 24

Slide 24 text

24 $$$ * http://commons.wikimedia.org/wiki/File:Gl%C3%BChlampe_42W_230V_E27_Effi_Klasse_C.jpg

Slide 25

Slide 25 text

25 Web size Team size Team skills and geo distribution Systems Architecture Time to market Scalabilities

Slide 26

Slide 26 text

26 Opportunities ?

Slide 27

Slide 27 text

27 * http://commons.wikimedia.org/wiki/File:A_new_and_correct_map_of_the_world,_laid_down_according_to_the_newest_discoveries, _and_from_the_most_exact_observations_(8342680176).jpg

Slide 28

Slide 28 text

28 PaaS APIs DevOps HTTP 2.0 JSON IaaS *aaS SQL + NoSQL (new datastores)

Slide 29

Slide 29 text

29 Self - serve Convenience oriented / low friction Polyglot language and persistence Fast & affordable experimentation Uniform & disposable environments New world

Slide 30

Slide 30 text

30 Old world - Good Parts

Slide 31

Slide 31 text

31 UNIX Philosophy Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. Doug McIlroy * http://en.wikipedia.org/wiki/Unix_philosophy

Slide 32

Slide 32 text

32 Initial Stands for (acronym) Concept S SRP [4] Single responsibility principle a class should have only a single responsibility (i.e. only one potential change in the software's specification should be able to affect the specification of the class) O OCP [5] Open/closed principle “software entities … should be open for extension, but closed for modification.” L LSP [6] Liskov substitution principle “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.” See also design by contract. I ISP [7] Interface segregation principle “many client-specific interfaces are better than one general-purpose interface.”[8] D DIP [9] Dependency inversion principle one should “Depend upon Abstractions. Do not depend upon concretions.”[8] * http://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29 SOLID (OOP)

Slide 33

Slide 33 text

33 Discrete services that ‘do one thing and do it well’. Microservices

Slide 34

Slide 34 text

34 SOA !?

Slide 35

Slide 35 text

35 Microservices Micro is about scope not size Independently deployable (group level) Lightweight communication Single process (lightweight containers) Smart endpoints, dumb pipes

Slide 36

Slide 36 text

36 Right tool for a job Different code changing speeds Organizational splits Multiple scaling profiles Multiple security zones Cross functionality Microservices - Pros

Slide 37

Slide 37 text

37

Slide 38

Slide 38 text

38 Splitting / Merging / Defining boundaries Micro frameworks / containers availability & reliability Wiring complexity Configuration Management Testing / Deployment / Monitoring Data Management (MDM, Eventual Consistency) Cognitive complexity Org structure and culture Microservices - Challenges

Slide 39

Slide 39 text

39 Conway’s Law Adrian Cockcroft (Battery Ventures, ex-Netflix) suggested that instead of designing software that copies our current organizational structure, figure out how we want our software to look, then (re) design the organization so it copies the software.

Slide 40

Slide 40 text

40 Jeff Bezos, CEO, Amazon * http://commons.wikimedia.org/wiki/File:Pepperoni_pizza_(2).png Two Pizza Rule

Slide 41

Slide 41 text

41 * http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/ 1) All teams will henceforth expose their data and functionality through service interfaces. 2) Teams must communicate with each other through these interfaces. 3) There will be no other form of interprocess communication allowed: no direct linking, no direct reads of another team’s data store, no shared- memory model, no back-doors whatsoever. The only communication allowed is via service interface calls over the network. 4) It doesn’t matter what technology they use. HTTP, Corba, Pubsub, custom protocols — doesn’t matter. Bezos doesn’t care. 5) All service interfaces, without exception, must be designed from the ground up to be externalizable. That is to say, the team must plan and design to be able to expose the interface to developers in the outside world. No exceptions. 6) Anyone who doesn’t do this will be fired. Jeff Bezos, CEO, Amazon - Big Mandate

Slide 42

Slide 42 text

42 “You build it, you run it” Werner Vogels, CTO, Amazon * ACM Queue interview, 2006. https://queue.acm.org/detail.cfm?id=1142065

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Native Boot2Docker Supported Platforms* Boot2Docker

Slide 46

Slide 46 text

Ecosystem Many more …

Slide 47

Slide 47 text

Startup speed Resource density Layered file system with changes tracking Hierarchical images with registry hub Portable Single process* Features

Slide 48

Slide 48 text

The Twelve-Factor App - www.12factor.net coding {the} architecture - www.codingthearchitecture.com Pass for Microservices - gilliam.github.io Martin Fowler - martinfowler.com/articles/microservices.html Chris Richardson - microservices.io/patterns/microservices.html High Scalability - highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html The Arm Blog - the-arm.com/2013/09/30/microservices-and-solid-principles-of-object-oriented-design/ Dare to dream blog - davidmorgantini.blogspot.com/2013/08/micro-services-introduction.html Charles Young Blog - geekswithblogs.net/cyoung/archive/2014/12/20/hexagonal-architecturendashthe-great-reconciler.aspx Docker Website - docker.com Google Search Engine - last but not least :) Resources

Slide 49

Slide 49 text

Questions ? Ovidiu Dimulescu @odimulescu www.odimulescu.com