Server Server
Microservices: Definition
> Independent deployment units
> Any technology
> Any infrastructure
> UI + Logic
Micro
Service
Micro
Service
Slide 7
Slide 7 text
Components Collaborate
Micro
Service
Micro
Service
Link
Data Replication
REST
Messaging
Slide 8
Slide 8 text
Distributed System
Slide 9
Slide 9 text
Distributed System
Why??
Slide 10
Slide 10 text
Why Microservices?
Strong Modularization
Scaling Agile
Sustainable development
Replaceable Services
Continuous Delivery
Free choice of technology
Handle Legacy efficient
Independent Scaling
Robustness
Small teams develop and
deploy independently
Add services – not code
Small Services
Failure limited to single
Microservice
Slide 11
Slide 11 text
Why Microservices?
Scaling Agile
Sustainable development
Continuous Delivery
Free choice of technology
Handle Legacy efficient
Independent Scaling
Robustness
Organization
Deployment
Units
Technology
Slide 12
Slide 12 text
Single Developer
Scaling Agile
Sustainable development
Continuous Delivery
Free choice of technology
Handle Legacy efficient
Independent Scaling
Robustness
Organization
Deployment
Units
Technology
Slide 13
Slide 13 text
Replace Monolith
Scaling Agile
Sustainable development
Continuous Delivery
Free choice of technology
Handle Legacy efficient
Independent Scaling
Robustness
Organization
Deployment
Units
Technology
Slide 14
Slide 14 text
How should I build my
system?
Slide 15
Slide 15 text
Layered
iOS Android Web
Order Search Catalog
Billing
Customer
Backend Backend Backend
Slide 16
Slide 16 text
Layered
> Reusable Backend Services
> Mobile client / Web App as frontend
> Backend for frontend (BFF): Custom
backend services
> ...to implement frontend specific logic
> E.g. Netflix
Slide 17
Slide 17 text
Layered: Benefits
> Good way to build an API
> E.g. for mobile
> Might be easier to migrate into
> …if existing architecture is similar
Slide 18
Slide 18 text
Layered: Issues
> BFF might contain the same logic – same
processes
> BFF might contain most relevant logic
> Change to a business process means
changing many services
> Lots of communication
Slide 19
Slide 19 text
Self-Contained System
(SCS)
Slide 20
Slide 20 text
Deployment
monolith
Graphics by Roman Stranghöhner, innoQ
http://scs-architecture.org
Slide 21
Slide 21 text
Various Domains
Slide 22
Slide 22 text
User interface
Business logic
Persistence
Slide 23
Slide 23 text
… a lot of modules,
components,
frameworks and
libraries
Slide 24
Slide 24 text
With all these
layers in one
place, a
monolith
tends to
grow.
Slide 25
Slide 25 text
Cut Deployment
monolith along
domains …
Slide 26
Slide 26 text
… wrap domain in
separate web
application …
Slide 27
Slide 27 text
Self-contained
System (SCS) –
individually
deployable
Slide 28
Slide 28 text
Decentralized unit
communicating with
other systems via
RESTful HTTP or
lightweight
messaging.
Slide 29
Slide 29 text
SCS can be
individually
developed for
different
platforms.
Slide 30
Slide 30 text
An SCS contains its own
user interface, specific
business logic and
separate data storage
Slide 31
Slide 31 text
optional API e.g. for
mobile
Slide 32
Slide 32 text
Logic only shared over
a well defined
interface.
Slide 33
Slide 33 text
Business logic can
consist of
microservices
Slide 34
Slide 34 text
Every SCS brings its
own data storage
with its own
(potentially
redundant) data
Slide 35
Slide 35 text
Redundancies:
tolerable as long as
sovereignty of data
by owning system is
not undermined.
Slide 36
Slide 36 text
Enables polyglot
persistence
Neo4J
CouchDB
Oracle
Slide 37
Slide 37 text
Technical decisions can
be made independently
from other systems
(programming language,
frameworks, tooling,
platform)
Slide 38
Slide 38 text
Domain scope
enables
development,
operation and
maintenance of
SCS by a single
team.
Team 1
Team 2 Team 3
Slide 39
Slide 39 text
Web user interface
composed according
to ROCA principles.
http://roca-style.org
Slide 40
Slide 40 text
Self-contained
Systems
should be integrated
in the web interface
Slide 41
Slide 41 text
Hyperlinks to navigate between
systems.
System 1 System 2
Slide 42
Slide 42 text
System 1 System 2
Redirection
> Use of callback URIs
> As seen e.g. in OAuth flows
Slide 43
Slide 43 text
Dynamic inclusion of content
served by another application
System 1 System 2
Slide 44
Slide 44 text
https://www.innoq.com/
de/blog/transklusion/
Slide 45
Slide 45 text
ESI (Edge Side Includes)
...
... a lot of static content and images ...
...
...
... Logged in as: Ada Lovelace ...
some dynamic content
Slide 46
Slide 46 text
ESI (Edge Side Includes)
...
... a lot of static content and images ...
...
...
http://www.w3.org/TR/esi-lang
Slide 47
Slide 47 text
Client-side Integration:
Code
$("a.embeddable").each(function(i, link) {
$("").load(link.href, function(data, status, xhr) {
$(link).replaceWith(this.children);
});
});
> Replace
with content of document in a