Original interactive slides here: http://slides.com/yunzhilin/microservices-and-friends#/
A tongue-in-cheek presentation to TrunkPlatform interns 2015.
4. Enterprise ArchitectEnterprise Architect
Don't have one - shared responsibility.
Self organising team
But we make decisions a lot faster.
We do have some insteadEnterprise Architect Jokes
7. We HadWe Had
Traditional layered
architecture:
Silo'ed teams of BA,
Designers and Dev
( ).
Delivery bottlenecks
Lack of collaboration
and re-use
Frustrating to
debug/support
Difficult to deploy
Conway's Law
8. We now have:We now have:
MicroServices based
architecture:
Cross functional
design/dev of
services
Parallel delivery
Re-usable
modules across
client and server
Easy monitoring
and diagnostics.
Continuous
Delivery
11. No App Servers/WarNo App Servers/War
Bloated in size, hogs resources, memoryleak, restarts
Another layer of configuration and complexity
Run multiple apps 1 app per server, no isolation
Provide Infrastructure part of the app
Ops - provides own toolsets vs external choices.
EJB support - no need in this day and age
$$$ and require specialists
Sources: ,App Servers are Dead Stop wasting money on
Application Servers
12. Use Standalone AppsUse Standalone Apps
Self contained
Configure you app, not the app server
Resource isolation via docker containers
Java - Jetty; Netty, Undertow, or just Main()
Node.js - Harp, Express
Ruby - Rails, Sinatra
More on Framework later
Reference: Heroku for Java
14. ESB In RealityESB In Reality
One massive app server with all the same issues
15. MicroServicesMicroServices
Independently Scalable
Fault Tolerant
Free
Decentralised Governance
Decentralised Data
Smart endpoints
vs ESBvs ESB
Central orchestration.
Canonical Data Model
Middleware Bottleneck
Single point of failure
Smart Pipeline
$$$$$$
Need pub/sub or queuing: try light weight broker-less
messaging such as ZeroMQ.
16. JSON/RESTJSON/REST vs SOAP/WSDLvs SOAP/WSDL
{
"streetNumber": "80",
"streetName": "Clarence",
"suburb": "Sydney"
}
Text
<?xml version="1.0" encoding="UTF-8" ?>
<Property>
<streetNumber>80</streetNumber>
<streetName>Clarence</streetName>
<suburb>Sydney</suburb>
</Property
PUT /hostname/properties/ <service name="Properties">
<documentation>WSDL File for PropertyService</d
<port binding="tns:Properties" name="Properties
<soap:address location="http://hostname/pro
</port>
</service>
20. Who Does Dev OpsWho Does Dev Ops
No one does Dev Ops for the sake of Dev Ops
DevOps is a means to an end: build good software
Every good engineer should be Dev Ops minded
25. Small and Fast DockerSmall and Fast Docker
Take advantage of caching in Dockerfile
Use small base images such as BusyBox
CI friendly: fast build is a good build
27. Picking a FrameworkPicking a Framework
Use the right tool for the right job
Do prototype spikes that cover key requirements
Consider the learning curve and team skill set
Infrastructure are on-demand, don't feel restricted
Performance will matter eventually, but not day 1
Reference benchmarks, or roll your ownTechEmpower
29. Frameworks we useFrameworks we use
Rails - the original developer productivity framework
Dropwizard - Production ready out of box
Spring Boot - For when you really need Spring
RatPack - Not so easy to do the right thing
31. Postgres and MySqlPostgres and MySql
Trnk.io - MySQL via Google CloudSQL
Platmasphere - Postgres via Amazon RDS
Postgres offers multi-tenant functionality
32. Dependency InjectionDependency Injection
Inject dependencies as needed, rather than passing
through different constructors.
Swapping in stub implementations for tests
Spring and Guice equally good. Right tool for right job
37. HarpHarp
Simple lightweight webserver
Precompiles CSS and HTML templates
No need to write any server app code
var express = require('express')
var app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
var server = app.listen(9000, function () {
var host = server.address().address
var port = server.address().port
console.log('Example app listening at http://%s:
})
bash$ harp server .
------------
Harp v0.14.0 – Chloi Inc. 2012–2014
Your server is listening at
http://localhost:9000/
Press Ctl+C to stop the server
------------