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
Netty at Twitter with Finagle
Search
Evan Meagher
July 29, 2014
Programming
4
380
Netty at Twitter with Finagle
A minimal set of slides used to present an overview of Finagle, an RPC library built atop Netty
Evan Meagher
July 29, 2014
Tweet
Share
More Decks by Evan Meagher
See All by Evan Meagher
Lessons Learned Writing Software at Whisker Labs
evanm
0
290
Other Decks in Programming
See All in Programming
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.3k
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
6k
Data-Centric Kaggle
isax1015
2
720
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
Python札幌 LT資料
t3tra
7
1.1k
2026年 エンジニアリング自己学習法
yumechi
0
120
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
AgentCoreとHuman in the Loop
har1101
5
200
Basic Architectures
denyspoltorak
0
630
組織で育むオブザーバビリティ
ryota_hnk
0
150
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.7k
Grafana:建立系統全知視角的捷徑
blueswen
0
310
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
210
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
What's in a price? How to price your products and services
michaelherold
247
13k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Exploring anti-patterns in Rails
aemeredith
2
230
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Bash Introduction
62gerente
615
210k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
53
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
190
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
200
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
87
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Transcript
@TwitterAds | Confidential Evan Meagher (@evanm) 7/28/14 Netty at Twitter
with Finagle
@Twitter 2 Agenda Why and what is Finagle? What does
it do? What are we working on now?
@Twitter 3 What is Finagle?
@Twitter 4 An open source, protocol-agnostic, asynchronous RPC library for
the JVM
@Twitter 5 Why did we build Finagle?
@Twitter 6 In the beginning…
@Twitter 7 Monolithic Rails app MySQL
@Twitter 8 Monolithic Rails app MySQL Monolithic Rails app MySQL
Monolithic Rails app MySQL … Monolithic Rails app MySQL … …
@Twitter 9
@Twitter 10
@Twitter 11 What is Finagle?
@Twitter 12 An open source, protocol-agnostic, asynchronous RPC library for
the JVM
@Twitter 13 An open source, protocol-agnostic, asynchronous RPC library for
the JVM
@Twitter 14 An open source, protocol-agnostic, asynchronous RPC library for
the JVM
@Twitter 15 An open source, protocol-agnostic, asynchronous RPC library for
the JVM
@Twitter 16 An open source, protocol-agnostic, asynchronous RPC library for
the JVM
@Twitter 17 What does Finagle do?
@Twitter 18 Standardizes the edges in a “boxes and arrows”
network diagram
@Twitter 19 [1] http://monkey.org/~marius/funsrv.pdf
@Twitter 20 type Service[Req, Rep] = Req => Future[Rep]
@Twitter 21 type Service[Req, Rep] = Req => Future[Rep] Server
Client Req Future[Rep]
@Twitter 22 A contrived example
@Twitter 23 val server = new Service[HttpReq, HttpRep] { def
apply(req: HttpReq): Future[HttpRep] = Future.value(HttpRep(Status.OK, req.body)) } ! Http.serve(":80", server)
@Twitter 24 val client: Service[HttpReq, HttpRep] = Http.newService(“twitter.com:80") ! val
futureResponse: Future[HttpRep] = client(HttpReq(“/")) ! futureResponse map { response => println(response) }
@Twitter 25 Now let’s say you need to authenticate requests
@Twitter 26 type Service[Req, Rep] = Req => Future[Rep] !
type Filter[Req, Rep] = (Req, Service[Req, Rep]) => Future[Rep]
@Twitter 27 type Service[Req, Rep] = Req => Future[Rep] !
type Filter[Req, Rep] = (Req, Service[Req, Rep]) => Future[Rep] Filter Filter Server Client
@Twitter 28 def isAuthed(req: Req): Boolean val authFilter: Filter[HttpReq, HttpRes]
= { (req, svc) => if (isAuthed(req)) svc(req) else Future.exception(new AccessDenied) } ! val authedServer: Service[HttpReq, HttpRes] = authFilter andThen server
@Twitter 29 val instrumentedServer = authFilter andThen traceRequest andThen recordStats
andThen server
@Twitter 30 What are we working on now?
@Twitter 31 Service discovery See the “Names” page on the
Finagle user guide: http://twitter.github.io/finagle/guide/Names.html ! val client = Http.newService( “zk!myzkhost.mycompany.com:2181!/my/zk/path” )
@Twitter 32 Load balancing
@Twitter 33 Request multiplexing See the “Protocols” page on the
Finagle user guide: http://twitter.github.io/finagle/guide/Protocols.html
@Twitter 34 Tail-latency optimization
@TwitterAds | Confidential Thanks! github.com/twitter/finagle @finagle @evanm