Recommended
PDF
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
PDF
Node.js streaming csv downloads proxy
PPT
PDF
PDF
PDF
KEY
A language for the Internet: Why JavaScript and Node.js is right for Internet...
PDF
Devinsampa nginx-scripting
KEY
Servers with Event Machine - David Troy - RailsConf 2011
KEY
node.js: Javascript's in your backend
PDF
Server Side Event Driven Programming
PDF
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
KEY
PDF
Coroutines for Kotlin Multiplatform in Practise
PDF
PDF
KEY
PDF
ODP
Testing Wi-Fi with OSS Tools
PDF
Puppet and the HashiStack
PDF
Securing Prometheus exporters using HashiCorp Vault
PDF
Node.js and How JavaScript is Changing Server Programming
PPTX
Java script at backend nodejs
PDF
PDF
Application Logging in the 21st century - 2014.key
PDF
PDF
Ansible not only for Dummies
PDF
How to test code with mruby
KEY
Node.js - As a networking tool
PDF
More Related Content
PDF
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
PDF
Node.js streaming csv downloads proxy
PPT
PDF
PDF
PDF
KEY
A language for the Internet: Why JavaScript and Node.js is right for Internet...
PDF
Devinsampa nginx-scripting
What's hot
KEY
Servers with Event Machine - David Troy - RailsConf 2011
KEY
node.js: Javascript's in your backend
PDF
Server Side Event Driven Programming
PDF
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
KEY
PDF
Coroutines for Kotlin Multiplatform in Practise
PDF
PDF
KEY
PDF
ODP
Testing Wi-Fi with OSS Tools
PDF
Puppet and the HashiStack
PDF
Securing Prometheus exporters using HashiCorp Vault
PDF
Node.js and How JavaScript is Changing Server Programming
PPTX
Java script at backend nodejs
PDF
PDF
Application Logging in the 21st century - 2014.key
PDF
PDF
Ansible not only for Dummies
PDF
How to test code with mruby
Similar to Streams are Awesome - (Node.js) TimesOpen Sep 2012
KEY
Node.js - As a networking tool
PDF
PPTX
Becoming Node.js ninja on Cloud Foundry
ODP
PDF
Nodejsexplained 101116115055-phpapp02
PDF
Nodejs Explained with Examples
PPTX
PDF
Zero-Copy Event-Driven Servers with Netty
PPT
PDF
node.js - Eventful JavaScript on the Server
PDF
Functional Programming with Streams in node.js
PDF
Becoming a Node.js Ninja on Cloud Foundry - Open Tour London
PDF
PDF
Pharo Networking by Example
PDF
Socket programming using java
PDF
ARM LPC2300/LPC2400 TCP/IP Stack Porting
PDF
KEY
PDF
Comet with node.js and V8
PDF
More from Tom Croucher
KEY
Using Node.js to improve the performance of Mobile apps and Mobile web
KEY
Writing robust Node.js applications
KEY
Creating the Internet of Things with JavaScript - Fluent Conf
KEY
Using Node.js to make HTML5 work for everyone
KEY
A million connections and beyond - Node.js at scale
KEY
OSCON 2011 - Node.js Tutorial
PDF
Lessons from a coding veteran - Web Directions @Media
KEY
Multi-tiered Node Architectures - JSConf 2011
KEY
A language for the Internet: Why JavaScript and Node.js is right for Internet...
PDF
How to stop writing spaghetti code
PDF
Doing Horrible Things with DNS - Web Directions South
PDF
Doing Horrible Things to DNS in the Name of Science - SF Performance Meetup
PDF
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
KEY
How to stop writing spaghetti code - JSConf.eu 2010
PDF
PDF
Server Side JavaScript - You ain't seen nothing yet
PDF
JavaScript Everywhere! Creating a 100% JavaScript web stack
PDF
Mobile Data: How to avoid the latency trap - SWDC 2010
KEY
Let's run JavaScript Everywhere
KEY
Recently uploaded
PPTX
MuleSoft AI Series : Introduction to MCP
PDF
MuleSoft Meetup: Dreamforce'25 Tour- Vibing With AI & Agents.pdf
PPTX
Guardrails in Action - Ensuring Safe AI with Azure AI Content Safety.pptx
PDF
Mulesoft Meetup Online Portuguese: MCP e IA
PDF
Integrating AI with Meaningful Human Collaboration
PDF
[BDD 2025 - Artificial Intelligence] AI for the Underdogs: Innovation for Sma...
PDF
Accessibility & Inclusion: What Comes Next. Presentation of the Digital Acces...
PPTX
Support, Monitoring, Continuous Improvement & Scaling Agentic Automation [3/3]
PPTX
The power of Slack and MuleSoft | Bangalore MuleSoft Meetup #60
PDF
Dev Dives: Build smarter agents with UiPath Agent Builder
PPTX
kernel PPT (Explanation of Windows Kernal).pptx
PDF
[BDD 2025 - Artificial Intelligence] Building AI Systems That Users (and Comp...
PDF
[BDD 2025 - Full-Stack Development] Digital Accessibility: Why Developers nee...
PDF
[BDD 2025 - Full-Stack Development] Agentic AI Architecture: Redefining Syste...
PDF
Top Crypto Supers 15th Report November 2025
PDF
Transcript: The partnership effect: Libraries and publishers on collaborating...
PDF
[BDD 2025 - Mobile Development] Mobile Engineer and Software Engineer: Are we...
PDF
[BDD 2025 - Full-Stack Development] The Modern Stack: Building Web & AI Appli...
PPTX
UFCD 0797 - SISTEMAS OPERATIVOS_Unidade Completa.pptx
PDF
ODSC AI West: Agent Optimization: Beyond Context engineering
Streams are Awesome - (Node.js) TimesOpen Sep 2012 1. 2. 5. Scalable Server-Side Code with JavaScript
Node Up and Running
Tom Hughes-Croucher
http://ofps.oreilly.com/titles/9781449398583/
http://shop.oreilly.com/product/0636920015956.do
6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. var x = "I am a string"
~1ns Running 1 instruction
2ns Data from l1 cpu cache
5ns Data from l2 cpu cache
80ns Data from ram
@sh1mmer
18. 19. 20. 21. 22. 23. Streams
• Readable
• Pause
• Resume
• data event
• Writable
• Write
• Pipe
24. 25. nextTick
Event Loop Fail
nextTick
Run stuff
TCP
Conn node.cc
FS
Read
add-ons v8
TCP
Conn
v8
func libuv
v8 TCP
func Conn
libev iocp
v8 FS
func Read
FS
Read
26. 27. nextTick
Event Loop Fail
nextTick
stream.pause()
TCP
Conn node.cc
FS
Read
add-ons v8
TCP
Conn
v8
func libuv
v8 TCP
func Conn
libev iocp
v8 FS
func Read
FS
Read
28. New Streams
• Writable
• Same (hooray!)
• Readable
• Configure buffer waterline
• readable event
• read(len) -> returns data
• Pipe
• Doesn't mix with direct access
29. 30. var d = domain.create();
function readSomeFile(filename, cb) {
fs.readFile(filename, 'utf8', d.bind(function(er, data) {
// if this throws, it will also be passed to the domain
return cb(er, data ? JSON.parse(data) : null);
}));
}
d.on('error', function(er) {
// an error occurred somewhere.
// if we throw it now, it will crash the program
// with the normal line number and stack message.
});
@sh1mmer
31.