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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Luca Grulla
April 23, 2012
Technology
1
140
Building a Firehose with NodeJS
August 2011 Forward First Tuesday - building a firehose in nodeJS
Luca Grulla
April 23, 2012
Tweet
Share
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
Webhook best practices for rock solid and resilient deployments
glaforge
1
290
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
140
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
250
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
310
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
120
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
プロポーザルに込める段取り八分
shoheimitani
1
280
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
210
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Google's AI Overviews - The New Search
badams
0
910
Context Engineering - Making Every Token Count
addyosmani
9
660
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Being A Developer After 40
akosma
91
590k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
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