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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Luca Grulla
April 23, 2012
Technology
140
1
Share
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
350
Other Decks in Technology
See All in Technology
Strands Agents超入門
kintotechdev
1
120
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
140
Python開発環境にハーネス適用を検討する
yuuka51
1
540
NFLコンペ2026 解法
lycorptech_jp
PRO
0
120
AI時代に改めて考える、ドメイン駆動設計 - モデリングが「AIへの共通言語」になる
littlehands
8
2.6k
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
950
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
250
実践 TanStack Start ― 新規プロダクトを開発して確立した、サーバーとクライアント境界の設計パターン / Practical TanStack Start Server-Client Boundary Patterns
kaminashi
2
330
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
200
データ分析基盤の信頼を支える視点と設計
yuki_saito
1
710
はじめてのAI-DLC
yoshidashingo
2
580
Amazon Bedrock 経由の Claude Cowork を試してみよう・MCP にも繋いでみよう
sugimomoto
0
200
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
580
Ethics towards AI in product and experience design
skipperchong
2
290
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
150
Exploring anti-patterns in Rails
aemeredith
3
370
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
430
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Designing for Timeless Needs
cassininazir
1
230
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
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