SlideShare a Scribd company logo
An Introduction to Node
From David Bella hosted by NYC Open Data
January 30, 2014
2

A Little About Me
• B.S. Computer Science from UCONN
• 2 Years of ETL in Finance (Perl)
• Attended The Flatiron School Ruby 003 in September
• Currently Software Engineer at XO Group (Rails)
• Join us! XO Hackathon February 8th and 9th - bit.ly/xohack

davidhenrybella

davidbella

davidbella.com
3

INANE
I'm Not A Node Expert
4

What is Node?
Some confusing terminology

• Web Server?
• Engine?
• Runtime?
• Stack?
• Platform
5

What is Node?
False comparisons to other technology

• Rails - A Web Framework
• nginx - A Web Server
• JavaScript - A Programming Language
• Node - A Non-Blocking, Event-Driven, Networking Platform
6

What is Node?
What is Node Made Of?

• JavaScript - The Language
• V8 - The JavaScript Engine
• Abstraction Layer
• Core Library

These 3-4 items make up what we know as "Node"
7

JavaScript and V8
JavaScript engines were historically closely tied to browsers

V8 is the JavaScript engine pulled out of the browser (Chrome)

Now we can run JavaScript code like we run Ruby, Perl, Python...

One might say JS is to V8 as Ruby is to MRI, maybe
8

Node and V8
Node uses the V8 Engine

Node's abstraction layer is an implementation of the Reactor Pattern

Node's core library makes use of the reactor pattern to handle requests

Ruby's EventMachine is an implementation of the reactor pattern
9

The Reactor Pattern
The main event loop is non-blocking and waits for work requests

Requests are dispatched out to the reactor by the event loop

The reactor is a single threaded worker that takes work requests,
processes them one at a time until fully completed, then starts the next
request
10

Node, The Reactor, and You
ACTUAL SIZE
11

Node, The Reactor, and You
The code you run runs "normally"

Anything run through Node goes through the reactor

This up environment an you asynchronous sets interact that can with
Example "Time"
13

Synchronous Timer
0 .v r s e p = r q i e " l e " ;
1 a le
eur(sep)
0 .s e p s e p
2 le.le(
0.
3
0.
4

1

0 .)
5 ;
0 .c n o e l g " O N N " ;
6 osl.o(N O O)
14

Asynchronous Timer
0.
1
0 .s t i e u (
2 eTmot
0.
3
0.
4

fnto( {
u c i n ) },
10
00

0 .)
5 ;
0 .c n o e l g " O G G " ;
6 osl.o(G O O)
15

Callbacks
16

Callbacks
There is nothing magical or Node specific about callbacks

It is simply a function passed into another function that gets executed at
some point - usually when that second function is finished or has
something to report to the caller, like an error
Phoning in Some
Callbacks
18

Callbacks and Events
This is an example of what we mean when we say Node is Event Driven

Callbacks/Events are important in Node so that we know when Node is
done running whatever work we gave it

Node can alert us of an event by using a callback
Node Doesn't Care
About You
20

Tying It All Together...
• Node uses V8 JavaScript
• Node implements an event-driven Reactor pattern
• JavaScript was designed as an event based programming language

Wonderful! Node ties together two beautiful
concepts - evented programming and an
event based pattern. so much. wow.
I Request an HTTP
Example
22

So - Why's It Good?
Highly concurrent - the event based architecture helps handle requests
without having to create new threads and switch between them

