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
Service Oriented Architecture Vs Monolithasaurus
Search
Joe Roberts
June 06, 2013
Programming
5
170
Service Oriented Architecture Vs Monolithasaurus
SOA
Joe Roberts
June 06, 2013
Tweet
Share
More Decks by Joe Roberts
See All by Joe Roberts
Discovering Go
zefer
0
75
Other Decks in Programming
See All in Programming
Snowflakeで眠ったデータを起こそう!
estie
0
140
Tailwind CSSを本気でカスタマイズする方法
fsubal
14
5.5k
Site Reliability Engineering for GMO
pyama86
8
1.1k
Java 22 Overview
kishida
1
190
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
280
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
220
Git Rebase
bkuhlmann
11
1.6k
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
170
Fragment Composition of GraphQL
quramy
13
1.4k
見た目から始める生産性向上
ikumatadokoro
10
1.3k
Try creating your own orderedmap
kazamori
1
180
Featured
See All Featured
Become a Pro
speakerdeck
PRO
13
4.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Typedesign – Prime Four
hannesfritz
36
2.1k
Designing for Performance
lara
602
67k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Designing Experiences People Love
moore
136
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
Debugging Ruby Performance
tmm1
70
11k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
14
1.5k
Rails Girls Zürich Keynote
gr2m
91
13k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Transcript
service oriented architecture
None
service oriented architecture
None
None
None
Working memory
None
None
None
None
None
None
Fight back! - Solid OO techniques - Refactoring - Paying
back technical debt - Test driven development - Continuous integration
Easy to change
Service Oriented Architecture
SOA Build applications out of smaller ones
Services = HTTP =
REST + Message queues
REST
Message queues SQS, RabbitMQ, ActiveMQ, Resque, etc
OO principles - Single responsibility - Loose coupling - Cohesion
- Encapsulation
Real world? There are no rules
auth users front-end blog social reviews recommendations stock shipping payments
tags baskets history
Online record shop
None
Extract functionality into services
None
Reviews Recommendations Product info Stock levels
reviews-service REST + JSON
reviews-service GET /reviews/id POST /reviews PATCH /reviews/id DELETE /reviews/id
reviews-service GET /reviews/id { json }
reviews-service POST /reviews { json }
reviews-service { json } BONUS: Client-side rendering!
reviews-service application/json text/html
Isolated
Reusable
Interoperable
Agile
Scalable
Robust
Shipping
shipping-service
Shop Shipping-service Message queue { order details }
/api/shippings
Isolated Reusable Interoperable Agile Scalable Robust
None
hydra.io API for building & profiting from digital image apps
/uploads /products /orders /artworks image processing hydra.io
/uploads /products /orders /artworks image processing hydra.io
/uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3
hydra.io
/uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3
hydra.io
/uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3
message queue (resque) hydra.io
/uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3
message queue (resque) hydra.io
/uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3
message queue (resque) hydra.io
/uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3
message queue (resque) hydra.io
api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io
proxy (HAProxy) /uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3 message queue (resque) hydra.io
api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io
proxy (HAProxy) /uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3 message queue (resque)
admin tools api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io proxy
(HAProxy) api.hydra.io proxy (HAProxy) /uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3 message queue (resque)
admin tools api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io proxy
(HAProxy) api.hydra.io proxy (HAProxy) /uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3 message queue (resque)
admin tools backbone.js hydra gem api.hydra.io proxy (HAProxy) api.hydra.io proxy
(HAProxy) api.hydra.io proxy (HAProxy) api.hydra.io proxy (HAProxy) /uploads /products /orders /artworks image processing MongoDB MongoDB MongoDB S3 message queue (resque)
Small, sharp tools
SOA is Lego for developers
Change is easy Change is hard
Prefactoring Draw pictures & simplify
When to extract into services? Mature functionality
Environments Staging
http://12factor.net/ Deployments
Caching at every layer Performance
- Test in isolation - Integration tests Testing
Everything Automate
Warning! Polyglot?
Reuse & Consistency
Nooo! Centralised Database
Keep checking the big picture
/api/v2/gorillas Versioning
Parallel HTTP requests
Small steps
Conclusions
1. Discipline pays
2. Minimise coupling
3. Small services
4. Reduce complexity
5. Check the big picture
START SMALL STAY SMALL
The future
None
None