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
76
Other Decks in Programming
See All in Programming
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
970
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
310
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2.1k
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
as(型アサーション)を書く前にできること
marokanatani
10
2.8k
Jakarta EE meets AI
ivargrimstad
0
740
React への依存を最小にするフロントエンド設計
takonda
19
5.3k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
260
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
170
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
GitHub's CSS Performance
jonrohan
1030
460k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
How GitHub (no longer) Works
holman
310
140k
Docker and Python
trallard
40
3.1k
RailsConf 2023
tenderlove
29
910
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
120
Speed Design
sergeychernyshev
25
620
Producing Creativity
orderedlist
PRO
341
39k
GraphQLとの向き合い方2022年版
quramy
43
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
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