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
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
320
Other Decks in Technology
See All in Technology
Rethinking Incident Response: Context-Aware AI in Practice
rrreeeyyy
1
120
Delegating the chores of authenticating users to Keycloak
ahus1
0
160
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
260
第4回Snowflake 金融ユーザー会 Snowflake summit recap
tamaoki
1
300
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
300
OSSのSNSツール「Misskey」をさわってみよう(右下ワイプで私のOSCの20年を振り返ります) / 20250705-osc2025-do
akkiesoft
0
170
Enhancing SaaS Product Reliability and Release Velocity through Optimized Testing Approach
ropqa
1
240
Coinbase™®️ USA Contact Numbers: Complete 2025 Support Guide
officialcoinbasehelpcenter
0
460
さくらのIaaS基盤のモニタリングとOpenTelemetry/OSC Hokkaido 2025
fujiwara3
3
460
SREの次のキャリアの道しるべ 〜SREがマネジメントレイヤーに挑戦して、 気づいたこととTips〜
coconala_engineer
1
140
Reach American Airlines®️ Instantly: 19 Calling Methods for Fast Support in the USA
flyamerican
1
180
CDKTFについてざっくり理解する!!~CloudFormationからCDKTFへ変換するツールも作ってみた~
masakiokuda
1
180
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
RailsConf 2023
tenderlove
30
1.1k
Automating Front-end Workflow
addyosmani
1370
200k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Embracing the Ebb and Flow
colly
86
4.7k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Faster Mobile Websites
deanohume
307
31k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Become a Pro
speakerdeck
PRO
29
5.4k
What's in a price? How to price your products and services
michaelherold
246
12k
Statistics for Hackers
jakevdp
799
220k
Bash Introduction
62gerente
613
210k
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