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
300
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
140
The Bipolar Programmer
janogonzalez
4
570
Ruby for your two internal programmers
janogonzalez
4
220
Ruby for Java minds
janogonzalez
4
1k
How Ruby Programmed Me
janogonzalez
11
480
Other Decks in Technology
See All in Technology
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
280
MLOps の現場から
asei
7
660
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
670
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
260
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
540
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1.1k
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
Wantedly での Datadog 活用事例
bgpat
1
580
React Routerで実現する型安全なSPAルーティング
sansantech
PRO
2
140
5分でわかるDuckDB
chanyou0311
10
3.3k
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
110
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
170
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Why Our Code Smells
bkeepers
PRO
335
57k
Code Review Best Practice
trishagee
65
17k
The Invisible Side of Design
smashingmag
298
50k
Embracing the Ebb and Flow
colly
84
4.5k
It's Worth the Effort
3n
183
28k
Optimizing for Happiness
mojombo
376
70k
Building an army of robots
kneath
302
44k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Adopting Sorbet at Scale
ufuk
73
9.1k
Side Projects
sachag
452
42k
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