SlideShare a Scribd company logo
Comet with node.js and V8


          by amix
About me
•   Cofounder and lead developer of Plurk.com
    Coded most of the frontend and backend


• Mostly code in Python and JavaScript
    But I am proficient in other languages as well (C, Java, Lisp, Lua etc.)


• I have coded since I was 12
    24 years old now and still love to program :-)


• Not a node.js expert...
    But I find it very interesting
Overview of the talk
• Why JavaScript matters
• What makes V8 VM special
• node.js in some details
• Characteristics of comet communication
•   Implementing comet using node.js and WebSockets

• Perspective: JavaScript as the future platform
Why JavaScript matters
• The pool of JavaScript programmers is huge
    and it’s getting bigger
• JavaScript’sbrowsers that support it and allthe mobile
  think of all the
                   distribution is among
                                               the
                                                   largest
    platforms that support it or will support it... Think of Flash

•   Big companies like Adobe, Google, Apple and Microsoft
    are spending tons of $ in improving JavaScript

• JavaScript is likely to become one of the
    most popular languages
• JavaScript is gaining ground on the backend

Recommended for you

Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)

This is a presentation I prepared for a local meetup. The audience is a mix of web designers and developers who have a wide range of development experience.

node.js introduction javascript npm callbacks asyn
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

The document is a presentation about Node.js, a JavaScript runtime built on Chrome's V8 JavaScript engine. It discusses how Node.js uses an event-driven, non-blocking I/O model that makes it particularly suited for real-time web applications and I/O-intensive applications compared to traditional threaded server models. It provides examples of Node.js features like asynchronous I/O, event loops, modules and the npm package manager.

nodenodejsjavascript
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express

This document discusses creating REST APIs with Express, Node.js, and MySQL. It provides an overview of Express and its advantages. It then demonstrates how to set up a Node.js and MySQL environment, create an Express server, and implement API routes to GET, POST, DELETE, and PUT data from a MySQL database table. Code examples are provided to retrieve all todos, a single todo by ID, search todos by keyword, add a new todo, delete a todo, and update an existing todo.

express frameworkexpress node js apiexpress with mysql
What makes V8 special
•   V8 JavaScript VM is used in Google Chrome
    and is developed by a small Google team in
    Denmark. V8 is open-source

• V8 team is led by Lars Bak, one of the
    leading VM engineers in the world with 20
    years of experience in building VMs
• Lars Bak was the technical lead behind
    HotSpot (Sun’s Java VM). HotSpot improved
    Java’s performance 20x times
•   Before HotSpot Lars Bak worked on a Smalltalk VM
What makes V8 special
• No JIT, all JavaScript is compiled to assembler
• Hidden classes optimization properties, instead it
  V8 does not dynamically lookup access
                                        from Self
  uses hidden classes that are created behind the scene

• Improved garbage collector garbage collector
  stop-the-world, generational, accurate,

• V8 is independent of Google Chrome
• Remarks / “limitations”: threads, no processes
  No bytecode language, no
What is node.js?
• A system built on top of V8
• Introduces: IO
    - non-blocking
      - ability to do system calls
      - HTTP libraries
      - module system (+ other things)

• The non-blocking nature makes node.js a
    good fit for comet and next generation
    realtime web-applications
•   8000 lines of C/C++, 2000 lines of Javascript, 14 contributors
Advantages of non-blocking




• nginx: non-blocking apache: threaded
• non-blocking can handle more req. pr. sec
    and uses a lot less memory
•   comet does not scale at all for threaded servers...

                       graph source: http://blog.webfaction.com/a-little-holiday-present

Recommended for you

NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner

This document provides an introduction to NodeJS for beginners. It discusses what NodeJS is, how it uses non-blocking I/O and event-driven architecture, and how to set up NodeJS. It also covers global objects, modules, asynchronous vs synchronous code, core NodeJS modules like filesystem and events, and how to create a basic "Hello World" NodeJS application.

non blocking i/ojavascriptv8 engine
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

This document provides an overview of building Node.js applications using the Connect and Express frameworks. It discusses getting started with Node.js and installing Connect and Express with npm. It then demonstrates building a simple "Hello World" app with the HTTP module, Connect, and Express. Key features of Connect like middleware, routing, and static file serving are covered. Express is introduced as a simpler framework built on Connect that simplifies common tasks. The document concludes with examples of routing, configuration, views, and other Express features.

