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
Microservices in Practice
Search
Jano González
October 24, 2014
Technology
7
620
Microservices in Practice
My talk at RubyConf Argentina 2014
Jano González
October 24, 2014
Tweet
Share
More Decks by Jano González
See All by Jano González
Containerizing your monolith
janogonzalez
0
290
Migrando a Microservicios
janogonzalez
1
270
Extracting services from a monolith
janogonzalez
3
240
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
420
Two programmers in one
janogonzalez
1
130
The Bipolar Programmer
janogonzalez
4
570
Ruby for your two internal programmers
janogonzalez
4
210
Ruby for Java minds
janogonzalez
4
1k
How Ruby Programmed Me
janogonzalez
11
470
Other Decks in Technology
See All in Technology
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
920
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
200
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
210
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Engineer Career Talk
lycorp_recruit_jp
0
190
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
770
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.3k
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Git: the NoSQL Database
bkeepers
PRO
427
64k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Done Done
chrislema
181
16k
Designing the Hi-DPI Web
ddemaree
280
34k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
380
Code Review Best Practice
trishagee
64
17k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Transcript
None
@janogonzalez MICROSERVICES IN PRACTICE
LAST YEAR…
None
Leandro “Inkel” López, 2013 “El ordenador, ordena. La computadora, computa”
˝
12hrs AUDIO/min
HUNDREDS OF MILLIONS users/month
MANY PLATFORMS
$ rails soundcloud
The Mothership
Pearl Jam - Do the Evolution “It’s evolution, baby!” ˝
soundcloud.com iOS/Android 3rd party Public API Domain logic The Mothership
None
WELCOME TO THE MONOLITH Population: you
CONWAY’S LAW
Marvin Conway, 1968 “Organizations produce systems whose design is a
copy of the structure of the organization”
BREAKING THE MONOLITH ˝
MICROSERVICES ARCHITECTURE
JUST SOA FOR HIPSTERS?
CROSS FUNCTIONAL TEAMS ˝
None
None
BOUNDED CONTEXTS ˝
Track User Favoriting
DOMAIN MODEL FITS IN YOUR HEAD ˝
Track Likes Count Favoriting
YOU CAN USE THE RIGHT TOOLS ˝
FASTERS TESTS ˝
ENABLES REPLACEABILITY ˝
None
CONTINUOUS DEPLOYMENT ˝
SOA WITHOUT VENDOR LOCK-IN?
SMART COMPONENTS, DUMB PIPES ˝
HC SVNT DRACONES ˝
YOU CAN USE TOO MANY TOOLS ˝
DUPLICATED EFFORTS ˝
AVAILABILITY VS CONSISTENCY ˝
CASCADING FAILURES ˝
None
None
None
None
TOO MANY NETWORK CALLS ˝
None
YOU HAVE NETWORK CALLS ˝
L. Peter Deutsch - Ten Fallacies of Distributed Computing “The
network is reliable”
WHO CALLS WHO AGAIN?
OUR MIGRATION TO MICROSERVICES
SAY NO TO THE BIG-BANG ˝
EXTRACT WHEN MODIFYING ˝
Client Apps Public API Domain logic The Mothership Microservice Internal
API (bounded context)
DE-ACTIVE RECORD ˝
def index likes = user_likes_service.public_track_likes( @user, pagination_params) ! respond collection_for(likes)
end
USE FEATURE FLAGS ˝
if $feature.active?(:use_likes_service, current_user) … else … end
CREATE YOUR SERVICE ˝
MONITOR YOUR SERVICE ˝
PREVENT CASCADING FAILURES ˝
None
CIRCUIT BREAKERS ˝
None
X X X
X X X
X X
USE LIFECYCLE EVENTS ˝
Public API Domain logic The Mothership Microservice Internal API Events
Broker
EVENTUAL CONSISTENCY ˝
Microservice Microservice Client b1:(p,q,r), b2:(/) (a1;b1),(a1;b2)
DEFINE AUTHORITATIVE SOURCES ˝
DEFINE SYSTEM ROLES ˝
Microservice Microservice Client b1:(p,q,r), b2:(/) (a1;b1),(a1;b2)
Listing system Entity System Client b1:(p,q,r), b2:(/) (a1;b1),(a1;b2)
REDUCE “CHATTINESS” ˝
ONE SIZE DOESN’T FIT ALL ˝
CLIENT SPECIFIC APIs ˝
BFF ˝
Listing system Entity System Entity System Client specific API
Listing system Entity System Entity System Client specific API (a1;b1),(a1;b2)
Listing system Entity System Entity System Client specific API a1:(x,y,z)
b1:(p,q,r), b2:(/)
Listing system Entity System Entity System Client specific API (a1.x,
a1.y, b1.p)
EXTRACTING LIBRARIES ˝
COMING SOON…
DISTRIBUTED TRACING ˝
MORE TOLERANT READERS ˝
BINARY PROTOCOLS? ˝
CONCLUSIONS
SMALL FOCUSED TEAMS ˝
DELIVERING FAST ˝
BEWARE OF LOSING THE BIG PICTURE ˝
BEWARE OF TOO MANY STACKS ˝
BEWARE OF DUPLICATE EFFORTS ˝
AVOID BIG-BANG MIGRATIONS ˝
EXPECT DISTRIBUTED FAILURE ˝
MONITOR ALL THE SERVICES ˝
MICROSERVICES WORK FOR US, BUT…
NO SILVER BULLET ˝
THANK YOU
[email protected]
http://soundcloud.com/jobs
(WE ARE HIRING)
[email protected]
http://soundcloud.com/jobs
•https://www.flickr.com/photos/rubyconfar/11231906253/in/set-72157638113568114 •"Gilbert Hill, Andheri" by Madhav Pai - originally posted
to Flickr as Gilbert Hill, Andheri. Licensed under Creative Commons Attribution 2.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/ File:Gilbert_Hill,_Andheri.jpg#mediaviewer/File:Gilbert_Hill,_Andheri.jpg