Slide 1

Slide 1 text

munz & more Microservices Runtimes DOAG 2017 Dr. Frank Munz

Slide 2

Slide 2 text

2 Dr. Frank Munz • Founded munz & more in 2007 • 17 years Oracle Middleware, Cloud, and Distributed Computing • Consulting and High-End Training • Wrote two Oracle WLS and one Cloud book

Slide 3

Slide 3 text

Microservices

Slide 4

Slide 4 text

Microservices Developing a single application as • a suite of small services • each running in its own process / owns it‘s data • communicating with lightweight mechanisms (Definition: M. Fowler / J. Lewis) https://martinfowler.com/articles/microservices.html

Slide 5

Slide 5 text

munz & more #5 How to Build?

Slide 6

Slide 6 text

Designing a Microservices Arch? munz & more #6

Slide 7

Slide 7 text

„… consider starting monolithic first …” munz & more #7 Sam Newman:

Slide 8

Slide 8 text

Come on. So what does help? CC Wheezy Jefferson https://flic.kr/p/4KPFA

Slide 9

Slide 9 text

Eric Evans describes “bounded contexts” in his DDD book. munz & more #9 published 2003 -> CDM is the opposite of a “bounded context” (see S. Tilkov)

Slide 10

Slide 10 text

4950 Calories

Slide 11

Slide 11 text

Efficient teams look like this: #11

Slide 12

Slide 12 text

https://www.thoughtworks.com/de/radar/techniques/inverse-conway-maneuver

Slide 13

Slide 13 text

Communication (Overhead) Göran Johansson CC Atrib https://flic.kr/p/FZy6wo

Slide 14

Slide 14 text

Cost? DB1 μ1 DB2 μ2 direct call ? REST?/Kafka Process {apiGW}

Slide 15

Slide 15 text

What if microservices were 300x slower than your monolith? munz & more #15

Slide 16

Slide 16 text

Rough Approximation network call / local call munz & more #16

Slide 17

Slide 17 text

Communication Overhead 3.000.000 x munz & more #17

Slide 18

Slide 18 text

But networks get a bit faster munz & more #18 https://read.acloud.guru/evolution-of-business-logic-from-monoliths-through-microservices-to-functions-ff464b95a44d

Slide 19

Slide 19 text

Infrastructure Complexity

Slide 20

Slide 20 text

Runtimes DB1 μ1 DB2 μ2 {apiGW}

Slide 21

Slide 21 text

Which Runtime Environment? Stephane Kempinaire - http://www.mynewsdesk.com/se/puma-nordic/images/puma-aw14_ff_bolt-325510

Slide 22

Slide 22 text

Microservices Runtimes

Slide 23

Slide 23 text

Know The Essential Cloud Services ACCS JCS OCCS Deploy compiled Java, Python, Ruby code + JSON file: start command Deploy Java EE module, JMS, JDBC, XA. + db and storage Deploy (stack of) Docker containers Language container as service WebLogic as Service Docker container as Service Oracle Container CS Java CS Application Container CS

Slide 24

Slide 24 text

Application Container Cloud Service

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

ACCS • Polyglot: Java, node.js, PHP, Python, Go and Ruby • Java: Upload compiled zipped Java classes + JSON file with start command • Now also Java EE • Easy to deploy and operate • Lightweight: deployments run in containers Polyglot, easy to use microservices runtime

Slide 27

Slide 27 text

Java CS

Slide 28

Slide 28 text

Create JCS munz & more #28

Slide 29

Slide 29 text

Java CS • Multi-module deployment is not a microservice architecture. • WebLogic Partitions: – share same JVM… – Dependancy on admin server • Standalone Multi-server topologies could serve as microservices runtime – Full Java EE -> heavy infrastructure / footprint – Licensing munz & more #29 WLS a.war b.war a.war WLS P1 P2 a.war WLS WLS b.war a.war Multi module deployment WebLogic Partitions Multi-server topology Not really a microservices runtime

