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
370
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
250
Other Decks in Programming
See All in Programming
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
280
git worktree × Claude Code × MCP ~生成AI時代の並列開発フロー~
hisuzuya
1
520
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
180
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
590
Select API from Kotlin Coroutine
jmatsu
1
220
Is Xcode slowly dying out in 2025?
uetyo
1
250
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
1.2k
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
640
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
13
8k
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
0
780
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
570
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
480
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Site-Speed That Sticks
csswizardry
10
680
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
GitHub's CSS Performance
jonrohan
1031
460k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Bash Introduction
62gerente
614
210k
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