Real time, two way connections - Create a richer web experience for the
user (we'll get to this much later)

Open Web Stack - HTML, CSS, JS are a dream team, now we have JS on
the backend, further reducing complexity
23

And... Why's It Bad?
It's not a silver bullet for all issues

Not great at single threaded CPU intensive calculations

While it is JavaScript, the evented, asynchronous environment is difficult
to get used to
24

Short Note about NPM
NPM is the Node Package Maid Manager

Allows you to pull in extra packages for Node that you can then require

• npm install -g <package_name> # Installs globally
• npm install <package_name> # Installs locally
Half Time Review
and Questions
26

What We Are Making
A simple REST API powered by Express, backed by MongoDB

A front end with Backbone.js for rendering the collection

Simple publish subscribe functionality with Faye to provide live updates
27

Questions and Thanks!
A huge thank you to:

• Vivian and NYC Open Data
• Ryan Dahl and Joyent for making and supporting Node
• Vadim Makeev for the Shower presentation software
• Everyone here!
• XO Group for employing me!

More Related Content

What's hot

The art of concurrent programming
The art of concurrent programmingThe art of concurrent programming
The art of concurrent programming
Iskren Chernev
 
Peter Mihalik: Puppet
Peter Mihalik: PuppetPeter Mihalik: Puppet
Peter Mihalik: Puppet
Jano Suchal
 
Yet another json rpc library (mole rpc)
Yet another json rpc library (mole rpc)Yet another json rpc library (mole rpc)
Yet another json rpc library (mole rpc)
Viktor Turskyi
 
Who Broke My Crypto
Who Broke My CryptoWho Broke My Crypto
Who Broke My Crypto
John Varghese
 
Reactive programming with Rxjava
Reactive programming with RxjavaReactive programming with Rxjava
Reactive programming with Rxjava
Christophe Marchal
 
ruby + websocket + haproxy
ruby + websocket + haproxyruby + websocket + haproxy
ruby + websocket + haproxy
Mathieu Elie
 
Multi-core Node.pdf
Multi-core Node.pdfMulti-core Node.pdf
Multi-core Node.pdf
Ahmed Hassan
 
Evented Ruby VS Node.js
Evented Ruby VS Node.jsEvented Ruby VS Node.js
Evented Ruby VS Node.js
Nitin Gupta
 
RxJava Applied
RxJava AppliedRxJava Applied
RxJava Applied
Igor Lozynskyi
 
Task queuing with redis and rq
Task queuing with redis and rqTask queuing with redis and rq
Task queuing with redis and rq
ndeininger
 
Drizzle Talk
Drizzle TalkDrizzle Talk
Drizzle Talk
Brian Aker
 
MongoDB, Node.js And You: PART II
MongoDB, Node.js And You: PART IIMongoDB, Node.js And You: PART II
MongoDB, Node.js And You: PART II
Mitch Pirtle
 
Creating parallel tests for NUnit with PNUnit - hands on lab
Creating parallel tests for NUnit with PNUnit - hands on labCreating parallel tests for NUnit with PNUnit - hands on lab
Creating parallel tests for NUnit with PNUnit - hands on labpsluaces
 
Asynchronous job queues with python-rq
Asynchronous job queues with python-rqAsynchronous job queues with python-rq
Asynchronous job queues with python-rq
Ashish Acharya
 
ZeroMQ: Super Sockets - by J2 Labs
ZeroMQ: Super Sockets - by J2 LabsZeroMQ: Super Sockets - by J2 Labs
ZeroMQ: Super Sockets - by J2 LabsJames Dennis
 
OHHttpStubs
OHHttpStubsOHHttpStubs
OHHttpStubs
CocoaHeads France
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
Oleg Podsechin
 
Cassandra at Glogster
Cassandra at GlogsterCassandra at Glogster
Cassandra at Glogster
Roman Komkov
 
HTTP/2 Server Push
HTTP/2 Server PushHTTP/2 Server Push
HTTP/2 Server Push
Apache Traffic Server
 

What's hot (20)

The art of concurrent programming
The art of concurrent programmingThe art of concurrent programming
The art of concurrent programming
 
Peter Mihalik: Puppet
Peter Mihalik: PuppetPeter Mihalik: Puppet
Peter Mihalik: Puppet
 
Yet another json rpc library (mole rpc)
Yet another json rpc library (mole rpc)Yet another json rpc library (mole rpc)
Yet another json rpc library (mole rpc)
 
Who Broke My Crypto
Who Broke My CryptoWho Broke My Crypto
Who Broke My Crypto
 
Ferrara Linux Day 2011
Ferrara Linux Day 2011Ferrara Linux Day 2011
Ferrara Linux Day 2011
 
Reactive programming with Rxjava
Reactive programming with RxjavaReactive programming with Rxjava
Reactive programming with Rxjava
 
ruby + websocket + haproxy
ruby + websocket + haproxyruby + websocket + haproxy
ruby + websocket + haproxy
 
Multi-core Node.pdf
Multi-core Node.pdfMulti-core Node.pdf
Multi-core Node.pdf
 
Evented Ruby VS Node.js
Evented Ruby VS Node.jsEvented Ruby VS Node.js
Evented Ruby VS Node.js
 
RxJava Applied
RxJava AppliedRxJava Applied
RxJava Applied
 
Task queuing with redis and rq
Task queuing with redis and rqTask queuing with redis and rq
Task queuing with redis and rq
 
Drizzle Talk
Drizzle TalkDrizzle Talk
Drizzle Talk
 
MongoDB, Node.js And You: PART II
MongoDB, Node.js And You: PART IIMongoDB, Node.js And You: PART II
MongoDB, Node.js And You: PART II
 
Creating parallel tests for NUnit with PNUnit - hands on lab
Creating parallel tests for NUnit with PNUnit - hands on labCreating parallel tests for NUnit with PNUnit - hands on lab
Creating parallel tests for NUnit with PNUnit - hands on lab
 
Asynchronous job queues with python-rq
Asynchronous job queues with python-rqAsynchronous job queues with python-rq
Asynchronous job queues with python-rq
 
ZeroMQ: Super Sockets - by J2 Labs
ZeroMQ: Super Sockets - by J2 LabsZeroMQ: Super Sockets - by J2 Labs
ZeroMQ: Super Sockets - by J2 Labs
 
OHHttpStubs
OHHttpStubsOHHttpStubs
OHHttpStubs
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
Cassandra at Glogster
Cassandra at GlogsterCassandra at Glogster
Cassandra at Glogster
 
HTTP/2 Server Push
HTTP/2 Server PushHTTP/2 Server Push
HTTP/2 Server Push
 

Similar to An introduction to node3

Node js internal
Node js internalNode js internal
Node js internal
Chinh Ngo Nguyen
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
Sarunyhot Suwannachoti
 
Nodejs
NodejsNodejs
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
Kalp Corporate
 
Real time web
Real time webReal time web
Real time web
Medhat Dawoud
 
What is Node.js
What is Node.jsWhat is Node.js
What is Node.js
mohamed hadrich
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Aaron Rosenberg
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
Gary Yeh
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
Ambassador Labs
 
Node.js Chapter1
Node.js Chapter1Node.js Chapter1
Node.js Chapter1
Talentica Software
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
Khaled Mosharraf
 
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - MeetupOpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
Cloud Native Day Tel Aviv
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
Jibanananda Sana
 
Nodejs overview
Nodejs overviewNodejs overview
Nodejs overview
Nicola Del Gobbo
 

Similar to An introduction to node3 (20)

Node js internal
Node js internalNode js internal
Node js internal
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
 
Nodejs
NodejsNodejs
Nodejs
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
 
Real time web
Real time webReal time web
Real time web
 
JavaScript Event Loop
JavaScript Event LoopJavaScript Event Loop
JavaScript Event Loop
 
What is Node.js
What is Node.jsWhat is Node.js
What is Node.js
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
Node.js Chapter1
Node.js Chapter1Node.js Chapter1
Node.js Chapter1
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - MeetupOpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
Node js
Node jsNode js
Node js
 
Nodejs overview
Nodejs overviewNodejs overview
Nodejs overview
 

More from Vivian S. Zhang

Why NYC DSA.pdf
Why NYC DSA.pdfWhy NYC DSA.pdf
Why NYC DSA.pdf
Vivian S. Zhang
 
Career services workshop- Roger Ren
Career services workshop- Roger RenCareer services workshop- Roger Ren
Career services workshop- Roger Ren
Vivian S. Zhang
 
Nycdsa wordpress guide book
Nycdsa wordpress guide bookNycdsa wordpress guide book
Nycdsa wordpress guide book
Vivian S. Zhang
 
We're so skewed_presentation
We're so skewed_presentationWe're so skewed_presentation
We're so skewed_presentation
Vivian S. Zhang
 
Wikipedia: Tuned Predictions on Big Data
Wikipedia: Tuned Predictions on Big DataWikipedia: Tuned Predictions on Big Data
Wikipedia: Tuned Predictions on Big Data
Vivian S. Zhang
 
A Hybrid Recommender with Yelp Challenge Data
A Hybrid Recommender with Yelp Challenge Data A Hybrid Recommender with Yelp Challenge Data
A Hybrid Recommender with Yelp Challenge Data
Vivian S. Zhang
 
Kaggle Top1% Solution: Predicting Housing Prices in Moscow
Kaggle Top1% Solution: Predicting Housing Prices in Moscow Kaggle Top1% Solution: Predicting Housing Prices in Moscow
Kaggle Top1% Solution: Predicting Housing Prices in Moscow
Vivian S. Zhang
 
Data mining with caret package
Data mining with caret packageData mining with caret package
Data mining with caret package
Vivian S. Zhang
 
Xgboost
XgboostXgboost
Streaming Python on Hadoop
Streaming Python on HadoopStreaming Python on Hadoop
Streaming Python on Hadoop
Vivian S. Zhang
 
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its authorKaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Vivian S. Zhang
 
Xgboost
XgboostXgboost
Nyc open-data-2015-andvanced-sklearn-expanded
Nyc open-data-2015-andvanced-sklearn-expandedNyc open-data-2015-andvanced-sklearn-expanded
Nyc open-data-2015-andvanced-sklearn-expanded
Vivian S. Zhang
 
Nycdsa ml conference slides march 2015
Nycdsa ml conference slides march 2015 Nycdsa ml conference slides march 2015
Nycdsa ml conference slides march 2015
Vivian S. Zhang
 
THE HACK ON JERSEY CITY CONDO PRICES explore trends in public data
THE HACK ON JERSEY CITY CONDO PRICES explore trends in public dataTHE HACK ON JERSEY CITY CONDO PRICES explore trends in public data
THE HACK ON JERSEY CITY CONDO PRICES explore trends in public data
Vivian S. Zhang
 
Max Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learningMax Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learning
Vivian S. Zhang
 
Winning data science competitions, presented by Owen Zhang
Winning data science competitions, presented by Owen ZhangWinning data science competitions, presented by Owen Zhang
Winning data science competitions, presented by Owen Zhang
Vivian S. Zhang
 
Using Machine Learning to aid Journalism at the New York Times
Using Machine Learning to aid Journalism at the New York TimesUsing Machine Learning to aid Journalism at the New York Times
Using Machine Learning to aid Journalism at the New York Times
Vivian S. Zhang
 
Introducing natural language processing(NLP) with r
Introducing natural language processing(NLP) with rIntroducing natural language processing(NLP) with r
Introducing natural language processing(NLP) with r
Vivian S. Zhang
 
Bayesian models in r
Bayesian models in rBayesian models in r
Bayesian models in r
Vivian S. Zhang
 

More from Vivian S. Zhang (20)

Why NYC DSA.pdf
Why NYC DSA.pdfWhy NYC DSA.pdf
Why NYC DSA.pdf
 
Career services workshop- Roger Ren
Career services workshop- Roger RenCareer services workshop- Roger Ren
Career services workshop- Roger Ren
 
Nycdsa wordpress guide book
Nycdsa wordpress guide bookNycdsa wordpress guide book
Nycdsa wordpress guide book
 
We're so skewed_presentation
We're so skewed_presentationWe're so skewed_presentation
We're so skewed_presentation
 
Wikipedia: Tuned Predictions on Big Data
Wikipedia: Tuned Predictions on Big DataWikipedia: Tuned Predictions on Big Data
Wikipedia: Tuned Predictions on Big Data
 
A Hybrid Recommender with Yelp Challenge Data
A Hybrid Recommender with Yelp Challenge Data A Hybrid Recommender with Yelp Challenge Data
A Hybrid Recommender with Yelp Challenge Data
 
Kaggle Top1% Solution: Predicting Housing Prices in Moscow
Kaggle Top1% Solution: Predicting Housing Prices in Moscow Kaggle Top1% Solution: Predicting Housing Prices in Moscow
Kaggle Top1% Solution: Predicting Housing Prices in Moscow
 
Data mining with caret package
Data mining with caret packageData mining with caret package
Data mining with caret package
 
Xgboost
XgboostXgboost
Xgboost
 
Streaming Python on Hadoop
Streaming Python on HadoopStreaming Python on Hadoop
Streaming Python on Hadoop
 
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its authorKaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
 
Xgboost
XgboostXgboost
Xgboost
 
Nyc open-data-2015-andvanced-sklearn-expanded
Nyc open-data-2015-andvanced-sklearn-expandedNyc open-data-2015-andvanced-sklearn-expanded
Nyc open-data-2015-andvanced-sklearn-expanded
 
Nycdsa ml conference slides march 2015
Nycdsa ml conference slides march 2015 Nycdsa ml conference slides march 2015
Nycdsa ml conference slides march 2015
 
THE HACK ON JERSEY CITY CONDO PRICES explore trends in public data
THE HACK ON JERSEY CITY CONDO PRICES explore trends in public dataTHE HACK ON JERSEY CITY CONDO PRICES explore trends in public data
THE HACK ON JERSEY CITY CONDO PRICES explore trends in public data
 
Max Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learningMax Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learning
 
Winning data science competitions, presented by Owen Zhang
Winning data science competitions, presented by Owen ZhangWinning data science competitions, presented by Owen Zhang
Winning data science competitions, presented by Owen Zhang
 
Using Machine Learning to aid Journalism at the New York Times
Using Machine Learning to aid Journalism at the New York TimesUsing Machine Learning to aid Journalism at the New York Times
Using Machine Learning to aid Journalism at the New York Times
 
Introducing natural language processing(NLP) with r
Introducing natural language processing(NLP) with rIntroducing natural language processing(NLP) with r
Introducing natural language processing(NLP) with r
 
Bayesian models in r
Bayesian models in rBayesian models in r
Bayesian models in r
 

Recently uploaded

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 

An introduction to node3

  • 1. An Introduction to Node From David Bella hosted by NYC Open Data January 30, 2014
  • 2. 2 A Little About Me • B.S. Computer Science from UCONN • 2 Years of ETL in Finance (Perl) • Attended The Flatiron School Ruby 003 in September • Currently Software Engineer at XO Group (Rails) • Join us! XO Hackathon February 8th and 9th - bit.ly/xohack davidhenrybella davidbella davidbella.com
  • 3. 3 INANE I'm Not A Node Expert
  • 4. 4 What is Node? Some confusing terminology • Web Server? • Engine? • Runtime? • Stack? • Platform
  • 5. 5 What is Node? False comparisons to other technology • Rails - A Web Framework • nginx - A Web Server • JavaScript - A Programming Language • Node - A Non-Blocking, Event-Driven, Networking Platform
  • 6. 6 What is Node? What is Node Made Of? • JavaScript - The Language • V8 - The JavaScript Engine • Abstraction Layer • Core Library These 3-4 items make up what we know as "Node"
  • 7. 7 JavaScript and V8 JavaScript engines were historically closely tied to browsers V8 is the JavaScript engine pulled out of the browser (Chrome) Now we can run JavaScript code like we run Ruby, Perl, Python... One might say JS is to V8 as Ruby is to MRI, maybe
  • 8. 8 Node and V8 Node uses the V8 Engine Node's abstraction layer is an implementation of the Reactor Pattern Node's core library makes use of the reactor pattern to handle requests Ruby's EventMachine is an implementation of the reactor pattern
  • 9. 9 The Reactor Pattern The main event loop is non-blocking and waits for work requests Requests are dispatched out to the reactor by the event loop The reactor is a single threaded worker that takes work requests, processes them one at a time until fully completed, then starts the next request
  • 10. 10 Node, The Reactor, and You ACTUAL SIZE
  • 11. 11 Node, The Reactor, and You The code you run runs "normally" Anything run through Node goes through the reactor This up environment an you asynchronous sets interact that can with
  • 13. 13 Synchronous Timer 0 .v r s e p = r q i e " l e " ; 1 a le eur(sep) 0 .s e p s e p 2 le.le( 0. 3 0. 4 1 0 .) 5 ; 0 .c n o e l g " O N N " ; 6 osl.o(N O O)
  • 14. 14 Asynchronous Timer 0. 1 0 .s t i e u ( 2 eTmot 0. 3 0. 4 fnto( { u c i n ) }, 10 00 0 .) 5 ; 0 .c n o e l g " O G G " ; 6 osl.o(G O O)
  • 16. 16 Callbacks There is nothing magical or Node specific about callbacks It is simply a function passed into another function that gets executed at some point - usually when that second function is finished or has something to report to the caller, like an error
  • 18. 18 Callbacks and Events This is an example of what we mean when we say Node is Event Driven Callbacks/Events are important in Node so that we know when Node is done running whatever work we gave it Node can alert us of an event by using a callback
  • 20. 20 Tying It All Together... • Node uses V8 JavaScript • Node implements an event-driven Reactor pattern • JavaScript was designed as an event based programming language Wonderful! Node ties together two beautiful concepts - evented programming and an event based pattern. so much. wow.
  • 21. I Request an HTTP Example
  • 22. 22 So - Why's It Good? Highly concurrent - the event based architecture helps handle requests without having to create new threads and switch between them Real time, two way connections - Create a richer web experience for the user (we'll get to this much later) Open Web Stack - HTML, CSS, JS are a dream team, now we have JS on the backend, further reducing complexity
  • 23. 23 And... Why's It Bad? It's not a silver bullet for all issues Not great at single threaded CPU intensive calculations While it is JavaScript, the evented, asynchronous environment is difficult to get used to
  • 24. 24 Short Note about NPM NPM is the Node Package Maid Manager Allows you to pull in extra packages for Node that you can then require • npm install -g <package_name> # Installs globally • npm install <package_name> # Installs locally
  • 25. Half Time Review and Questions
  • 26. 26 What We Are Making A simple REST API powered by Express, backed by MongoDB A front end with Backbone.js for rendering the collection Simple publish subscribe functionality with Faye to provide live updates
  • 27. 27 Questions and Thanks! A huge thank you to: • Vivian and NYC Open Data • Ryan Dahl and Joyent for making and supporting Node • Vadim Makeev for the Shower presentation software • Everyone here! • XO Group for employing me!