Slide 30

Slide 30 text

Docker based Runtimes

Slide 31

Slide 31 text

Kubernetes

Slide 32

Slide 32 text

K8s • YAML configuration • Pod: Container(s) sharing IP, network, filesystem – IP is ephemeral – Uses Labels • Replication Controller -> Replica Set – Manages PODs (restarts replicas based on labels) • Services – Proxy for pod – Permanent IP munz & more #32

Slide 33

Slide 33 text

Welcome Mini J

Slide 34

Slide 34 text

Google Kubernetes munz & more #34

Slide 35

Slide 35 text

Docker Containers in Kubernetes munz & more #35

Slide 36

Slide 36 text

Docker Swarm

Slide 37

Slide 37 text

Docker Swarm munz & more #37

Slide 38

Slide 38 text

Swarm vs. Kubernetes Swarm … • Wasn’t impressive when released, but this has changed • Is easier to understand and to operate • Covers a lot of what K8s does, but K8s is the trend • Only secure mode – automatic TLS certs • Is built-in and tightly linked to Docker API munz & more #38 Docker Swarm & K8s: flexible microservices RT, but bring operational complexity

Slide 39

Slide 39 text

Oracle Container Cloud Service (OCCS)

Slide 40

Slide 40 text

OCCS munz & more #40

Slide 41

Slide 41 text

OCCS • OCCS = Oracle’s container cloud service • Abstracts away complexity of Kubernetes or Docker Swarm – Neither based on Swarm nor Kubernetes • Uses service concept like in Swarm • Integrates with Docker Hub, Wercker, Developer CS • Allows deployment of stacks • PaaS: Very easy to use (e.g. docker run …) munz & more #41 Docker based microservices runtime. Easier to operate than Swarm or Kubernetes.

Slide 42

Slide 42 text

Function as a Service AWS Example used here. Fn Project was open sourced Java One 2017

Slide 43

Slide 43 text

Edit Code / Upload munz & more #43 event: event passed to function context: runtime context callback: optional return (or null) Auto scaling, True pay per invocation Stateless, and Event based. Vendor lock-in?

Slide 44

Slide 44 text

Fn Project • Apache 2, Open Source Java One 2017 • Fn Server (micro API GW), LB, Flow • Function / Container duality • Docker is only dependency -> polyglot @frankmunz

Slide 45

Slide 45 text

munz & more #45 Is the new μ ? FaaS: Fullfill microservices criteria. Low price, automatic scaling. Vendor lock-in?

Slide 46

Slide 46 text

Microservices Runtimes Oracle JCS Oracle ACCS Swarm Kubernetes Oracle OCCS FaaS Docker Polyglot No Yes Yes Yes Yes Yes Size infrastructure L/XL S S S S XS Complexity L S M XL S XS Elasticity auto easy scale scale scale easy scale auto Stateless No (Yes) Yes Yes Yes Yes Event based No No No No No Yes

Slide 47

Slide 47 text

Successful Microservices • Uber, Netflix etc. • Fully automated CI / CD • Automated testing • Sometimes polyglot • Top notch devops teams • Large scale, single purpose apps • Extensive monitoring munz & more #47

Slide 48

Slide 48 text

TL;DR #microservices #runtimes Are you tall enough J? / Tradeoff: flexibility vs simplicity / ACCS is easy, lightweight & polyglot and now Java EE / Docker RT Complexity: Kubernetes > Swarm > OCCS / FaaS: true pay per invocation & automated scale & stateless / Microservices > FaaS / K8s is THE trend @frankmunz

Slide 49

Slide 49 text

www.linkedin.com/in/frankmunz/ www.munzandmore.com/blog facebook.com/cloudcomputingbook facebook.com/weblogicbook @frankmunz youtube.com/weblogicbook -> more than 50 web casts Don’t be shy J Graphics on title page by M. Fowler https://martinfowler.com/articles/microservices/images/sketch.png