SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
Building real-time apps
                  with node.js, socket.io
                      and knockout.js
                                 Betabeers Zaragoza, 09/03/2012


                    Iván Loire
                    twitter: @ivanloire
                    email: ivan@iloire.com


Monday, March 12, 2012
you want real-time apps?

         get the fastest tools!




Monday, March 12, 2012
node.js


            high performance javascript library for intensive I/O
            operations. (like HTTP)
            single threaded, event oriented.
            built on Chrome’s Javascript runtime (V8)
            lightweight, efficient, really fast.
            .. insanely fast.

Monday, March 12, 2012
websockets
              bi-directional, full duplex over a single tcp socket.
              connection remains open = no tcp handshake
              lightweight protocol = no http headers, 2 byte
              overhead
              supported chrome 16, FF 11, IE 10, Opera 10
              reducing latency from 150 (http) to 50 ms (sockets)




Monday, March 12, 2012
socket.io
              websockets for the rest of us.
              fallback transports (yes, it also works in IE!!)
                    websockets
                    flash sockets
                    ajax long polling
                    ajax streaming
                    iframe
                    json polling..

Monday, March 12, 2012
knockout.js

              rich, responsive display with a clean underlying data
              model.
                    declarative bindinds
                    automatic UI refresh
                    dependency tracking
                    templating


Monday, March 12, 2012
... and a fast database!


              open source, high performance, in-memory, key-value
              data store
              support master-slave replication
              really fast!
              if durability is not needed... insanely fast!


Monday, March 12, 2012
real-time web apps




          node.js + redis + socket.io + knockout.js
                         real-time... or close enough?




Monday, March 12, 2012
let’s build a really simple real-time game...

        code: https://github.com/iloire/math-race
        demo: http://letsnode.com:8090/

        thanks to @gimenete for getting me into node.js!
        ... and thanks to @jmendiara for the node.js sticker!


        Thanks!
        Iván Loire (twitter: @ivanloire)




Monday, March 12, 2012

Weitere ähnliche Inhalte

Ähnlich wie Building real time apps with node.js, socket.io, knockout.js

Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...Ivan Loire
 
Thin Server Architecture
Thin Server ArchitectureThin Server Architecture
Thin Server ArchitectureMitch Pirtle
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS drupalcampest
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.jsRichard Rodger
 
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of DevicesJoshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of DevicesFrancois Daoust
 
Ajax for-coldfusion-developers
Ajax for-coldfusion-developersAjax for-coldfusion-developers
Ajax for-coldfusion-developersSudhakar Ganta
 
One Page, One App -or- How to Write a Crawlable Single Page Web App
One Page, One App -or- How to Write a Crawlable Single Page Web AppOne Page, One App -or- How to Write a Crawlable Single Page Web App
One Page, One App -or- How to Write a Crawlable Single Page Web Apptechnicolorenvy
 
Building with JavaScript - write less by using the right tools
Building with JavaScript -  write less by using the right toolsBuilding with JavaScript -  write less by using the right tools
Building with JavaScript - write less by using the right toolsChristian Heilmann
 
Bringing The Sexy Back To WebWorkers
Bringing The Sexy Back To WebWorkersBringing The Sexy Back To WebWorkers
Bringing The Sexy Back To WebWorkersCorey Clark, Ph.D.
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
Desktop Apps in a Javascript World - Electron
Desktop Apps in a Javascript World - ElectronDesktop Apps in a Javascript World - Electron
Desktop Apps in a Javascript World - ElectronMarc MacLeod
 
Droidcon event 2015 Bangalore
Droidcon event 2015 BangaloreDroidcon event 2015 Bangalore
Droidcon event 2015 BangaloreNitesh Verma
 
MunichJS - 2011-04-06
MunichJS - 2011-04-06MunichJS - 2011-04-06
MunichJS - 2011-04-06Mike West
 
LA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented ArchitectureLA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented ArchitectureDan Yoder
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Studyhousecor
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationAppnovation Technologies
 

Ähnlich wie Building real time apps with node.js, socket.io, knockout.js (20)

Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
 
