SlideShare una empresa de Scribd logo
1 de 34
Node Version 0.8.x
           What’s new in Node?




http://www.meetup.com/Pittsburgh-Node-js/
NicholasDeveloper
UX Designer &
              McClay



 @nickmcclay
Speed Improvements

http://blog.nodejs.org/2012/06/25/node-v0-8-0/
How much faster is it?!?!

    A.) 1%
    B.) 10%
    C.) 50%
    D.) 100%
Ehh... its not really clear...


Somewhere between 1% and 10% as far as I can tell...
A note about benchmarking node


Remember it’s “./node”
Huge deviation in repeated tests (3829 - 6462 #/sec)
Node 0.4.x has issues running io.js (constant duration)
Write Speed Improvements
                           0.8                0.6

             500

             375
Write 1MB    250

             125

              0
                   1kb   4kb     8kb   16kb   32kb   64kb
Read Speed Improvements
                           0.8                0.6

             400

             300
Read 1MB     200

             100

              0
                   1kb   4kb     8kb   16kb   32kb   64kb
HTTP Server Improvements
                              0.8   0.6     0.4

                       6000

                       4500
Serve “Hello World!”   3000

                       1500

                         0
                                    #/Sec
Uh... Apache Bench?
                                 0.8   0.6     0.4

                          2500

100000 total requests     1875


100 concurrent requests   1250

                          625

                            0
                                       #/Sec
API Changes
Deprecated

http.Client()
path.{exists,existsSync} -> fs.{exists,existsSync}
tty.setRawMode(mode) -> tty.ReadStream#setRawMode()
direct usage of ev_* and eio_*, should use uv_*
Removed

waf build system -> gyp
require(‘sys’) -> require(‘util’)
process.installPrefix
node --vars
Lots more changes and additions
    process
                                                                                                                                     •     buffer

      ◦        process.stdin.on('keypress') will not be emitted by default, as it's an internal API. Use the keypress module now.
                                                                                                                                                ◦    'utf16le' encoding.
      ◦        process.stdin.pipe(dest) will automatically call process.stdin.resume().
                                                                                                                                     •     child_process
•   cluster


                                                                                                                                                ◦    silent option to child_process.fork() - stdout and stderr won't be shared with parent.
      ◦        cluster.fork() no longer return a child_process.fork() object use cluster.fork().process to get the object.
                                                                                                                                                ◦    .disconnect() when using child_process.fork() this will allow the child to die gracefully.
      ◦        the 'death' event on the cluster object is renamed to 'exit'.
                                                                                                                                                ◦    stdio option for child_process.spawn() - configuration of child's stdio (file descriptors).
      ◦        the kill() method is renamed to destroy().
                                                                                                                                                ◦    detached option for child_process.spawn() - make the child a process group leader (see docs)
      ◦        the CLUSTER_WORKER_ID env is now called CLUSTER_UNIQUE_ID, but you should not have used that anyway.
                                                                                                                                                ◦    child.send() can now send net.Server and net.Socket as second argument.
      ◦        workers now kill themselves when they accidentally lose their connection to the master.
                                                                                                                                     •     cluster
•   http


                                                                                                                                                ◦    'fork', 'online', 'listening', and 'setup' events.
      ◦        http.Server emits 'connect' event instead of 'upgrade' when the CONNECT method is requested.
                                                                                                                                                ◦    Worker object which is provided from cluster.workers (in the master) or cluster.worker (in the worker).
      ◦        http.ServerResponse sends Date: header by default. You can disable it by setting response.sendDate to false.
                                                                                                                                                ◦    env optional argument to cluster.fork().
      ◦        http.ClientRequest emits 'connect' event instead of 'request' when the CONNECT method is responded.
                                                                                                                                                ◦    cluster.setupMaster() and cluster.settings.
•   net
                                                                                                                                                ◦    cluster.disconnect() and worker.disconnect().

      ◦        net.listen(socketPath) no longer unlinks the socket unless you call server.close(). Automatic unlinking was                      ◦    worker.id what there before was internally known as workerID.

               subject to race conditions in multi-process setups. Also applies to http.listen(socketPath).                                     ◦    worker.suicide flag set when worker disconnect or die, indicate if this was an accidental death.

•   child_process                                                                                                                    •     crypto



      ◦        arguments and options arguments of child_process.fork() became an option.                                                        ◦    crypto.getDiffieHellman().

      ◦        the 'exit' event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed.        ◦    cipher.setAutoPadding() and decipher.setAutoPadding().

      ◦        the 'close' event was added that has is emitted after the child has exited and all the stdio pipes are closed.                   ◦    ciphers option to crypto.createCredentials().

•   readline                                                                                                                         •     domain



      ◦        arguments of rl.createInterface became an option as rl.createInterface(options) but still took an old style                      ◦    see http://nodejs.org/docs/v0.8.0/api/domain.html

                                                                                                                                     •     fs
Lots more changes and additions
    process




                                                                                                                                        l f:
                                                                                                                                     •     buffer




                                                                                                                                     rse
      ◦        process.stdin.on('keypress') will not be emitted by default, as it's an internal API. Use the keypress module now.




                                                                                                                                  ou
                                                                                                                                                ◦    'utf16le' encoding.
      ◦        process.stdin.pipe(dest) will automatically call process.stdin.resume().




                                                                                                                                ry
                                                                                                                                     •     child_process
•   cluster




                           ad   fo                  wiki/
                                                                                                                                                ◦    silent option to child_process.fork() - stdout and stderr won't be shared with parent.
      ◦        cluster.fork() no longer return a child_process.fork() object use cluster.fork().process to get the object.




                        re                       de/
                                                                                                                                                ◦    .disconnect() when using child_process.fork() this will allow the child to die gracefully.
      ◦        the 'death' event on the cluster object is renamed to 'exit'.




                  Go .com/joyent d-v0.8     /no
                                                                                                                                                ◦    stdio option for child_process.spawn() - configuration of child's stdio (file descriptors).
      ◦        the kill() method is renamed to destroy().
                                                                                                                                                ◦    detached option for child_process.spawn() - make the child a process group leader (see docs)
      ◦        the CLUSTER_WORKER_ID env is now called CLUSTER_UNIQUE_ID, but you should not have used that anyway.
                                                                                                                                                ◦    child.send() can now send net.Server and net.Socket as second argument.
      ◦        workers now kill themselves when they accidentally lose their connection to the master.
                                                                                                                                     •     cluster
•   http




                      git hub              0.6 -an
                                                                                                                                                ◦    'fork', 'online', 'listening', and 'setup' events.




                                       n-v
      ◦        http.Server emits 'connect' event instead of 'upgrade' when the CONNECT method is requested.




              tps: //               wee
                                                                                                                                                ◦    Worker object which is provided from cluster.workers (in the master) or cluster.worker (in the worker).
      ◦        http.ServerResponse sends Date: header by default. You can disable it by setting response.sendDate to false.




           ht                    et
                                                                                                                                                ◦    env optional argument to cluster.fork().
      ◦        http.ClientRequest emits 'connect' event instead of 'request' when the CONNECT method is responded.




                            es-b
                                                                                                                                                ◦    cluster.setupMaster() and cluster.settings.




                       ang
•   net
                                                                                                                                                ◦    cluster.disconnect() and worker.disconnect().




                   I-ch
      ◦        net.listen(socketPath) no longer unlinks the socket unless you call server.close(). Automatic unlinking was                      ◦    worker.id what there before was internally known as workerID.




                AP
               subject to race conditions in multi-process setups. Also applies to http.listen(socketPath).                                     ◦    worker.suicide flag set when worker disconnect or die, indicate if this was an accidental death.

•   child_process                                                                                                                    •     crypto



      ◦        arguments and options arguments of child_process.fork() became an option.                                                        ◦    crypto.getDiffieHellman().

      ◦        the 'exit' event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed.        ◦    cipher.setAutoPadding() and decipher.setAutoPadding().

      ◦        the 'close' event was added that has is emitted after the child has exited and all the stdio pipes are closed.                   ◦    ciphers option to crypto.createCredentials().

•   readline                                                                                                                         •     domain



      ◦        arguments of rl.createInterface became an option as rl.createInterface(options) but still took an old style                      ◦    see http://nodejs.org/docs/v0.8.0/api/domain.html

                                                                                                                                     •     fs
req.pause actually pauses requests
Domains

http://nodejs.org/api/domain.html
highlights

Domains provide a way to handle multiple different IO
operations as a single group.
Keeps context unlike“process.on(‘uncaughtException’)”
Disabled by default
An async callback
Without domains
Adding domains
With domains
Cluster

http://nodejs.org/api/domain.html
highlights

Take advantage of multi-core system to handle load
easily create a network of processes that share common
ports
setup and manage master-slave worker relationships
Disabled by default
Adding cluster
More cores = more node
Cluster messaging
What about isolates?
Was intended to make child_process.fork() in a thread,
rather than a full process.
Make it cheaper to spin up new child node instances as well
as fast message-passing using shared memory.
Experiments sometimes fail
Caused too much instability
Requires a lot of complexity added to libuv and node
Isn’t likely to yield enough gains as the work requires
What’s next! Node v0.9

More speed improvements
Major overhaul of streams
???
@nickmcclay




See you for Node v0.10!
       Thanks!

Más contenido relacionado

La actualidad más candente

Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsjacekbecela
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming Tom Croucher
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to NodejsGabriele Lana
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleTom Croucher
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developerscacois
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)Domenic Denicola
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node jsfakedarren
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & ExpressChristian Joudrey
 