nodejsnodeconnect
Building servers with Node.js
Building servers with Node.jsBuilding servers with Node.js
Building servers with Node.js

The document summarizes Travis Swicegood's presentation on building servers with Node.js. It discusses how Node.js is an evented I/O toolkit that allows building scalable servers using an event loop model. It provides examples of simple socket and HTTP servers in Node.js, and how storing state and handling asynchronous operations like database queries differs in an evented model.

frameworknodejs
Major point
JavaScript programming is already geared
towards event based programming:
• Events in browsers....
• Closures (anonymous functions) are natural part
   of the language

  document.addEventListener("click", function(event) {
  	 alert(event)
  }, false)
Hello world using node.js
var	
  sys	
  =	
  require('sys'),	
  
	
  	
  	
  	
  http	
  =	
  require('http')

http.createServer(function	
  (req,	
  res)	
  {
	
   setTimeout(function	
  ()	
  {
	
   	
     res.sendHeader(200,	
  {'Content-­‐Type':	
  'text/plain'})
	
   	
     res.sendBody('Hello	
  World')
	
   	
     res.finish()
	
   },	
  2000)
}).listen(8000)

sys.puts('Server	
  running	
  at	
  http://127.0.0.1:8000/')




                                                                          hello_world.js
Blocking vs. non-blocking
The way to do it            The way to do
in most other               it in node.js!
languages:                  puts("Enter your name: ")
                            gets(function (name) {
                                puts("Name: " + name)
puts("Enter your name: ")   })
var name = gets()
puts("Name: " + name)




           node.js design philosophy:
     To receive data from disk, network or
   another process there must be a callback.
Events in node.js
    • All objects which emit events are are
        instances of process.EventEmitter
    • A promise is a EventEmitter which emits
        either success or error, but not both
var tcp = require("tcp")       var stat = require("posix").stat,
                                   puts = require("sys").puts
var s = tcp.createServer()
                               var promise = stat("/etc/passwd")
s.addListener("connection",
                               promise.addCallback(function (s) {
   function (c) {
                                  puts("modified: " + s.mtime)
      c.send("hello nasty!")
                               })
      c.close()                promise.addErrback(function(orgi_promise) {
})                                  puts("Could not fetch stats on /etc/passwd")
s.listen(8000)                 })

Recommended for you

Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js

This 15 minute presentation discusses non-blocking I/O, event loops, and Node.js. It builds on previous work by Ryan Dahl, explaining how threads can be expensive due to context switching and memory usage, and how Node.js uses an event-driven, non-blocking model to avoid these costs. Code examples demonstrate getting and printing a policy object, handling HTTP requests asynchronously without blocking additional connections, and using callbacks to chain asynchronous actions together.

Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows JavaScript to be used for server-side scripting and provides APIs for networking and file system operations. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, allowing a single process to handle thousands of concurrent connections. It includes a package manager and common module system. Popular frameworks like Express make it easy to build scalable web servers and applications with Node.js.

nodejsintroduction
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

This document provides an overview of building a real-life application in Node.js. It discusses selecting a database like MongoDB, using Express for routing and templating, and Mongoose for modeling and interacting with the database. Key components covered include setting up routing, views, and static assets in Express, performing CRUD operations in MongoDB via Mongoose, and using templating engines like Jade or EJS. The overall goal is to build a basic content management system to demonstrate integrating these technologies.

node
Comet vs. Ajax
                Ajax is so yesterday...
      Comet is the new superhero on the block




Comet can be used to create real time web-applications
     Examples include Plurk and Google Wave. Demo of Plurk real time messaging
Ajax vs. Comet
          Ajax                          Comet (long poll)                     Comet (streaming)
Browser              Server           Browser              Server           Browser              Server
          request                               request                               request

          response


                                                               x seconds

                              event



                                                response                              response
          request
                                                                    event                                 event
                                                request
          response
                                                                                      response
                                                                                                          event




  How most do it today                  How some do it today                 How we will do it soon
Major point
• Comet servers need to have a lot of open
  connections
• One thread pr. connection does not scale
• The solution is to use event based servers
• It’s only possible to create event based
  servers in node.js!
Implementing comet
• Long polling parts. Used in Plurk
  - works for most
  - is more expensive and problematic than streaming

• Streaming withoutto proxies and firewalls
  - Very problematic due
                         WebSockets:

• Streaming with WebSockets (HTML5):side
  - Makes comet trivial on both client and server

• In this presentation we will focus on the
  future: Building a chat application with
  WebSockets and node.js

Recommended for you

Express node js
Express node jsExpress node js
Express node js

The document provides an overview of middleware in Node.js and Express. It defines middleware as functions that have access to the request and response objects and can run code and make changes to these objects before the next middleware in the chain. It discusses common uses of middleware like logging, authentication, parsing request bodies. It also covers Connect middleware and how Express builds on Connect by adding features like routing and views. Key aspects covered include the middleware pipeline concept, error handling with middleware, and common middleware modules.

Node ppt
Node pptNode ppt
Node ppt

This document provides an overview of Node.js, including common uses, a simple "Hello World" example server, how Node.js is an event-driven platform rather than just a web server, its single-threaded asynchronous architecture based on an event loop, prerequisites for programming in Node.js like understanding callbacks and closures, its module system and use of npm, challenges of asynchronous programming, common patterns and antipatterns, and difficulties of debugging and monitoring Node.js applications.

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

Slides from a webinar recorded on June 11, 2015 by Jordan Kasper on Node.js architecture and Express Fundamentals

nodenodejsnode.js
WebSockets
•   Aims to expose TCP/IP sockets to browsers,
    while respecting the constraints of the web
    (security, proxies and firewalls)

• A thin layer on top of TCP/IP that adds:
    •   origin based security model

    •   Addressing and protocol naming mechanism for supporting multiple
        services on one port and multiple host names on one IP address

    •   framing mechanism for data transporation

•   More information: http://dev.w3.org/html5/websockets/

•   Currently implemented in Google Chrome
node.websocket.js implementation
                                                                                                      demo
var	
  sys	
  =	
  require('sys')                                    Room = {
	
   	
  members	
  =	
  []                                          	 init: function() {
                                                                     	 	       Room.ws = new WebSocket('ws://127.0.0.1:8080/chat')
var	
  Module	
  =	
  this.Module	
  =	
  function()	
  {	
  }       	 	       Room.ws.onopen = Room._onopen
                                                                     	 	       Room.ws.onmessage = Room._onmessage
Module.prototype.onData	
  =	
  function(data,	
  connection)	
  {   	 	       Room.ws.onclose = Room._onclose
	
   for(var	
  i	
  in	
  members)                                  	 },
                                                                         //...
	
   	
    members[i].send(data)
                                                                         _send: function(user, message){
};
                                                                     	 	       Room.ws.send(serializeJSON({
                                                                     	 	       	    'from': user,
Module.prototype.onConnect	
  =	
  function(connection)	
  {         	 	       	    'message': message
	
   members.push(connection)                                        	 	       }))
}                                                                    	 },
                                                                         _onmessage: function(m) {
Module.prototype.onDisconnect	
  =	
  function(connection)	
  {      	 	       if (m.data) {
	
   for(var	
  i	
  in	
  members)	
  {                             	 	       	    var data = evalTxt(m.data)
	
   	
    if(members[i]	
  ==	
  connection)	
  {
	
   	
    	
        members.splice(i,	
  1)                         	   	      	   from = data.from
	
   	
    	
        break;                                          	   	      	   message = data.message
	
   	
    }                                                              //...
	
   }
}



                                          Note: I have patched
                                 node.websocket.js to include onConnect...
Other comet servers
• JBoss Netty: Java library for doing non-
  blocking networking, based on java.nio
  used by Plurk to handle 200.000+ open connections


• erlycomet: Erlang comet server based on
  MochiWeb
• Tornado: FriendFeed’s Python non-
  blocking server
• I have tried most of the popular approaches
  and none of them feel as natural as node.js!
How does node.js perfrom?
   • Hello World benchmark node.js vs. Tornado
        non scientific - take it with a grain of salt!

   •    Tornado is one of the fastest Python based servers
$ ab -c 100 -n 1000 http://127.0.0.1:8000/          $ ab -c 100 -n 1000 http://127.0.0.1:8000/
Concurrency Level:      100                         Concurrency Level:      100
Time taken for tests:   0.230 seconds               Time taken for tests:   0.427 seconds
Complete requests:      1000                        Complete requests:      1000
Failed requests:        0                           Failed requests:        0
Write errors:           0                           Write errors:           0
Total transferred:      75075 bytes                 Total transferred:      171864 bytes
HTML transferred:       11011 bytes                 HTML transferred:       12276 bytes
Requests per second:    4340.26 [#/sec] (mean)      Requests per second:    2344.36 [#/sec] (mean)
Time per request:       23.040 [ms] (mean)          Time per request:       42.656 [ms] (mean)
Time per request:       0.230 [ms]                  Time per request:       0.427 [ms]
Transfer rate:          318.21 [Kbytes/sec]         Transfer rate:          393.47 [Kbytes/sec]


           node.js                                             Tornado

Recommended for you

Node.js
Node.jsNode.js
Node.js

Node.js is an asynchronous and event-driven JavaScript runtime built on Google's V8 engine. It allows building scalable network applications easily and uses an event loop model with a single thread to handle non-blocking I/O. Asynchronous I/O is used to avoid blocking operations and keep the single thread available. Node.js has a large module ecosystem and is commonly used for real-time web applications and scalable backend services.

Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven Programming

This document discusses server-side event-driven programming using Node.js. It covers how Node.js uses an event loop and asynchronous non-blocking I/O to handle many connections concurrently with high performance. Common Node.js concepts are explained like first-class functions, callbacks, and event emitters. Node.js is compared to traditional threaded programming and shown to have advantages in scalability and efficiency. Example Node.js applications and APIs are provided.

node.jsapachescalability
NodeJS
NodeJSNodeJS
NodeJS

Matthew Eernisse gave a presentation on NodeJS at the Toster Conference in 2011. He introduced NodeJS as an evented I/O platform using JavaScript and V8 that is well suited for lightweight networked applications. He demonstrated a simple HTTP server in NodeJS and discussed how Yammer uses NodeJS for proxies, file uploads, testing, and real-time collaborative editing. Key aspects of NodeJS include asynchronous non-blocking I/O, event-driven programming, and its suitability for data streaming and real-time applications.

tosternodejs
CoffeScript
      •     A Ruby inspired language that compiles to JavaScript
             CoffeScript                                                         JavaScript
  square: x => x * x.                                         var cube, square;
  cube:   x => square(x) * x.                                 square = function(x) {
                                                                return x * x
                                                              }
                                                              cube = function(x) {
                                                                return square(x) * x
                                                              }


sys = require('sys')                                          var sys = require('sys'),
http = require('http')                                        http = require('http')

http.createServer( req, res =>                                http.createServer(function (req, res) {
    setTimeout( =>                                            	 setTimeout(function () {
        res.sendHeader(200, {'Content-Type': 'text/plain'})   	 	      res.sendHeader(200, {'Content-Type': 'text/plain'})
        res.sendBody('Hello World')                           	 	      res.sendBody('Hello World')
        res.finish()., 2000).                                 	 	      res.finish()
).listen(8000)                                                	 }, 2000)
                                                              }).listen(8000)




                 JavaScript: The platform of the future?
References
•   Official page of node.js: http://nodejs.org/

•   Official page of V8: http://code.google.com/p/v8/

•   CoffeScript: http://jashkenas.github.com/coffee-script/

•   Websockets spec: http://dev.w3.org/html5/websockets/

•   node.websocket.js: http://github.com/guille/node.websocket.js/

•   Tornado: http://www.tornadoweb.org/

•   JBoss Netty: http://jboss.org/netty

•   erlycomet: http://code.google.com/p/erlycomet/
PS: Plurk API
•   Plurk API is now available:
    http://www.plurk.com/API

•   Python, Ruby, PHP and Java implementations are under
    development

•   Use it to build cool applications :-)
Questions?

•   These slides will be posted to:
    www.amix.dk (my blog)


•   You can private plurk me on Plurk:
    http://www.plurk.com/amix

Recommended for you

All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express

Get on board the NodeJS Express as we take a journey through what makes NodeJS special. Server-side JavaScript that has an event loop for a heart, we'll delve into its single threaded nature and the advantages provided. From there we'll pass through the land of the Node Package Management tool, how to set up your own package and bring in useful 3rd party packages as dependencies. Our final destination is ExpressJS, a Sinatra inspired framework for NodeJS.

nodejsnpmexpress
Nodejs intro
Nodejs introNodejs intro
Nodejs intro

JavaScript was created in 1995 and became a standard in 1997. Node.js was created in 2009 using Google's V8 JavaScript engine, allowing JavaScript to be used for server-side applications. Node.js is well-suited for building scalable web servers, APIs, and real-time applications due to its asynchronous, non-blocking architecture that uses callbacks and an event loop. Modules are used to add functionality to Node.js applications, and can be installed via the NPM package manager.

Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014

Reverse Ajax, also known as Comet, allows a server to push data to a client without the client explicitly requesting it. This is achieved through techniques like long polling where the client opens a persistent connection to the server to receive messages as they happen. Common libraries that implement Reverse Ajax include CometD, Atmosphere, and DWR, with CometD being a preferred option as it supports websockets and offers full client/server functionality.

dwrcometreverse ajax

More Related Content

What's hot

Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
Erik van Appeldoorn
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
Felix Geisendörfer
 
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
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
Chris Cowan
 
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
David Padbury
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
Jeetendra singh
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
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
Christian Joudrey
 
Building servers with Node.js
Building servers with Node.jsBuilding servers with Node.js
Building servers with Node.js
ConFoo
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
Marcus Frödin
 
Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?
Christian Joudrey
 
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
fakedarren
 
Express node js
Express node jsExpress node js
Express node js
Yashprit Singh
 
Node ppt
Node pptNode ppt
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
jguerrero999
 
Node.js
Node.jsNode.js
Node.js
Jan Dillmann
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven Programming
Kamal Hussain
 
NodeJS
NodeJSNodeJS
NodeJS
.toster
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
David Boyer
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
Ndjido Ardo BAR
 

What's hot (20)

Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
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
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
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
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
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
 
Building servers with Node.js
Building servers with Node.jsBuilding servers with Node.js
Building servers with Node.js
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?
 
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
 
Express node js
Express node jsExpress node js
Express node js
 
Node ppt
Node pptNode ppt
Node ppt
 
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
 
Node.js
Node.jsNode.js
Node.js
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven Programming
 
NodeJS
NodeJSNodeJS
NodeJS
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 

Viewers also liked

Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014
Nenad Pecanac
 
Safari Push Notification
Safari Push NotificationSafari Push Notification
Safari Push Notification
Satyajit Dey
 
Time for Comet?
Time for Comet?Time for Comet?
Time for Comet?
Simon Willison
 
Node.js Core State of the Union- James Snell
Node.js Core State of the Union- James SnellNode.js Core State of the Union- James Snell
Node.js Core State of the Union- James Snell
NodejsFoundation
 
State of the CLI- Kat Marchan
State of the CLI- Kat MarchanState of the CLI- Kat Marchan
State of the CLI- Kat Marchan
NodejsFoundation
 
Hitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, Bustle
Hitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, BustleHitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, Bustle
Hitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, Bustle
NodejsFoundation
 
Take Data Validation Seriously - Paul Milham, WildWorks
Take Data Validation Seriously - Paul Milham, WildWorksTake Data Validation Seriously - Paul Milham, WildWorks
Take Data Validation Seriously - Paul Milham, WildWorks
NodejsFoundation
 
Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0
Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0
Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0
NodejsFoundation
 
Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...
Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...
Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...
NodejsFoundation
 
Developing Nirvana - Corey A. Butler, Author.io
Developing Nirvana - Corey A. Butler, Author.ioDeveloping Nirvana - Corey A. Butler, Author.io
Developing Nirvana - Corey A. Butler, Author.io
NodejsFoundation
 
From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...
From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...
From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...
NodejsFoundation
 
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
NodejsFoundation
 
Node's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBMNode's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBM
NodejsFoundation
 
Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...
Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...
Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...
NodejsFoundation
 
Math in V8 is Broken and How We Can Fix It - Athan Reines, Fourier
Math in V8 is Broken and How We Can Fix It - Athan Reines, FourierMath in V8 is Broken and How We Can Fix It - Athan Reines, Fourier
Math in V8 is Broken and How We Can Fix It - Athan Reines, Fourier
NodejsFoundation
 
Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -
Takashi Toyoshima
 
IBM MQ v8 and JMS 2.0
IBM MQ v8 and JMS 2.0IBM MQ v8 and JMS 2.0
IBM MQ v8 and JMS 2.0
Matthew White
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
 
Nodifying the Enterprise - Prince Soni, TO THE NEW
Nodifying the Enterprise - Prince Soni, TO THE NEWNodifying the Enterprise - Prince Soni, TO THE NEW
Nodifying the Enterprise - Prince Soni, TO THE NEW
NodejsFoundation
 
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon UniversityText Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
NodejsFoundation
 

Viewers also liked (20)

Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014
 
Safari Push Notification
Safari Push NotificationSafari Push Notification
Safari Push Notification
 
Time for Comet?
Time for Comet?Time for Comet?
Time for Comet?
 
Node.js Core State of the Union- James Snell
Node.js Core State of the Union- James SnellNode.js Core State of the Union- James Snell
Node.js Core State of the Union- James Snell
 
State of the CLI- Kat Marchan
State of the CLI- Kat MarchanState of the CLI- Kat Marchan
State of the CLI- Kat Marchan
 
Hitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, Bustle
Hitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, BustleHitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, Bustle
Hitchhiker's Guide to"'Serverless" Javascript - Steven Faulkner, Bustle
 
Take Data Validation Seriously - Paul Milham, WildWorks
Take Data Validation Seriously - Paul Milham, WildWorksTake Data Validation Seriously - Paul Milham, WildWorks
Take Data Validation Seriously - Paul Milham, WildWorks
 
Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0
Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0
Real-Life Node.js Troubleshooting - Damian Schenkelman, Auth0
 
Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...
Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...
Multimodal Interactions & JS: The What, The Why and The How - Diego Paez, Des...
 
Developing Nirvana - Corey A. Butler, Author.io
Developing Nirvana - Corey A. Butler, Author.ioDeveloping Nirvana - Corey A. Butler, Author.io
Developing Nirvana - Corey A. Butler, Author.io
 
From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...
From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...
From Pterodactyls and Cactus to Artificial Intelligence - Ivan Seidel Gomes, ...
 
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
 
Node's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBMNode's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBM
 
Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...
Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...
Real-Time Machine Learning with Node.js - Philipp Burckhardt, Carnegie Mellon...
 
Math in V8 is Broken and How We Can Fix It - Athan Reines, Fourier
Math in V8 is Broken and How We Can Fix It - Athan Reines, FourierMath in V8 is Broken and How We Can Fix It - Athan Reines, Fourier
Math in V8 is Broken and How We Can Fix It - Athan Reines, Fourier
 
Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -
 
IBM MQ v8 and JMS 2.0
IBM MQ v8 and JMS 2.0IBM MQ v8 and JMS 2.0
IBM MQ v8 and JMS 2.0
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
 
Nodifying the Enterprise - Prince Soni, TO THE NEW
Nodifying the Enterprise - Prince Soni, TO THE NEWNodifying the Enterprise - Prince Soni, TO THE NEW
Nodifying the Enterprise - Prince Soni, TO THE NEW
 
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon UniversityText Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
 

Similar to Comet with node.js and V8

soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
soft-shake.ch
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
Ricardo Silva
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin Shanghai
Jackson Tian
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.js
guileen
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
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
Aarti Parikh
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
Van-Duyet Le
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
Yoann Gotthilf
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
Mike Brevoort
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
Mohammad Qureshi
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
Edureka!
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
uzquiano
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs Nodejs
Chris Bailey
 
NodeJS
NodeJSNodeJS
NodeJS
Alok Guha
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
Stuart (Pid) Williams
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
JAXLondon_Conference
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
hamzadamani7
 

Similar to Comet with node.js and V8 (20)

soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin Shanghai
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.js
 
Node azure
Node azureNode azure
Node azure
 
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
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs Nodejs
 
NodeJS
NodeJSNodeJS
NodeJS
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
 

Recently uploaded

Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 

Recently uploaded (20)

Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 

Comet with node.js and V8

  • 1. Comet with node.js and V8 by amix
  • 2. About me • Cofounder and lead developer of Plurk.com Coded most of the frontend and backend • Mostly code in Python and JavaScript But I am proficient in other languages as well (C, Java, Lisp, Lua etc.) • I have coded since I was 12 24 years old now and still love to program :-) • Not a node.js expert... But I find it very interesting
  • 3. Overview of the talk • Why JavaScript matters • What makes V8 VM special • node.js in some details • Characteristics of comet communication • Implementing comet using node.js and WebSockets • Perspective: JavaScript as the future platform
  • 4. Why JavaScript matters • The pool of JavaScript programmers is huge and it’s getting bigger • JavaScript’sbrowsers that support it and allthe mobile think of all the distribution is among the largest platforms that support it or will support it... Think of Flash • Big companies like Adobe, Google, Apple and Microsoft are spending tons of $ in improving JavaScript • JavaScript is likely to become one of the most popular languages • JavaScript is gaining ground on the backend
  • 5. What makes V8 special • V8 JavaScript VM is used in Google Chrome and is developed by a small Google team in Denmark. V8 is open-source • V8 team is led by Lars Bak, one of the leading VM engineers in the world with 20 years of experience in building VMs • Lars Bak was the technical lead behind HotSpot (Sun’s Java VM). HotSpot improved Java’s performance 20x times • Before HotSpot Lars Bak worked on a Smalltalk VM
  • 6. What makes V8 special • No JIT, all JavaScript is compiled to assembler • Hidden classes optimization properties, instead it V8 does not dynamically lookup access from Self uses hidden classes that are created behind the scene • Improved garbage collector garbage collector stop-the-world, generational, accurate, • V8 is independent of Google Chrome • Remarks / “limitations”: threads, no processes No bytecode language, no
  • 7. What is node.js? • A system built on top of V8 • Introduces: IO - non-blocking - ability to do system calls - HTTP libraries - module system (+ other things) • The non-blocking nature makes node.js a good fit for comet and next generation realtime web-applications • 8000 lines of C/C++, 2000 lines of Javascript, 14 contributors
  • 8. Advantages of non-blocking • nginx: non-blocking apache: threaded • non-blocking can handle more req. pr. sec and uses a lot less memory • comet does not scale at all for threaded servers... graph source: http://blog.webfaction.com/a-little-holiday-present
  • 9. Major point JavaScript programming is already geared towards event based programming: • Events in browsers.... • Closures (anonymous functions) are natural part of the language document.addEventListener("click", function(event) { alert(event) }, false)
  • 10. Hello world using node.js var  sys  =  require('sys'),          http  =  require('http') http.createServer(function  (req,  res)  {   setTimeout(function  ()  {     res.sendHeader(200,  {'Content-­‐Type':  'text/plain'})     res.sendBody('Hello  World')     res.finish()   },  2000) }).listen(8000) sys.puts('Server  running  at  http://127.0.0.1:8000/') hello_world.js
  • 11. Blocking vs. non-blocking The way to do it The way to do in most other it in node.js! languages: puts("Enter your name: ") gets(function (name) { puts("Name: " + name) puts("Enter your name: ") }) var name = gets() puts("Name: " + name) node.js design philosophy: To receive data from disk, network or another process there must be a callback.
  • 12. Events in node.js • All objects which emit events are are instances of process.EventEmitter • A promise is a EventEmitter which emits either success or error, but not both var tcp = require("tcp") var stat = require("posix").stat, puts = require("sys").puts var s = tcp.createServer() var promise = stat("/etc/passwd") s.addListener("connection", promise.addCallback(function (s) { function (c) { puts("modified: " + s.mtime) c.send("hello nasty!") }) c.close() promise.addErrback(function(orgi_promise) { }) puts("Could not fetch stats on /etc/passwd") s.listen(8000) })
  • 13. Comet vs. Ajax Ajax is so yesterday... Comet is the new superhero on the block Comet can be used to create real time web-applications Examples include Plurk and Google Wave. Demo of Plurk real time messaging
  • 14. Ajax vs. Comet Ajax Comet (long poll) Comet (streaming) Browser Server Browser Server Browser Server request request request response x seconds event response response request event event request response response event How most do it today How some do it today How we will do it soon
  • 15. Major point • Comet servers need to have a lot of open connections • One thread pr. connection does not scale • The solution is to use event based servers • It’s only possible to create event based servers in node.js!
  • 16. Implementing comet • Long polling parts. Used in Plurk - works for most - is more expensive and problematic than streaming • Streaming withoutto proxies and firewalls - Very problematic due WebSockets: • Streaming with WebSockets (HTML5):side - Makes comet trivial on both client and server • In this presentation we will focus on the future: Building a chat application with WebSockets and node.js
  • 17. WebSockets • Aims to expose TCP/IP sockets to browsers, while respecting the constraints of the web (security, proxies and firewalls) • A thin layer on top of TCP/IP that adds: • origin based security model • Addressing and protocol naming mechanism for supporting multiple services on one port and multiple host names on one IP address • framing mechanism for data transporation • More information: http://dev.w3.org/html5/websockets/ • Currently implemented in Google Chrome
  • 18. node.websocket.js implementation demo var  sys  =  require('sys') Room = {    members  =  [] init: function() { Room.ws = new WebSocket('ws://127.0.0.1:8080/chat') var  Module  =  this.Module  =  function()  {  } Room.ws.onopen = Room._onopen Room.ws.onmessage = Room._onmessage Module.prototype.onData  =  function(data,  connection)  { Room.ws.onclose = Room._onclose   for(var  i  in  members) }, //...     members[i].send(data) _send: function(user, message){ }; Room.ws.send(serializeJSON({ 'from': user, Module.prototype.onConnect  =  function(connection)  { 'message': message   members.push(connection) })) } }, _onmessage: function(m) { Module.prototype.onDisconnect  =  function(connection)  { if (m.data) {   for(var  i  in  members)  { var data = evalTxt(m.data)     if(members[i]  ==  connection)  {       members.splice(i,  1) from = data.from       break; message = data.message     } //...   } } Note: I have patched node.websocket.js to include onConnect...
  • 19. Other comet servers • JBoss Netty: Java library for doing non- blocking networking, based on java.nio used by Plurk to handle 200.000+ open connections • erlycomet: Erlang comet server based on MochiWeb • Tornado: FriendFeed’s Python non- blocking server • I have tried most of the popular approaches and none of them feel as natural as node.js!
  • 20. How does node.js perfrom? • Hello World benchmark node.js vs. Tornado non scientific - take it with a grain of salt! • Tornado is one of the fastest Python based servers $ ab -c 100 -n 1000 http://127.0.0.1:8000/ $ ab -c 100 -n 1000 http://127.0.0.1:8000/ Concurrency Level: 100 Concurrency Level: 100 Time taken for tests: 0.230 seconds Time taken for tests: 0.427 seconds Complete requests: 1000 Complete requests: 1000 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Total transferred: 75075 bytes Total transferred: 171864 bytes HTML transferred: 11011 bytes HTML transferred: 12276 bytes Requests per second: 4340.26 [#/sec] (mean) Requests per second: 2344.36 [#/sec] (mean) Time per request: 23.040 [ms] (mean) Time per request: 42.656 [ms] (mean) Time per request: 0.230 [ms] Time per request: 0.427 [ms] Transfer rate: 318.21 [Kbytes/sec] Transfer rate: 393.47 [Kbytes/sec] node.js Tornado
  • 21. CoffeScript • A Ruby inspired language that compiles to JavaScript CoffeScript JavaScript square: x => x * x. var cube, square; cube: x => square(x) * x. square = function(x) { return x * x } cube = function(x) { return square(x) * x } sys = require('sys') var sys = require('sys'), http = require('http') http = require('http') http.createServer( req, res => http.createServer(function (req, res) { setTimeout( => setTimeout(function () { res.sendHeader(200, {'Content-Type': 'text/plain'}) res.sendHeader(200, {'Content-Type': 'text/plain'}) res.sendBody('Hello World') res.sendBody('Hello World') res.finish()., 2000). res.finish() ).listen(8000) }, 2000) }).listen(8000) JavaScript: The platform of the future?
  • 22. References • Official page of node.js: http://nodejs.org/ • Official page of V8: http://code.google.com/p/v8/ • CoffeScript: http://jashkenas.github.com/coffee-script/ • Websockets spec: http://dev.w3.org/html5/websockets/ • node.websocket.js: http://github.com/guille/node.websocket.js/ • Tornado: http://www.tornadoweb.org/ • JBoss Netty: http://jboss.org/netty • erlycomet: http://code.google.com/p/erlycomet/
  • 23. PS: Plurk API • Plurk API is now available: http://www.plurk.com/API • Python, Ruby, PHP and Java implementations are under development • Use it to build cool applications :-)
  • 24. Questions? • These slides will be posted to: www.amix.dk (my blog) • You can private plurk me on Plurk: http://www.plurk.com/amix