We describe the event-driven concurrency model used by Nodejs, a JavaScript server-side scripting platform. An overview of the traditional thread based approach(used by Apache) is also given. We compare both the approaches. An Introduction to Nodejs programming is provided and some useful packages are discussed.
Rising from non-existence a few short years ago, Node.js is already attracting the accolades and disdain enjoyed and endured by the Ruby and Rails community just a short time ago. It overtook Rails as the most popular Github repository in 2011 and was selected by InfoWorld for the Technology of the Year Award in 2012. This presentation explains the basic theory and programming model central to Node's approach and will help you understand the resulting benefits and challenges it presents. You can also watch this presentation at http://bit.ly/1362UGA
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
Rising from non-existence a few short years ago, Node.js is already attracting the accolades and disdain enjoyed and endured by the Ruby and Rails community just a short time ago. It overtook Rails as the most popular Github repository in 2011 and was selected by InfoWorld for the Technology of the Year Award in 2012. This presentation explains the basic theory and programming model central to Node's approach and will help you understand the resulting benefits and challenges it presents. You can also watch this presentation at http://bit.ly/1362UGA
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
Node.js uses JavaScript - a language known to millions of developers worldwide - thus giving it a much lower learning curve even for complete beginners. Using Node.js you can build simple Command Line programs or complex enterprise level web applications with equal ease. Node.js is an event-driven, server-side, asynchronous development platform with lightning speed execution. Node.js helps you to code the most complex functionalities in just a few lines of code.
Has the traditional intro to event looped servers (thanks Ryan!) with a couple of examples of why I think node.js is particularly exciting today. Code for the demos can be found at https://github.com/davidpadbury/node-intro.
Node.js and How JavaScript is Changing Server Programming Tom Croucher
Node.js is a highly concurrent JavaScript server written on top of the V8 JavaScript runtime. This is awesome for a number of reasons. Firstly Node.js has re-architected some of the core module of V8 to create a server implementation that is non-blocking (similar to other event driven frameworks like Ruby’s Event Machine or Python’s Twisted). Event driven architectures are a natural fit for JavaScript developers because it’s already how the browser works. By using an event driven framework Node is not only intuitive to use but also highly scalable. Tests have shown Node instances running tens of thousands of simultaneous users.
This session will explore the architectural basics of Node.js and how it’s different from blocking server implementations such as PHP, Rail or Java Servlets. We’ll explore some basic examples of creating a simple server, dealing with HTTP requests, etc.
The bigger question is once we have this awesome programming environment, what do we do with it? Node already has a really vibrant collection of modules which provide a range of functionality. Demystifying what’s available is pretty important to actually getting stuff done with Node. Since Node itself is very low level, lot’s of things people expect in web servers aren’t automatically there (for example, request routing). In order to help ease people into using Node this session will look at a range of the best modules for Node.js.
This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
These are the slides from the sold out Philly Tech Week Introduction to NodeJS workshop run by Ross Kukulinski, a product manager at NodeSource.
In this tutorial, we will provide a brief overview of NodeJS, including its strengths and weaknesses, best practices, and package management. After the introduction, attendees will have the remainder of the tutorial to learn NodeJS through hands-on NodeSchool.io exercises with assistance from a team of mentors.
NodeSchool.io is a series of choose-your-own-adventure style workshops that teach people how to use NodeJS, NPM, and other related tools by writing code to solve realistic problems. NodeSchool is entirely community driven and is 100% open source, which means you can take the exercises home and continue to learn!
An introduction to developing with Node.js and some useful tools to help the development and deployment processes. This talk was given at Asyncjs in Brighton
http://asyncjs.com/intro-nodejs
A look at where the market of the Internet of Things is and how technologies like Node.js (JavaScript) and the Intel Edison are making it easier to create connected solutions.
Learn more at https://losant.com.
The major topics include:
* What is the Internet of Things
* Where is IoT Today
* 4 Parts of IoT (Collect, Communicate, Analyze, Act)
* Why JavaScript is Good for IoT
* How Node.js is Making a Dent in the Internet of Things
* What npm Modules are used for Hardware (Johnny-Five, Cylon.js, MRAA)
* What is the Intel Edison
* How to Best Work with the Edison
* Tips for Edison (MRAA, Grove Kit, UPM)
* Where the World of JavaScript and IoT is Going
Node.js uses JavaScript - a language known to millions of developers worldwide - thus giving it a much lower learning curve even for complete beginners. Using Node.js you can build simple Command Line programs or complex enterprise level web applications with equal ease. Node.js is an event-driven, server-side, asynchronous development platform with lightning speed execution. Node.js helps you to code the most complex functionalities in just a few lines of code.
Has the traditional intro to event looped servers (thanks Ryan!) with a couple of examples of why I think node.js is particularly exciting today. Code for the demos can be found at https://github.com/davidpadbury/node-intro.
Node.js and How JavaScript is Changing Server Programming Tom Croucher
Node.js is a highly concurrent JavaScript server written on top of the V8 JavaScript runtime. This is awesome for a number of reasons. Firstly Node.js has re-architected some of the core module of V8 to create a server implementation that is non-blocking (similar to other event driven frameworks like Ruby’s Event Machine or Python’s Twisted). Event driven architectures are a natural fit for JavaScript developers because it’s already how the browser works. By using an event driven framework Node is not only intuitive to use but also highly scalable. Tests have shown Node instances running tens of thousands of simultaneous users.
This session will explore the architectural basics of Node.js and how it’s different from blocking server implementations such as PHP, Rail or Java Servlets. We’ll explore some basic examples of creating a simple server, dealing with HTTP requests, etc.
The bigger question is once we have this awesome programming environment, what do we do with it? Node already has a really vibrant collection of modules which provide a range of functionality. Demystifying what’s available is pretty important to actually getting stuff done with Node. Since Node itself is very low level, lot’s of things people expect in web servers aren’t automatically there (for example, request routing). In order to help ease people into using Node this session will look at a range of the best modules for Node.js.
This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
These are the slides from the sold out Philly Tech Week Introduction to NodeJS workshop run by Ross Kukulinski, a product manager at NodeSource.
In this tutorial, we will provide a brief overview of NodeJS, including its strengths and weaknesses, best practices, and package management. After the introduction, attendees will have the remainder of the tutorial to learn NodeJS through hands-on NodeSchool.io exercises with assistance from a team of mentors.
NodeSchool.io is a series of choose-your-own-adventure style workshops that teach people how to use NodeJS, NPM, and other related tools by writing code to solve realistic problems. NodeSchool is entirely community driven and is 100% open source, which means you can take the exercises home and continue to learn!
An introduction to developing with Node.js and some useful tools to help the development and deployment processes. This talk was given at Asyncjs in Brighton
http://asyncjs.com/intro-nodejs
A look at where the market of the Internet of Things is and how technologies like Node.js (JavaScript) and the Intel Edison are making it easier to create connected solutions.
Learn more at https://losant.com.
The major topics include:
* What is the Internet of Things
* Where is IoT Today
* 4 Parts of IoT (Collect, Communicate, Analyze, Act)
* Why JavaScript is Good for IoT
* How Node.js is Making a Dent in the Internet of Things
* What npm Modules are used for Hardware (Johnny-Five, Cylon.js, MRAA)
* What is the Intel Edison
* How to Best Work with the Edison
* Tips for Edison (MRAA, Grove Kit, UPM)
* Where the World of JavaScript and IoT is Going
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)Chris Richardson
JavaScript used to be confined to the browser. But these days, it becoming increasingly popular in server-side applications in the form of NodeJS. NodeJS provides event-driven, non-blocking I/O model that supposedly makes it easy to build scalable network application. In this talk you will learn about the consequences of combining the event-driven programming model with a prototype-based, weakly typed, dynamic language. We will share our perspective as a server-side Java developer who wasn’t entirely happy about JavaScript in the browser, let alone on the server. You will learn how to use NodeJS effectively in modern, polyglot applications.
NodeJS: the good parts? A skeptic’s view (jax jax2013)Chris Richardson
JavaScript used to be confined to the browser. But these days, it's becoming increasingly popular in server-side applications in the form of Node.js. Node.js provides event-driven, non-blocking I/O model that supposedly makes it easy to build scalable network application. In this talk you will learn about the consequences of combining the event-driven programming model with a prototype-based, weakly typed, dynamic language. We will share our perspective as a server-side Java developer who wasn’t entirely happy about JavaScript in the browser, let alone on the server. You will learn how to use Node.js effectively in modern, polyglot applications.
Watch the video: http://www.youtube.com/watch?v=CN0jTnSROsk&feature=youtu.be
The Node.js Foundation has consolidated all the best thinking around why enterprises should consider Node.js for their systems of engagement in this short presentation.
NodeJS: the good parts? A skeptic’s view (devnexus2014)Chris Richardson
JavaScript used to be confined to the browser. But these days, it becoming increasingly popular in server-side applications in the form of NodeJS. NodeJS provides event-driven, non-blocking I/O model that supposedly makes it easy to build scalable network application.
In this talk you will learn about the consequences of combining the event-driven programming model with a prototype-based, weakly typed, dynamic language. We will share our perspective as a server-side Java developer who wasn’t entirely happy about JavaScript in the browser, let alone on the server. You will learn how to use NodeJS effectively in modern, polyglot applications.
1. Isomorphic JavaScript is the pattern of running JavaScript code on both server & client.
2. People are using it for production today. Ask Facebook, Yahoo, Asana, Airbnb, Rising Stack, …
3. This is not another talk about NodeJS!
Delivering High Performance Websites with NGINXNGINX, Inc.
NGINX Plus is an easy-to-install, proven software solution to deliver your sites and applications through state-of-the-art intelligent load balancing and high performance acceleration. Improve your servers’ performance, scalability, and reliability with application delivery from NGINX Plus.
NGINX Plus significantly increases application performance during periods of high load with its caching, HTTP connection processing, and efficient offloading of traffic from slow networks. NGINX Plus offers enterprise application load balancing, sophisticated health checks, and more, to balance workloads and avoid user-visible errors.
Check out this webinar to:
* Learn why web performance matters more than ever, in the face of growing application complexity and traffic volumes
* Get the lowdown on the performance challenges of HTTP, and why the real world is so different to a development environment
* Understand why NGINX and NGINX Plus are such popular solutions for mitigating these problems and restoring peak performance
* Look at some real-world deployment examples of accelerating traffic in complex scenarios
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
Servlet Technology is used to create web applications. Servlet technology uses Java language to create web applications.
As Servlet Technology uses Java, web applications made using Servlet are Secured, Scalable and Robust.
Web applications are helper applications that resides at web server and build dynamic web pages. A dynamic page could be anything like a page that randomly chooses picture to display or even a page that displays the current time.
In order to understand how to scale Node.js you need to know how the internals work together and what type of problems are best suited for it. With the right combination of tools you can easily have a scalable and reliable Node.js cluster.
Similar to Nodejs Event Driven Concurrency for Web Applications (20)
6. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Why another server side technology?
http://ganeshiyer.net
7. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Why another server side technology?
http://ganeshiyer.net
8. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Why another server side technology?
http://ganeshiyer.net
9. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Why another server side technology?
http://ganeshiyer.net
10. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Uses an event-driven, non-blocking I/O model
for building scalable network applications
http://ganeshiyer.net
11. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Uses an event-driven, non-blocking I/O model
for building scalable network applications
http://ganeshiyer.net
12. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Uses an event-driven, non-blocking I/O model
for building scalable network applications
http://ganeshiyer.net
13. What is Node
Server-side JavaScript runtime
Built on Google’s V8 Engine
Uses an event-driven, non-blocking I/O model
for building scalable network applications
http://ganeshiyer.net
16. Thread Based
• Creates a new thread( or process) for handling
a new connection.
http://ganeshiyer.net
17. Thread Based
• Creates a new thread( or process) for handling
a new connection.
Server Process
http://ganeshiyer.net
18. Thread Based
• Creates a new thread( or process) for handling
a new connection.
New
Connection
Server Process
http://ganeshiyer.net
19. Thread Based
• Creates a new thread( or process) for handling
a new connection.
Request
handler
Process
New
Connection
Server Process
http://ganeshiyer.net
20. Thread Based
• Creates a new thread( or process) for handling
a new connection.
Request
handler
Process
Server Process
http://ganeshiyer.net
21. Thread Based
• Creates a new thread( or process) for handling
a new connection.
Request
handler
Process
Server Process
http://ganeshiyer.net
24. Scalability Issues
There is a maximum number of threads(T’) that a
system can support, beyond which the
throughput decreases.
http://ganeshiyer.net
25. Scalability Issues
Source: M. Welsh, S. D. Gribble, E. A. Brewer, and D. Culler. A design framework for highly con-current systems. Technical Report
UCB/CSD-00-1108, U.C. Berkeley Computer Science Division, April 2000.
http://ganeshiyer.net
27. Scalability Issues
Under heavy load a multi-threaded web
server consumers large amounts of memory
Single thread stack for each connection
http://ganeshiyer.net
28. Scalability Issues
Under heavy load a multi-threaded web
server consumers large amounts of memory
Single thread stack for each connection
Overhead due to context-switching and
scheduling increases drastically with large
number of threads
http://ganeshiyer.net
34. Event Based
Use an event loop
Multiple connections are mapped to a single
thread.
http://ganeshiyer.net
35. Event Based
Use an event loop
Multiple connections are mapped to a single
thread.
This Thread handles all occurring events from
I/O operations of these connections and
requests.
http://ganeshiyer.net
36. Improved scalability
Source: M. Welsh, S. D. Gribble, E. A. Brewer, and D. Culler. A design framework for highly con-current systems. Technical Report
UCB/CSD-00-1108, U.C. Berkeley Computer Science Division, April 2000.
http://ganeshiyer.net
37. Improved scalability
The event loop has a queue of event handlers
that it executes in order.
The overhead when switching from one event
handler to the next time is much lower.
http://ganeshiyer.net
41. Why Server-side JavaScript?
Unified language for both front end an backend
Increased programmer productivity
Code reuse
http://ganeshiyer.net
42. Why Server-side JavaScript?
Unified language for both front end an backend
Increased programmer productivity
Code reuse
exchange of data using JSON
http://ganeshiyer.net
43. Why Server-side JavaScript?
Unified language for both front end an backend
Increased programmer productivity
Code reuse
exchange of data using JSON
Speed!
http://ganeshiyer.net
44. Why Server-side JavaScript?
Unified language for both front end an backend
Increased programmer productivity
Code reuse
exchange of data using JSON
Speed! Contrary to popular belief, Javascript
with the V8 engine performs is faster than
PHP, Ruby and Python
http://ganeshiyer.net
58. Hello World revisited
VS
Output
$ hello 2 seconds later
$ world
http://ganeshiyer.net
59. Hello World revisited
VS
Output New request to
Node
$ hello During those two seconds
http://ganeshiyer.net
60. Hello World revisited
VS
Output New requests
to Node
$ hello During those two seconds
http://ganeshiyer.net
61. Hello World revisited
VS
Since it is non-blocking
Output
$ hello 2 seconds later $ hello 2 seconds later $ hello 2 seconds later
$ world $ world $ world
Response Response Response
http://ganeshiyer.net
66. Static file serving web server
Parsing
the url for
pathname
http://ganeshiyer.net
67. Node provides low-level functionality
For buliding web-applications we require higher
functionality
Node has a lot of packages that help!
http://ganeshiyer.net
69. Package management with npm
Predominant package manager for node
To install ‘express’ package
http://ganeshiyer.net
70. Connect.js : Middleware for nodejs
Essential middleware required for developing
web applications
Implements logging, caching, cookies, sessions
etc.
http://ganeshiyer.net
71. Connect.js : Middleware for nodejs
Essential middleware required for developing web applications
• logger request logger with custom format support
• csrf Cross-site request forgery protection
• basicAuth basic http authentication
• bodyParser extensible request body parser
• json application/json parser
• urlencoded application/x-www-form-urlencoded parser
• cookieParser cookie parser
• session session management support with bundled MemoryStore
• cookieSession cookie-based session support
• staticCache memory cache layer for the static() middleware
http://ganeshiyer.net
73. Express.js : A MVC framework for web
Applications
http://ganeshiyer.net
74. Express.js : A MVC framework for web
Applications
Model View Controller
http://ganeshiyer.net
75. Express.js : A MVC framework for web
Applications
Model View Controller
Performs RESTful routing
http://ganeshiyer.net
76. Express.js : A MVC framework for web
Applications
Model View Controller
Performs RESTful routing
Uses Templating for rendering html
http://ganeshiyer.net
79. Scalability across multiple
cores/servers
Node is single threaded!
How is going to scale on my multi-core server!?
http://ganeshiyer.net
80. Scalability across multiple
cores/servers
Start child processes on multiple
cores/servers.
One process manages flow of events and
other cores for doing computation.
http://ganeshiyer.net
81. Scalability across multiple
cores/servers
Cluster is an extensible multi-core server
manager for node.js.
http://ganeshiyer.net