node.js
DESCRIPTION
Node.js Presentation talks about its overview, how it works, some great examples and comparison with other technologies like SignalR.TRANSCRIPT
Node JsA platform for scalable network applications...
By M. Riyaz
Topics Introduction.
What is Node Js?
Why Node Js?
Begin with node js.
Node Js vs SignalR.
Making Believable.
Tough Part.
Introduction
Node.js is a platform built on Chrome's JavaScript runtime for
easily building fast, scalable network applications. Node.js uses an
event-driven, non-blocking I/O model that makes it lightweight
and efficient, perfect for data-intensive real-time applications that
run across distributed devices.
Thanks
What is Node Js?
Node.js is server side program that is based on v8 JavaScript
engine.
Node.js is designed to write scalable Internet applications.
Node.js programs are written in server side JavaScript.
Node JS contains a built-in http server. This http server can be
control using server side JavaScript.
Using this can develop simple client-server based web application also.
Introduction : How its work?
On Special Demand : If the fast food joint followed a traditional thread-based model, you'd order your food and wait in line until you received it. The person behind you wouldn't be able to order until your order was done. In an event-driven model, you order your food and then get out of line to wait. Everyone else is then free to order.
Why Node Js?
Node.js is well suited for applications that have a lot of concurrent
connections and each request only needs very few CPU cycles, because the
event loop (with all the other clients) is blocked during execution of a function.
If server side application code requires very less cpu cycle. In other world
application are doing non blocking operation and does not have heavy
algorithm or Job which consumes lots of CPU cycle. then you can use Node Js.
If you are Java Script programmer and comfortable in writing Single
Threaded code just like client side JS.
Node JS can be use to serve client site scripts as css,javascript,images etc.
Using this web server load will be reduce hence get high performance
application.
Begin with Node Js?
var http = require("http"); //Modules (already build libraries)
http.createServer(function(request, response) {
response.writeHeader(200, {"Content-Type": "text/plain"});
response.write("Hello Team from Node.Js!!! Now believed, He can…");
response.end();
}).listen(7777); //It can be anything. But shouldn’t be already on IIS
//Make a call for define port using localhost in your web browser.
Browser > localhost:7777
Node js vs SignalR
Node Js (*) This is a server side software
system. Programs are written on the
server side in JS. This is a packaged compilation of
G. v8 engine, core lib written in JS Using Modules & JS. Need to write code for specific
call. Supported OS : Mac, Linux,
Solaris, Windows*
SignalR (Microsoft) This is a server side software
system. Programs are written on the
server side in C#. SignalR is a library for Asp. Net
(auto. best transport given the clients )
Using Hub & Persistent Conn. Provide hooks for connected.
Supported OS : Cool
Making Believable
1. Bottom Level (Fresher’s program )
2. Middle Level (Push type notification)
3. Top Level (Live video streaming with mobile cam)
Thank you!