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
250
Migrando a Microservicios
janogonzalez
1
260
Extracting services from a monolith
janogonzalez
3
240
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
410
Two programmers in one
janogonzalez
1
130
The Bipolar Programmer
janogonzalez
4
560
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
ロリポップ! for Gamersを支えるインフラ/lolipop for gamers infrastructure
takumakume
0
130
可視化により内部品質をあげるAIドキュメントリバース/20240910 Hiromitsu Akiba
shift_evolve
0
200
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
300
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
200
Technical Writing Meetup vol.35
soracom
PRO
2
110
グイグイ系QAマネージャーの仕事
sadonosake
0
290
Analytics-Backed App Widget Development - Served with Jetpack Glance
miyabigouji
0
550
疎通2024
sadnessojisan
5
1k
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
1
920
ついに出た!OpenAIの最新モデル「o1」って何がすごいの?
minorun365
PRO
3
700
Fediverse Discovery Providers overview
andypiper
0
160
Road to Single Activity
yurihondo
1
230
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
135
6.5k
BBQ
matthewcrist
83
9.2k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
Being A Developer After 40
akosma
84
590k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
103
48k
VelocityConf: Rendering Performance Case Studies
addyosmani
322
23k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
GraphQLとの向き合い方2022年版
quramy
43
13k
Why You Should Never Use an ORM
jnunemaker
PRO
53
8.9k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
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