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
Search
Jun Lin
August 01, 2018
Programming
0
53
Microservices
A brief introduction to Microservices.
Jun Lin
August 01, 2018
Tweet
Share
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
48
Actor Model
linjunpop
0
24
Ruby for iOS developer
linjunpop
0
990
A brief introduction to GitHub
linjunpop
1
64
Test Driven Development
linjunpop
0
41
Ruby 2.0
linjunpop
1
170
Other Decks in Programming
See All in Programming
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
340
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
950
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.3k
デザインパターンで理解するLLMエージェントの作り方 / How to develop an LLM agent using agentic design patterns
rkaga
3
390
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
180
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
210
Featured
See All Featured
Happy Clients
brianwarren
98
6.7k
Agile that works and the tools we love
rasmusluckow
327
21k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Statistics for Hackers
jakevdp
796
220k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Practical Orchestrator
shlominoach
186
10k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Transcript
Microservices A brief introduction to
Microservices Building scalable cloud-based software applications
The Outline • What is a Monolith • What are
Microservices • The benefit • The drawback • A demo • What Archiver can do • What’s Next
Monolith
A single application bundle Web Service Mail DB Push
What’s wrong?
Slow compile/startup time 15s
Bundled scalability Web Service Mail DB Push Web Service Mail
DB Push Web Service Mail DB Push
Failure diffusion 1 2 3 1 2 3
Chaos on cooperation 1 2 3 4 A B C
Application Teams
Delay shipping 1 2 3 4
Long-term commitment to a technology stack
What are microservices
An architectural style
Self-contained Billing System Auth System Recommendation System
Communication Billing System Auth System Recommendation System
Replaceable Smart Recommendation System Billing System Auth System Stupid Recommendation
System
Is it good?
Benefits • Independent development • Independent deployment • Independent scalability
• Reusability
Independent development
Team-Service Billing Recommend ation A B Support C
Faster iteration Version 1 Version 2 Version 3 Version 1
Version 2
Polyglot Application Java Rust Javascript Ruby
Independent deployment
Rapidly shipment Order Support Social
Fault isolation Order Support Social Uptime 99.999%
Independent scalability
Scale independently Order Support Social Order Order Social Order
Reusability
Reusability Transcoding Streaming Upload Transcoding Download Social Application A Application
B
Is it that good?
Additional complexity Service A Service B Service C
Inter-service communication RESTful AMPQ grpc Authentication Discovery MessagePack Protocol Buffers
Connection pools Timeouts
Costs on the remote calls Service Service Service UI 10ms
20ms 30 ms
Shared library Order Social Support Shared logic
Hard to see the big picture
Dev dependency hell 2 1 3 New feature 4
Not a silver bullet
Demo
Exporter Fetcher Google Drive Dropbox The System
Fetcher The System Platform API Grab recordings
Exporter The System Export Google Drive Dropbox
Fetcher Google Drive Dropbox UI Components
Demo https://git.io/archiver-demo
• Self-Contained service • Inter-application communication protocol (http/json) • Shared
library (Archiver.Shared) • Storage (service maintain it’s own state) • Supervising What’s implemented
None
Archiver
Find the boundary
12-Factor App https://12factor.net
Monitoring
Progressive migration
Recap
Recap • What is a Monolith • What are Microservices
• The benefit • The drawback • A demo • What Archiver can do
What’s Next
• ServiceMesh • Serverless (AWS Lambda) • Spring Cloud or
Akka or .. • https://segment.com/blog/introducing-centrifuge/
One more thing
Actor Model
The Actor Model Actor Mailbox State
https://commons.wikimedia.org/wiki/File:Erlang_logo.svg http://www.erlang.org
Object Orientation OO is only about message passing and isolation
and protection of state. - Alan Kay http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
None