Thin Server Architecture
Thin Server ArchitectureThin Server Architecture
Thin Server Architecture
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.js
 
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of DevicesJoshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of Devices
 
Ajax for-coldfusion-developers
Ajax for-coldfusion-developersAjax for-coldfusion-developers
Ajax for-coldfusion-developers
 
One Page, One App -or- How to Write a Crawlable Single Page Web App
One Page, One App -or- How to Write a Crawlable Single Page Web AppOne Page, One App -or- How to Write a Crawlable Single Page Web App
One Page, One App -or- How to Write a Crawlable Single Page Web App
 
Building with JavaScript - write less by using the right tools
Building with JavaScript -  write less by using the right toolsBuilding with JavaScript -  write less by using the right tools
Building with JavaScript - write less by using the right tools
 
Node.JS briefly introduced
Node.JS briefly introducedNode.JS briefly introduced
Node.JS briefly introduced
 
Nodejs + Rails
Nodejs + RailsNodejs + Rails
Nodejs + Rails
 
Bringing The Sexy Back To WebWorkers
Bringing The Sexy Back To WebWorkersBringing The Sexy Back To WebWorkers
Bringing The Sexy Back To WebWorkers
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Desktop Apps in a Javascript World - Electron
Desktop Apps in a Javascript World - ElectronDesktop Apps in a Javascript World - Electron
Desktop Apps in a Javascript World - Electron
 
Droidcon event 2015 Bangalore
Droidcon event 2015 BangaloreDroidcon event 2015 Bangalore
Droidcon event 2015 Bangalore
 
MunichJS - 2011-04-06
MunichJS - 2011-04-06MunichJS - 2011-04-06
MunichJS - 2011-04-06
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
LA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented ArchitectureLA RubyConf 2009 Waves And Resource-Oriented Architecture
LA RubyConf 2009 Waves And Resource-Oriented Architecture
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Study
 
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet ApplicationDrupal + HTML5 + CSS3 + JS = Rich Internet Application
Drupal + HTML5 + CSS3 + JS = Rich Internet Application
 

Mehr von betabeers

IONIC, el framework para crear aplicaciones híbridas multiplataforma
IONIC, el framework para crear aplicaciones híbridas multiplataformaIONIC, el framework para crear aplicaciones híbridas multiplataforma
IONIC, el framework para crear aplicaciones híbridas multiplataformabetabeers
 
Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)
Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)
Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)betabeers
 
Blockchain: la revolución industrial de internet - Oscar Lage
Blockchain: la revolución industrial de internet - Oscar LageBlockchain: la revolución industrial de internet - Oscar Lage
Blockchain: la revolución industrial de internet - Oscar Lagebetabeers
 
Cloud Learning: la formación del siglo XXI - Mónica Mediavilla
Cloud Learning: la formación del siglo XXI - Mónica MediavillaCloud Learning: la formación del siglo XXI - Mónica Mediavilla
Cloud Learning: la formación del siglo XXI - Mónica Mediavillabetabeers
 
Desarrollo web en Nodejs con Pillars por Chelo Quilón
Desarrollo web en Nodejs con Pillars por Chelo QuilónDesarrollo web en Nodejs con Pillars por Chelo Quilón
Desarrollo web en Nodejs con Pillars por Chelo Quilónbetabeers
 
La línea recta hacia el éxito - Jon Torrado - Betabeers Bilbao
La línea recta hacia el éxito -  Jon Torrado - Betabeers BilbaoLa línea recta hacia el éxito -  Jon Torrado - Betabeers Bilbao
La línea recta hacia el éxito - Jon Torrado - Betabeers Bilbaobetabeers
 
6 errores a evitar si eres una startup móvil y quieres evolucionar tu app
6 errores a evitar si eres una startup móvil y quieres evolucionar tu app6 errores a evitar si eres una startup móvil y quieres evolucionar tu app
6 errores a evitar si eres una startup móvil y quieres evolucionar tu appbetabeers
 
