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

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Último (20)

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

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