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
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
AWSで2番目にリリースされたサービスについてお話しします(諸説あります)
yama3133
0
110
Babylon.js を使って試した色々な内容 / Various things I tried using Babylon.js / Babylon.js 勉強会 vol.5
you
PRO
0
230
"まず試す"ためのDatabricks Apps活用法 / Databricks Apps for Early Experiments and Validation
nttcom
1
160
推し活エージェント
yuntan_t
1
750
スケーリングを封じられたEC2を救いたい
senseofunity129
0
140
【関西電力KOI×VOLTMIND 生成AIハッカソン】空間AIブレイン ~⼤阪おばちゃんフィジカルAIに続く道~
tanakaseiya
0
130
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
140
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
180
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
140
Data Intelligence Engineering Unit 部門と各ポジション紹介
sansantech
PRO
0
110
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
Making the Leap to Tech Lead
cromwellryan
135
9.8k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
300
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Darren the Foodie - Storyboard
khoart
PRO
3
3.1k
A designer walks into a library…
pauljervisheath
211
24k
Six Lessons from altMBA
skipperchong
29
4.2k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
KATA
mclloyd
PRO
35
15k
Become a Pro
speakerdeck
PRO
31
5.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
130
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