Node js presentation
Node js presentationNode js presentation
Node js presentationmartincabrera
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backendDavid Padbury
 
Comet with node.js and V8
Comet with node.js and V8Comet with node.js and V8
Comet with node.js and V8amix3k
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejsAmit Thakkar
 
Node Architecture and Getting Started with Express
Node Architecture and Getting Started with ExpressNode Architecture and Getting Started with Express
Node Architecture and Getting Started with Expressjguerrero999
 

La actualidad más candente (20)

Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
What is nodejs
What is nodejsWhat is nodejs
What is nodejs
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developers
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & Express
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
Comet with node.js and V8
Comet with node.js and V8Comet with node.js and V8
Comet with node.js and V8
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 
Node Architecture and Getting Started with Express
Node Architecture and Getting Started with ExpressNode Architecture and Getting Started with Express
Node Architecture and Getting Started with Express
 
NodeJS
NodeJSNodeJS
NodeJS
 
Express node js
Express node jsExpress node js
Express node js
 
Node ppt
Node pptNode ppt
Node ppt
 

Destacado

Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deploymentNicholas McClay
 
AngularJS + React
AngularJS + ReactAngularJS + React
AngularJS + Reactjustvamp
 
Combining Angular and React Together
Combining Angular and React TogetherCombining Angular and React Together
Combining Angular and React TogetherSebastian Pederiva
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stackNicholas McClay
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJSBoris Dinkevich
 
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.jsThe MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.jsMongoDB
 

