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
57
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
53
Actor Model
linjunpop
0
28
Ruby for iOS developer
linjunpop
0
1k
A brief introduction to GitHub
linjunpop
1
66
Test Driven Development
linjunpop
0
46
Ruby 2.0
linjunpop
1
170
Other Decks in Programming
See All in Programming
個人軟體時代
ethanhuang13
0
320
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
210
旅行プランAIエージェント開発の裏側
ippo012
2
890
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
21
5.6k
為你自己學 Python - 冷知識篇
eddie
1
350
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
私の後悔をAWS DMSで解決した話
hiramax
4
210
OSS開発者という働き方
andpad
5
1.7k
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
300
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
120
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
200
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
A Tale of Four Properties
chriscoyier
160
23k
Designing Experiences People Love
moore
142
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Cult of Friendly URLs
andyhume
79
6.6k
A designer walks into a library…
pauljervisheath
207
24k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
RailsConf 2023
tenderlove
30
1.2k
Facilitating Awesome Meetings
lara
55
6.5k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Bash Introduction
62gerente
615
210k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
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