Your SlideShare is downloading. ×
0
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Introduction to Node js
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to Node js

1,779

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,779
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction to Node.JSPragnesh Vaghela | @technologythree | technologythree.com
  • 2. Problemwhat’s a really common thing to do in a web application?Database access, of course. Too bad database I/O is one of theslowest things a web app has to deal with data = readFromDatabase(); printData(data); doSomethingUnrelated(); asynchronous JavaScript: readFromDatabase(function(data) { printData(data); }) doSomethingUnrelated(); @ 2013 Technology Three 2
  • 3. NODE.JS1. platform built on Chromes JavaScript runtime for easily building fast, scalable network applications2. perfect for data-intensive real-time applications that run across distributed devices @ 2013 Technology Three 3
  • 4. NODE.JS1. server-side JavaScript framework - the same type of code that powers awesome Ajax applications like Gmail will now power its servers, too2. driven by asynchronous design - that it doesn’t have to wait for slow file I/O or database operations to continue processing, which makes it really damn fast. It also means that it can handle millions of concurrent connections at once3. real-time applications - you do not have to bother with low-level sockets and protocols @ 2013 Technology Three 4
  • 5. Bad Use Cases1. apps that are very heavy on CPU usage, and very light on actual I/O - video encoding software, artificial intelligence or similar CPU hungry software2. simple CRUD / HTML apps @ 2013 Technology Three 5
  • 6. Good Use Cases• JSON APIs building light-weight REST / JSON apis is something where node.js really shines. Its non-blocking I/O model combined with JavaScript make it a great choice for wrapping other data sources such as databases or web services and exposing them via a JSON interface• Single page Apps if you are planning to write an AJAX heavy single page app (think gmail), node.js is a great fit as well. The ability to process many requests / seconds with low response times, as well as sharing things like validation code between the client and server make it a great choice for modern web applications that do lots of processing on the client @ 2013 Technology Three 6
  • 7. Good Use Cases• Streaming data one great example is parsing file uploads in real time, as well as building proxies between different data layers• Soft Realtime Applications easy to develop soft real time systems like twitter, chat software, sport bets or interfaces to instant messaging networks @ 2013 Technology Three 7
  • 8. Example Web Servervar http = require(http);http.createServer(function (request, response) { response.writeHead(200, {Content-Type: text/plain}); response.end(Hello Worldn);}).listen(8124);console.log(Server running at http://127.0.0.1:8124/);To run the server, put the code into a file called example.js andexecute it with the node program:> node example.jsServer running at http://127.0.0.1:8124/ @ 2013 Technology Three 8
  • 9. Real world Node.JS Applications @ 2013 Technology Three 9
  • 10. NODE.JS in the industry1. CBS, Linkedin use Node.js for mobile2. Walmart’s Node-powered mobile app front-end code gets executed on the back end3. Yahoo has released some things for Node, and supports cocktails - a Node.js platform. It also uses Node.js in the livestand infrastructure4. Mozilla has implemented Node.js to support browser APIs which has half a billion installs5. Pinterest uses Node as a webserver in some instances6. Ebay hosts their HTTP API service with Node7. HP uses Node for their WebOS initiatives @ 2013 Technology Three 10
  • 11. Thank YouPragnesh Vaghela | @technologythree | technologythree.com

×