Dev ops.continuous delivery - Ibon Landa (Plain Concepts)
Dev ops.continuous delivery - Ibon Landa (Plain Concepts)Dev ops.continuous delivery - Ibon Landa (Plain Concepts)
Dev ops.continuous delivery - Ibon Landa (Plain Concepts)betabeers
 
Introducción a scrum - Rodrigo Corral (Plain Concepts)
Introducción a scrum - Rodrigo Corral (Plain Concepts)Introducción a scrum - Rodrigo Corral (Plain Concepts)
Introducción a scrum - Rodrigo Corral (Plain Concepts)betabeers
 
Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)
Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)
Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)betabeers
 
Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)
Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)
Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)betabeers
 
Elemental, querido Watson - Caso de Uso
Elemental, querido Watson - Caso de UsoElemental, querido Watson - Caso de Uso
Elemental, querido Watson - Caso de Usobetabeers
 
Seguridad en tu startup
Seguridad en tu startupSeguridad en tu startup
Seguridad en tu startupbetabeers
 
Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.
Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.
Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.betabeers
 
Buenas prácticas para la optimización web
Buenas prácticas para la optimización webBuenas prácticas para la optimización web
Buenas prácticas para la optimización webbetabeers
 
La magia de Scrum
La magia de ScrumLa magia de Scrum
La magia de Scrumbetabeers
 
Programador++ por @wottam
Programador++ por @wottamProgramador++ por @wottam
Programador++ por @wottambetabeers
 
RaspberryPi: Tu dispositivo para IoT
RaspberryPi: Tu dispositivo para IoTRaspberryPi: Tu dispositivo para IoT
RaspberryPi: Tu dispositivo para IoTbetabeers
 
Introducción al Big Data - Xabier Tranche - VIII Betabeers Bilbao 27/02/2015
 Introducción al Big Data - Xabier Tranche  - VIII Betabeers Bilbao 27/02/2015 Introducción al Big Data - Xabier Tranche  - VIII Betabeers Bilbao 27/02/2015
Introducción al Big Data - Xabier Tranche - VIII Betabeers Bilbao 27/02/2015betabeers
 
PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015
PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015
PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015betabeers
 

Mehr von betabeers (20)

IONIC, el framework para crear aplicaciones híbridas multiplataforma
IONIC, el framework para crear aplicaciones híbridas multiplataformaIONIC, el framework para crear aplicaciones híbridas multiplataforma
IONIC, el framework para crear aplicaciones híbridas multiplataforma
 
Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)
Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)
Servicios de Gestión de Datos en la Nube - Jaime Balañá (NetApp)
 
Blockchain: la revolución industrial de internet - Oscar Lage
Blockchain: la revolución industrial de internet - Oscar LageBlockchain: la revolución industrial de internet - Oscar Lage
Blockchain: la revolución industrial de internet - Oscar Lage
 
Cloud Learning: la formación del siglo XXI - Mónica Mediavilla
Cloud Learning: la formación del siglo XXI - Mónica MediavillaCloud Learning: la formación del siglo XXI - Mónica Mediavilla
Cloud Learning: la formación del siglo XXI - Mónica Mediavilla
 
Desarrollo web en Nodejs con Pillars por Chelo Quilón
Desarrollo web en Nodejs con Pillars por Chelo QuilónDesarrollo web en Nodejs con Pillars por Chelo Quilón
Desarrollo web en Nodejs con Pillars por Chelo Quilón
 
La línea recta hacia el éxito - Jon Torrado - Betabeers Bilbao
La línea recta hacia el éxito -  Jon Torrado - Betabeers BilbaoLa línea recta hacia el éxito -  Jon Torrado - Betabeers Bilbao
La línea recta hacia el éxito - Jon Torrado - Betabeers Bilbao
 
6 errores a evitar si eres una startup móvil y quieres evolucionar tu app
6 errores a evitar si eres una startup móvil y quieres evolucionar tu app6 errores a evitar si eres una startup móvil y quieres evolucionar tu app
6 errores a evitar si eres una startup móvil y quieres evolucionar tu app
 