Destacado (12)

Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deployment
 
AngularJS + React
AngularJS + ReactAngularJS + React
AngularJS + React
 
Node.js and Parse
Node.js and ParseNode.js and Parse
Node.js and Parse
 
Coffee script throwdown
Coffee script throwdownCoffee script throwdown
Coffee script throwdown
 
Angular JS 2.0 & React with Kendo UI
Angular JS 2.0 & React with Kendo UIAngular JS 2.0 & React with Kendo UI
Angular JS 2.0 & React with Kendo UI
 
React Vs AnagularJS
React Vs AnagularJSReact Vs AnagularJS
React Vs AnagularJS
 
Combining Angular and React Together
Combining Angular and React TogetherCombining Angular and React Together
Combining Angular and React Together
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJS
 
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.jsThe MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
 
Node.js and NoSQL
Node.js and NoSQLNode.js and NoSQL
Node.js and NoSQL
 

Similar a Node.js 0.8 features

Python twisted
Python twistedPython twisted
Python twistedMahendra M
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...Hackito Ergo Sum
 
Riak add presentation
Riak add presentationRiak add presentation
Riak add presentationIlya Bogunov
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disquszeeg
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCDrsebbe
 
Real-Time Streaming with Apache Spark Streaming and Apache Storm
Real-Time Streaming with Apache Spark Streaming and Apache StormReal-Time Streaming with Apache Spark Streaming and Apache Storm
Real-Time Streaming with Apache Spark Streaming and Apache StormDavorin Vukelic
 
Java gpu computing
Java gpu computingJava gpu computing
Java gpu computingArjan Lamers
 
Nanocloud cloud scale jvm
Nanocloud   cloud scale jvmNanocloud   cloud scale jvm
Nanocloud cloud scale jvmaragozin
 
Anatomy of an action
Anatomy of an actionAnatomy of an action
Anatomy of an actionGordon Chung
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Prajal Kulkarni
 
JavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesJavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesCharles Nutter
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsRichard Lee
 
OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchDaniel Ben-Zvi
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsAzul Systems, Inc.
 

Similar a Node.js 0.8 features (20)

JavaScript Event Loop
JavaScript Event LoopJavaScript Event Loop
JavaScript Event Loop
 
