Microservices Runtimes

F
munz & more
Microservices
Runtimes
OTN LatAm Tour / August 2017 Dr. Frank Munz
2
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
Microservices
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
Frank Munz / OTN Latam 2016 #5
Service owns its data
Less enterprise, more application centric
Continuous Unlocking
How to Model?
munz & more #6
„… consider
starting
monolithic
first …”
munz & more #7
Sam Newman:
Eric Evans describes
“bounded contexts” in
his DDD book.
munz & more #8
published 2003
How Big is Micro?
4950 Calories
munz & more #9
How Big is Micro?
munz & more #10
Martin Fowler (quotes Amazon):
We understand efficient teams
munz & more #11
Picture this …
String encrypt (String input)
10 Mio USD
3 people
or 30 people?
munz & more #12
Communication
DB1
μ1
DB2
μ2direct call ?
REST?/Kafka
Process
{apiGW}
Communication Overhead
Rough approximation:
network call / local call
munz & more #14
Communication Overhead
Rough approximation:
0,003 s / 10^-9 s
munz & more #15
Communication Overhead
3.000.000 x
munz & more #16
What the Experts say (A. Cockroft)
munz & more #17
https://read.acloud.guru/evolution-of-business-logic-from-monoliths-through-microservices-to-functions-ff464b95a44d
Recommended read:
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 #18
Microservices
Runtimes
Application Container
Cloud Service
Microservices Runtimes
ACCS
• Polyglot: Java, node.js, PHP,
Python and Ruby
• Java: Upload compiled zipped Java
classes + JSON file with start command
• Easy to deploy and operate
• Lightweight: deployments run in containers
Polyglot,	easy	to	use	microservices	runtime
Java CS
Create JCS
munz & more #24
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 #25
WLS
a.war b.war
a.war
WLS
P1 P2
a.war
WLS WLS
b.wara.war
Multi	module	deployment
WebLogic	Partitions
Multi-server	topology
Not	really	a	microservices	runtime
WebLogic Microservice Edition?
It should be
• Single instance
• No domain
• No cluster
• Lightweight
Stay tuned …
munz & more #26
Docker
based Runtimes
Welcome Mini J
Artesania Raspi cluster runs
• Docker
• Docker Swarm
• Kubernetes
Live hacking session at
Oracle CODE 2017 CDMX
DIY Raspi Docker Cluster
munz & more #29
Component Price
Raspi 4x	38€
Micro	SD	 4x	11€
Power 28€
Wifi 22€
Case 30€
Wires 10€
Kubernetes
Google Kubernetes
munz & more #31
Docker Swarm
Docker Swarm
munz & more #33
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
• Only secure mode
– automatic TLS certs
• Is built-in and tightly linked to Docker API
munz & more #34
Docker	Swarm	&	K8s: flexible	microservices	RT,	but	bring	operational	complexity
Oracle Container
Cloud Service
(OCCS)
OCCS
munz & more #36
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 #37
Docker	based	microservices	runtime.	Easier	to	operate	than	Swarm	or	Kubernetes.
Function as
a Service
AWS	Example	used	here.	FaaS was	announced	at	OOW	2016.
Edit Code / Upload
munz & more #39
event: event passed to
function
context: runtime context
callback: optional return
(or null)
Definition: Function as a Service
• Auto scaling
• True pay per use
• Stateless
• Event based
munz & more #40
Definition
• Choose memory
-> compute power
• Using container tech
Characteristics
FaaS vs. K8s Microservices
FaaS fulfills M. Fowler’s microservices definition
munz & more #41
AWS Lambda compared to Docker with Kubernetes
✅
Benefits	of	FaaS
- serverless
- zero	config auto	scaling	
- true	pay	per	use
->	higher	abstraction
Limits	of	FaaS
- language/framework	choice
- resource	limits
- execution	time	/	size
- vendor	lock-in
->	reduced	flexibility
munz & more #42
Is	𝛌 the	new	μ ?
FaaS:	Fullfill microservices	criteria.	Low	price,	automatic	scaling.	Vendor	lock-in?
There is more needed
to succed with
microservices ...
1.) Your Organization
Conway’s Law
2.) Automation and Monitoring
• Developer Cloud Service
– Builds and runs deployments for ACCS, JCS
• Wercker (free!)
– Provisions software in Docker Containers
munz & more #45
Wercker
• Recently acquired by Oracle
• Pipelines execute steps on code
– Pipelines == series of steps
– Execute inside Docker container
• Workflows
– chained and branched pipelines
– Represented as wercker.yaml in github
• Quickly provision ready to run container infrastructure
– Connects to github for source
– Push images to Docker hub (or any registry)
– Restart OCCS via webhooks
munz & more #46
https://app.wercker.com
munz & more #47
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
(complex)
easy	scale scale scale easy	scale auto
Stateless No
(SLSB)
(Yes) Yes Yes Yes Yes
Event based No
(JMS)
No No No No Yes
TL;DR #microservices #runtimes
Tradeoff: flexibility vs
simplicity / ACCS is easy,
lightweight & polyglot /
Docker: Swarm vs Kubernetes vs
OCCS / FaaS: true pay per use
& automatic scale & stateless
/ 𝛌 could be the new µ!
@frankmunz
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
1 of 51

More Related Content

Microservices Runtimes