Server-side Integration:
Technologies
> ESI (Edge Side Include)
> E.g. Varnish cache
> SSI (Server Side Include)
> E.g. Apache httpd, nginx
> Portal Server + Portlets
Slide 14
Slide 14 text
ESI (Edge Side Includes)
...
... a lot of static content and images ...
...
...
... Logged in as: Ada Lovelace ...
some dynamic content
Slide 15
Slide 15 text
ESI (Edge Side Includes)
...
... a lot of static content and images ...
...
...
http://www.w3.org/TR/esi-lang
Slide 16
Slide 16 text
Portal Server
> Broad support and used in many projects
> Compose web application of Portlets
> Portlets might be deployed independently
Portal Server
Portlet 1
Portlet 2
Browser
UI 1
UI 2
Slide 17
Slide 17 text
Portal Server:
Challenges
> Do not really integrate diverse backends
> Web Services for Remote Portlets (WSRP)
still require Portlets
> Portlets allow customization by user…
> ...which make them very different from
normal web applications
Slide 18
Slide 18 text
Portal Server
> No support for non-Java technologies
> Programming model very different from
normal web applications
> Why would you use Portal Servers?
Messaging
> Natural fit for
asynchronous
communications
> E.g. event-driven
> Decoupling: Sender
and Receiver only
know topic / queue
> Re-submission for
resilience
> Not natural for
synchonous
communication
Slide 24
Slide 24 text
REST
? #
Microservice
Microservice
Slide 25
Slide 25 text
REST
> Natural fit for
synchronous
communications
> Evolvability with
HATEOS
> Content negiotation
> Not natural for
asynchonous
communication
Service Discovery
> Services need to find each other
> Enables load balancing
> For REST only
> E.g. DNS
Slide 28
Slide 28 text
Netflix Eureka
> Cache on the client
> Quick
> Proven
> Support for non-Java
systems with sidecar
only
> No DNS
Slide 29
Slide 29 text
Hashicorp Consul
> DNS interface
> Supports storing
configuration
> Consul templates to
create configuration
files
> Product
Slide 30
Slide 30 text
Resilience
> Service not available?
> Cicuit breaker
> Fail fast
> Time out
> Hystrix
> DO NOT IMPLEMENT RESILIENCE YOURSELF!
Slide 31
Slide 31 text
Proxy Load Balancing
> Centralized Load Balancing
> Can become bottle neck
> Single point of failure
Load
Balancer
Server
Client
Slide 32
Slide 32 text
Client
Ribbon: Client Side
Load Balancing
> Decentralized Load Balancing
> No bottle neck
> Resilient
> Can consider response time
> Data might be inconsistent
Load
Balancer
Server
Slide 33
Slide 33 text
Client
Alternative: External
Load Balancer
> Nginx, Apache httpd…
> Probably for each used Microservices
> Must each be configured
Load
Balancer
Server
Slide 34
Slide 34 text
REST
Service Discovery
Resilience
Load Balancing
Messaging
Slide 35
Slide 35 text
Security
> Single Sign on for all
Microservices
> Each Microservice
decides about
access policy
Slide 36
Slide 36 text
Client
Security
Server
User / password
Token with role
Micro-
service
Request with Token
Access / no access
Slide 37
Slide 37 text
Security
> JSON Web Token (JWT)
> Define standard for tokens
> Includes additional data
> Can be stored in a cookie
Slide 38
Slide 38 text
Testing
Slide 39
Slide 39 text
Search
User
Order Process
Microservice
Continuous
Delivery
Pipeline
Integration
Tests
…
Microservice
Continuous
Delivery
Pipeline
Microservice
Continuous
Delivery
Pipeline
Production
Slide 40
Slide 40 text
Microservices =
Independent
Deployment Units
Slide 41
Slide 41 text
No independent
testing =
no independent
deployment
Slide 42
Slide 42 text
Integration Test =
Bottleneck
Slide 43
Slide 43 text
Microservice Microservice
Request
Reply
Slide 44
Slide 44 text
Microservice Stub
Request
Reply
Slide 45
Slide 45 text
Stubs
> Does the calling Microservice work as
expected?
> Use stubs to replace called Microservice
Slide 46
Slide 46 text
Microservice Microservice
Request
Reply
Slide 47
Slide 47 text
Consumer-
Driven
Contract
Test
Microservice
Request
Reply
Slide 48
Slide 48 text
Could just use some
stub / test tool.
Slide 49
Slide 49 text
Consumer-driven
Contract Test
> Does the called Microservice work as
expected?
> Use consumer-driven contract test to
replace calling Microservice
> Easy to test changes to interfaces
Slide 50
Slide 50 text
Record
Microservice Microservice
Request
Reply
Slide 51
Slide 51 text
Record
Consumer-
driven
contract test
Microservice
Replay request
Validate reply
Docker Images
> Easy to build
> Dockerfile =
shell script
> Very efficient
> …even for small
changes
> Unfamiliar to Ops
> Replace VMware
with Kubernetes?
Slide 60
Slide 60 text
CD Tools
> Puppet, Chef etc
> Idempotent
installation
> E.g. easy update
> Complex
> Idempotent /
updates not needed
for Docker
Slide 61
Slide 61 text
Linux Packages
> Simple format
> Centralized
installation easy
> Unfamiliar to devs
Slide 62
Slide 62 text
Hold my orange
juice while I grep
the logs for all
Microservices!
Slide 63
Slide 63 text
Far too many files on
far too many logs!
Slide 64
Slide 64 text
Centralized Logging
> Collect all logs on one server
> No need for local logs
> Read-only file system?
Centralized Metrics
> Collect all metrics on one server
> Not just operating system, network
> …but in particular application
Slide 73
Slide 73 text
Whisper
Timeseries DB
Graphite
Web
Carbon
Data
Library, writes / reads files
Analysis
Graphite
Slide 74
Slide 74 text
No content
Slide 75
Slide 75 text
Alternatives
> Nagios: Open Source monitoring
> Icinga: Originally Nagios fork
> Many commercial tools (HP, IBM, CA, BMC)
> Riemann: functional programming for event
streams
> New Relic: Example for cloud
Slide 76
Slide 76 text
Alternatives
> TICK stack
> InfluxDB: Time-Series Database, also useful
for Graphite
> Telegraf: Collects data
> Chronograf: Visulization
> Kapacitor: Alerts, anomaly detection
Slide 77
Slide 77 text
Alternatives
> Packetbeat: uses Elasticsearch for storage
> …and Kibana for analysis
Slide 78
Slide 78 text
Hold my orange
juice while
I configure my
server!
Slide 79
Slide 79 text
Configuration Files
> Easy to create
> Servers self-
contained
> No centralized
update possible
> Needed with canary
releasing?
Slide 80
Slide 80 text
Configuration Server
> Easy to push out
changes to all
servers
> Can be the same
server as for services
discovery
> Additional
technology