Python twisted
Python twistedPython twisted
Python twisted
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
 
Riak add presentation
Riak add presentationRiak add presentation
Riak add presentation
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCD
 
Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
 
Real-Time Streaming with Apache Spark Streaming and Apache Storm
Real-Time Streaming with Apache Spark Streaming and Apache StormReal-Time Streaming with Apache Spark Streaming and Apache Storm
Real-Time Streaming with Apache Spark Streaming and Apache Storm
 
Java gpu computing
Java gpu computingJava gpu computing
Java gpu computing
 
Nanocloud cloud scale jvm
Nanocloud   cloud scale jvmNanocloud   cloud scale jvm
Nanocloud cloud scale jvm
 
Anatomy of an action
Anatomy of an actionAnatomy of an action
Anatomy of an action
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
JavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesJavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for Dummies
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switch
 
分散式系統
分散式系統分散式系統
分散式系統
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM Mechanics
 
无锁编程
无锁编程无锁编程
无锁编程
 

Último

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Último (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Node.js 0.8 features

  • 1. Node Version 0.8.x What’s new in Node? http://www.meetup.com/Pittsburgh-Node-js/
  • 2. NicholasDeveloper UX Designer & McClay @nickmcclay
  • 4. How much faster is it?!?! A.) 1% B.) 10% C.) 50% D.) 100%
  • 5. Ehh... its not really clear... Somewhere between 1% and 10% as far as I can tell...
  • 6. A note about benchmarking node Remember it’s “./node” Huge deviation in repeated tests (3829 - 6462 #/sec) Node 0.4.x has issues running io.js (constant duration)
  • 7. Write Speed Improvements 0.8 0.6 500 375 Write 1MB 250 125 0 1kb 4kb 8kb 16kb 32kb 64kb
  • 8. Read Speed Improvements 0.8 0.6 400 300 Read 1MB 200 100 0 1kb 4kb 8kb 16kb 32kb 64kb
  • 9. HTTP Server Improvements 0.8 0.6 0.4 6000 4500 Serve “Hello World!” 3000 1500 0 #/Sec
  • 10. Uh... Apache Bench? 0.8 0.6 0.4 2500 100000 total requests 1875 100 concurrent requests 1250 625 0 #/Sec
  • 12. Deprecated http.Client() path.{exists,existsSync} -> fs.{exists,existsSync} tty.setRawMode(mode) -> tty.ReadStream#setRawMode() direct usage of ev_* and eio_*, should use uv_*
  • 13. Removed waf build system -> gyp require(‘sys’) -> require(‘util’) process.installPrefix node --vars
  • 14. Lots more changes and additions process • buffer ◦ process.stdin.on('keypress') will not be emitted by default, as it's an internal API. Use the keypress module now. ◦ 'utf16le' encoding. ◦ process.stdin.pipe(dest) will automatically call process.stdin.resume(). • child_process • cluster ◦ silent option to child_process.fork() - stdout and stderr won't be shared with parent. ◦ cluster.fork() no longer return a child_process.fork() object use cluster.fork().process to get the object. ◦ .disconnect() when using child_process.fork() this will allow the child to die gracefully. ◦ the 'death' event on the cluster object is renamed to 'exit'. ◦ stdio option for child_process.spawn() - configuration of child's stdio (file descriptors). ◦ the kill() method is renamed to destroy(). ◦ detached option for child_process.spawn() - make the child a process group leader (see docs) ◦ the CLUSTER_WORKER_ID env is now called CLUSTER_UNIQUE_ID, but you should not have used that anyway. ◦ child.send() can now send net.Server and net.Socket as second argument. ◦ workers now kill themselves when they accidentally lose their connection to the master. • cluster • http ◦ 'fork', 'online', 'listening', and 'setup' events. ◦ http.Server emits 'connect' event instead of 'upgrade' when the CONNECT method is requested. ◦ Worker object which is provided from cluster.workers (in the master) or cluster.worker (in the worker). ◦ http.ServerResponse sends Date: header by default. You can disable it by setting response.sendDate to false. ◦ env optional argument to cluster.fork(). ◦ http.ClientRequest emits 'connect' event instead of 'request' when the CONNECT method is responded. ◦ cluster.setupMaster() and cluster.settings. • net ◦ cluster.disconnect() and worker.disconnect(). ◦ net.listen(socketPath) no longer unlinks the socket unless you call server.close(). Automatic unlinking was ◦ worker.id what there before was internally known as workerID. subject to race conditions in multi-process setups. Also applies to http.listen(socketPath). ◦ worker.suicide flag set when worker disconnect or die, indicate if this was an accidental death. • child_process • crypto ◦ arguments and options arguments of child_process.fork() became an option. ◦ crypto.getDiffieHellman(). ◦ the 'exit' event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed. ◦ cipher.setAutoPadding() and decipher.setAutoPadding(). ◦ the 'close' event was added that has is emitted after the child has exited and all the stdio pipes are closed. ◦ ciphers option to crypto.createCredentials(). • readline • domain ◦ arguments of rl.createInterface became an option as rl.createInterface(options) but still took an old style ◦ see http://nodejs.org/docs/v0.8.0/api/domain.html • fs
  • 15. Lots more changes and additions process l f: • buffer rse ◦ process.stdin.on('keypress') will not be emitted by default, as it's an internal API. Use the keypress module now. ou ◦ 'utf16le' encoding. ◦ process.stdin.pipe(dest) will automatically call process.stdin.resume(). ry • child_process • cluster ad fo wiki/ ◦ silent option to child_process.fork() - stdout and stderr won't be shared with parent. ◦ cluster.fork() no longer return a child_process.fork() object use cluster.fork().process to get the object. re de/ ◦ .disconnect() when using child_process.fork() this will allow the child to die gracefully. ◦ the 'death' event on the cluster object is renamed to 'exit'. Go .com/joyent d-v0.8 /no ◦ stdio option for child_process.spawn() - configuration of child's stdio (file descriptors). ◦ the kill() method is renamed to destroy(). ◦ detached option for child_process.spawn() - make the child a process group leader (see docs) ◦ the CLUSTER_WORKER_ID env is now called CLUSTER_UNIQUE_ID, but you should not have used that anyway. ◦ child.send() can now send net.Server and net.Socket as second argument. ◦ workers now kill themselves when they accidentally lose their connection to the master. • cluster • http git hub 0.6 -an ◦ 'fork', 'online', 'listening', and 'setup' events. n-v ◦ http.Server emits 'connect' event instead of 'upgrade' when the CONNECT method is requested. tps: // wee ◦ Worker object which is provided from cluster.workers (in the master) or cluster.worker (in the worker). ◦ http.ServerResponse sends Date: header by default. You can disable it by setting response.sendDate to false. ht et ◦ env optional argument to cluster.fork(). ◦ http.ClientRequest emits 'connect' event instead of 'request' when the CONNECT method is responded. es-b ◦ cluster.setupMaster() and cluster.settings. ang • net ◦ cluster.disconnect() and worker.disconnect(). I-ch ◦ net.listen(socketPath) no longer unlinks the socket unless you call server.close(). Automatic unlinking was ◦ worker.id what there before was internally known as workerID. AP subject to race conditions in multi-process setups. Also applies to http.listen(socketPath). ◦ worker.suicide flag set when worker disconnect or die, indicate if this was an accidental death. • child_process • crypto ◦ arguments and options arguments of child_process.fork() became an option. ◦ crypto.getDiffieHellman(). ◦ the 'exit' event is now emitted right after the child process exits. It no longer waits for all stdio pipes to be closed. ◦ cipher.setAutoPadding() and decipher.setAutoPadding(). ◦ the 'close' event was added that has is emitted after the child has exited and all the stdio pipes are closed. ◦ ciphers option to crypto.createCredentials(). • readline • domain ◦ arguments of rl.createInterface became an option as rl.createInterface(options) but still took an old style ◦ see http://nodejs.org/docs/v0.8.0/api/domain.html • fs
  • 18. highlights Domains provide a way to handle multiple different IO operations as a single group. Keeps context unlike“process.on(‘uncaughtException’)” Disabled by default
  • 19.
  • 25. highlights Take advantage of multi-core system to handle load easily create a network of processes that share common ports setup and manage master-slave worker relationships Disabled by default
  • 27. More cores = more node
  • 30. Was intended to make child_process.fork() in a thread, rather than a full process. Make it cheaper to spin up new child node instances as well as fast message-passing using shared memory.
  • 32. Caused too much instability Requires a lot of complexity added to libuv and node Isn’t likely to yield enough gains as the work requires
  • 33. What’s next! Node v0.9 More speed improvements Major overhaul of streams ???
  • 34. @nickmcclay See you for Node v0.10! Thanks!

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n