Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building Microservice Architectures with Go - Y...
Search
mattheath
December 11, 2015
Programming
5
390
Building Microservice Architectures with Go - Yow! 2015
Presented at Yow! 2015 in Melbourne, Brisbane and Sydney
http://yowconference.com.au/
mattheath
December 11, 2015
Tweet
Share
More Decks by mattheath
See All by mattheath
Breaking down problems
mattheath
2
320
Contexts in Context
mattheath
0
180
A guided journey of Cloud Native
mattheath
1
130
Modelling prototypes to critical systems with Cassandra
mattheath
0
220
Building a Cloud Native Bank
mattheath
1
190
Building a Cloud Native Bank
mattheath
0
330
Building reliable APIs
mattheath
0
260
Go and Microservices - NDC London 2018
mattheath
0
230
Architecting a Bank from scratch
mattheath
1
770
Other Decks in Programming
See All in Programming
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
たのしいparse.y
ydah
3
120
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
200
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
快速入門可觀測性
blueswen
0
330
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Optimizing for Happiness
mojombo
376
70k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Docker and Python
trallard
41
3.1k
Practical Orchestrator
shlominoach
186
10k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Designing Experiences People Love
moore
138
23k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
96
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
Building Microservice Architectures with Go Matt Heath, Mondo #yow2015
@mattheath
None
None
1895
monoliths traditional dev
None
None
None
None
None
None
None
None
None
?
DATABASE APPLICATION
DATABASE APPLICATION
DATABASE DATABASES APPLICATION
DATABASE DATABASES APPLICATION SEARCH
DATABASE DATABASES APPLICATION CACHE SEARCH
DATABASE DATABASES APPLICATION CACHE SEARCH CAT GIFS
ALL HAIL THE MONOLITH
DO NOT WANT
DATABASE DATABASES APPLICATION CACHE SEARCH CAT GIFS
APPLICATION
None
None
Why Microservices at Mondo?
Single Responsibility Principle
Bounded Context
Well defined Interfaces
Composability
Why not start with Microservices?
LOAD BALANCER
LOAD BALANCER HTTP API & ROUTING LAYER
TRANSPORT LOAD BALANCER HTTP API & ROUTING LAYER
SERVICE SERVICE SERVICE TRANSPORT LOAD BALANCER HTTP API & ROUTING
LAYER
SERVICE SERVICE SERVICE TRANSPORT DATABASE DATABASE DATABASE LOAD BALANCER HTTP
API & ROUTING LAYER
SERVICE SERVICE SERVICE TRANSPORT DATABASE DATABASE DATABASE LOAD BALANCER DATACENTRE
n HTTP API & ROUTING LAYER
SERVICE SERVICE SERVICE TRANSPORT DATABASE DATABASE DATABASE LOAD BALANCER HTTP
API & ROUTING LAYER DATACENTRE n
None
Simple Static typing Static linking
Concurrency Interfaces
stdlib eg. Networking
Go Kit micro gRPC Kite
mondough/typhon mondough/mercury
LOAD BALANCER
LOAD BALANCER HTTP API & ROUTING LAYER
API SERVICE LOAD BALANCER HTTP API & ROUTING LAYER
/webhooks —-> Webhook API
WEBHOOK API LOAD BALANCER HTTP API & ROUTING LAYER
WEBHOOK API AUTH SERVICE WEBHOOK SERVICE LOAD BALANCER HTTP API
& ROUTING LAYER
WEBHOOK API AUTH SERVICE WEBHOOK SERVICE LOAD BALANCER HTTP API
& ROUTING LAYER DATABASE
WEBHOOK API AUTH SERVICE WEBHOOK SERVICE LOAD BALANCER HTTP API
& ROUTING LAYER DATABASE DATABASE
API SERVICE SERVICE A SERVICE B LOAD BALANCER HTTP API
& ROUTING LAYER DATABASE DATABASE EXTERNAL PROVIDER
Event Driven Architectures
API SERVICE SERVICE A SERVICE B LOAD BALANCER HTTP API
& ROUTING LAYER
API SERVICE SERVICE A SERVICE B LOAD BALANCER HTTP API
& ROUTING LAYER
API SERVICE SERVICE A SERVICE B LOAD BALANCER HTTP API
& ROUTING LAYER SERVICE C SERVICE D E
API SERVICE SERVICE A SERVICE B LOAD BALANCER HTTP API
& ROUTING LAYER SERVICE C SERVICE D G E F
? ? ? LOAD BALANCER HTTP API & ROUTING LAYER
? ? ?? ? ? ? ? ? ? ?
SERVICE
Logic Handlers Storage SERVICE
mercury Logic Handlers Storage SERVICE
type Handler func(request) (response, error)
type Transport interface { ... }
type Transport interface { Listen(serviceName string, inbound chan<- request) error
StopListening(serviceName string) bool Respond(req request, resp response) error Send(req request, timeout time.Duration) (response, error) ... }
type Transport interface { Listen(serviceName string, inbound chan<- request) error
StopListening(serviceName string) bool Respond(req request, resp response) error Send(req request, timeout time.Duration) (response, error) ... }
mercury Logic Handlers Storage SERVICE
mercury Logic Handlers Storage libraries SERVICE
mercury Logic Handlers Storage libraries SERVICE Deployment Service Discovery Configuration
Monitoring Authentication Authorisation Storage Circuit Breaking
None
None
Scratch Images
Statically Compiled
Root CA Certs
None
Dealing with Complexity
Testing
Load Failure Degradation
Monitoring
Monitor your Business Logic
♥ customers
In-Band vs Out of Band
type Checker func() (error, map[string]string)
Distributed Tracing
api api api.customer api.customer service.customer service.customer
api api api.customer api.customer service.customer service.customer
8096820c-3b7b-47ec-bce6-1c239252ab40
api api api.customer api.customer service.customer service.customer
api api api.customer api.customer service.customer service.customer
Context Propagation
package context type Context interface { Deadline() (deadline time.Time, ok
bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} }
package context type Context interface { Deadline() (deadline time.Time, ok
bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} }
api api api.customer api.customer service.customer service.customer
api api api.customer api.customer service.customer service.customer SEND RECV SEND RECV
RECV SEND RECV SEND
mondough/phosphor
api api.customer service.customer SEND RECV SEND RECV RECV SEND RECV
SEND phosphor
None
API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed
apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed
apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed
apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed
apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed
apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
None
API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed
apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
None
None
None
Small Simple Easy to learn
Concurrency Interfaces Networking
Downsides?
Starting with Microservices?
#yow2015 Thanks! @mattheath @getmondo
ATM: Thomas Hawk Bank of Commerce: ABQ Museum Archives IBM
System/360: IBM Absorbed: Saxbald Photography Orbital Ion Cannon: www.rom.ac Go Gopher: Renee French Control Room: NASA ATM Failure: George Redgrave Credits