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
Building a Firehose with NodeJS
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Luca Grulla
April 23, 2012
Technology
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Building a Firehose with NodeJS
August 2011 Forward First Tuesday - building a firehose in nodeJS
Luca Grulla
April 23, 2012
More Decks by Luca Grulla
See All by Luca Grulla
JavaScriptTesting
lucagrulla
1
1.2k
Il grande bluff delle stime
lucagrulla
0
360
Other Decks in Technology
See All in Technology
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
Digitization部 紹介資料
sansan33
PRO
2
7.7k
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
630
바이브풀 라이프
arawn
0
100
第3回しろおびセキュリティスポンサーセッション
log0417
0
160
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
130
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
160
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
200
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
2
350
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Prompt Engineering for Job Search
mfonobong
0
400
GraphQLとの向き合い方2022年版
quramy
50
15k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Making the Leap to Tech Lead
cromwellryan
135
10k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
We Are The Robots
honzajavorek
0
290
How STYLIGHT went responsive
nonsquared
100
6.2k
Transcript
Firehose Building a real-‐1me data stream with NodeJS
Luca Grulla@Forward London, 2/8/2011
Introduc1on Or what we wanted to build
We like to have a (near) real-‐1me view of
the data stream
Resilient
Scalable
Accurate (but not necessarily precise)
None
Verse and Chorus Or how we built it
Stack • NodeJS (0.4.9) • CoffeeScript •
ZeroMQ
Architecture
Interlude Or joys and pi4alls of building a tail
library for node
Living the asynchronous dream
Living the asynchronous dream • Error manifests itself
only at high throughput (7MB/secs) • The few implementa1ons you can find around are wrong (including Log.io – we are planning to contribute back)
Breathing in an asynchronous way
Learnings • You need to think asynchronous to write
asynchronous code • Dispatch internal events if you need to keep control of the flow • “Internal queues” to scale(up to a certain limit)
Performance • Beyond 5MB we start to fill the
internal queue • We are limited by IO, not from CPU/memory • Consistent throughput
Solo Or a short rant on declara<ve vs
impera<ve style
Event-‐driven approach • Event-‐driven is implicitly declara1ve – You
tell to the world that something just happened and do not care of what next • Fire events instead of passing around states – It’s cleaner – It’s simpler to maintain – It’s idioma1c
None
Ques1ons ?
References • npm install tail • hhps://github.com/forward/node-‐tail