Dev ops.continuous delivery - Ibon Landa (Plain Concepts)
Dev ops.continuous delivery - Ibon Landa (Plain Concepts)Dev ops.continuous delivery - Ibon Landa (Plain Concepts)
Dev ops.continuous delivery - Ibon Landa (Plain Concepts)
 
Introducción a scrum - Rodrigo Corral (Plain Concepts)
Introducción a scrum - Rodrigo Corral (Plain Concepts)Introducción a scrum - Rodrigo Corral (Plain Concepts)
Introducción a scrum - Rodrigo Corral (Plain Concepts)
 
Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)
Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)
Gestión de proyectos y consorcios internacionales - Iñigo Cañadas (GFI)
 
Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)
Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)
Software de gestión Open Source - Odoo - Bakartxo Aristegi (Aizean)
 
Elemental, querido Watson - Caso de Uso
Elemental, querido Watson - Caso de UsoElemental, querido Watson - Caso de Uso
Elemental, querido Watson - Caso de Uso
 
Seguridad en tu startup
Seguridad en tu startupSeguridad en tu startup
Seguridad en tu startup
 
Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.
Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.
Spark Java: Aplicaciones web ligeras y rápidas con Java, por Fran Paredes.
 
Buenas prácticas para la optimización web
Buenas prácticas para la optimización webBuenas prácticas para la optimización web
Buenas prácticas para la optimización web
 
La magia de Scrum
La magia de ScrumLa magia de Scrum
La magia de Scrum
 
Programador++ por @wottam
Programador++ por @wottamProgramador++ por @wottam
Programador++ por @wottam
 
RaspberryPi: Tu dispositivo para IoT
RaspberryPi: Tu dispositivo para IoTRaspberryPi: Tu dispositivo para IoT
RaspberryPi: Tu dispositivo para IoT
 
Introducción al Big Data - Xabier Tranche - VIII Betabeers Bilbao 27/02/2015
 Introducción al Big Data - Xabier Tranche  - VIII Betabeers Bilbao 27/02/2015 Introducción al Big Data - Xabier Tranche  - VIII Betabeers Bilbao 27/02/2015
Introducción al Big Data - Xabier Tranche - VIII Betabeers Bilbao 27/02/2015
 
PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015
PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015
PAYTPV Plataforma Integral de Cobros - VIII Betabeers Bilbao 27/02/2015
 

Building real time apps with node.js, socket.io, knockout.js

  • 1. Building real-time apps with node.js, socket.io and knockout.js Betabeers Zaragoza, 09/03/2012 Iván Loire twitter: @ivanloire email: ivan@iloire.com Monday, March 12, 2012
  • 2. you want real-time apps? get the fastest tools! Monday, March 12, 2012
  • 3. node.js high performance javascript library for intensive I/O operations. (like HTTP) single threaded, event oriented. built on Chrome’s Javascript runtime (V8) lightweight, efficient, really fast. .. insanely fast. Monday, March 12, 2012
  • 4. websockets bi-directional, full duplex over a single tcp socket. connection remains open = no tcp handshake lightweight protocol = no http headers, 2 byte overhead supported chrome 16, FF 11, IE 10, Opera 10 reducing latency from 150 (http) to 50 ms (sockets) Monday, March 12, 2012
  • 5. socket.io websockets for the rest of us. fallback transports (yes, it also works in IE!!) websockets flash sockets ajax long polling ajax streaming iframe json polling.. Monday, March 12, 2012
  • 6. knockout.js rich, responsive display with a clean underlying data model. declarative bindinds automatic UI refresh dependency tracking templating Monday, March 12, 2012
  • 7. ... and a fast database! open source, high performance, in-memory, key-value data store support master-slave replication really fast! if durability is not needed... insanely fast! Monday, March 12, 2012
  • 8. real-time web apps node.js + redis + socket.io + knockout.js real-time... or close enough? Monday, March 12, 2012
  • 9. let’s build a really simple real-time game... code: https://github.com/iloire/math-race demo: http://letsnode.com:8090/ thanks to @gimenete for getting me into node.js! ... and thanks to @jmendiara for the node.js sticker! Thanks! Iván Loire (twitter: @ivanloire) Monday, March 12, 2012