SlideShare a Scribd company logo
Introduction to Node.js
Single threaded, non-blocking, asynchronous runtime
(server side Javascript)
About me?
NodeXperts?
Premier Software Development Services Company.
Build & Deliver for Node.js.
Tremendous work in :
Angular.js,
D3.js,
Meteor.js,
ReactJs and many more.
intro to Javascript.
What the heck is an event loop?
What is javascript?
JavaScript has “event-loop”, “callback” and a stack.
It is “asynchronous”, “single-threaded” and “non-blocking”.
It uses v8 engine for runtime.
What does it mean?
Everything revolves around “event loop”.

Recommended for you

Don’t block the event loop!
Don’t block the event loop!Don’t block the event loop!
Don’t block the event loop!

This document contains information about EventMachine and the reactor pattern in Ruby. It discusses how EventMachine implements the reactor pattern to allow non-blocking and asynchronous I/O in Ruby. It provides examples of how to use EventMachine to run code asynchronously using callbacks, timers, queues, and fibers to avoid "callback hell". The document also lists several other languages and frameworks that use the reactor pattern for asynchronous programming.

non-blockingeventmachineruby
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"

Node.js is a JavaScript runtime built on Chrome's V8 engine that uses asynchronous and event-driven programming to build fast and scalable network applications. It allows for non-blocking I/O operations through a callback pattern to prevent slow operations from blocking other operations. Node.js uses a single thread event loop model that handles concurrent operations without blocking. It can be used to build HTTP servers, watch files for changes, interface with databases like MongoDB, and create real-time web applications using web sockets. Node.js is well suited for real-time applications, APIs, and streaming but not for CPU intensive or data transformation tasks.

nodeepamminiq
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)

This document discusses best practices for scalable nginx configuration. It begins by comparing nginx's location-based configuration to Apache's more complex configuration using various containers. The document then outlines nginx's configuration including using server blocks, locations by prefix, regular expressions, and inheritance. It emphasizes keeping similar locations together, using inclusive locations, and avoiding rewrites or unnecessary "if" blocks for improved performance and scalability.

highload 2014
V8 Engine?
Stack Call?
function foo2() {
console.log(“hello world”);
}
function foo1() {
foo2();
}
foo1();
Stack:
Finally: hello world
foo2()
foo1()
main()
What happen when we run code synchronously in
single threaded environment?
var request1 =
$.getSync(‘http://xyz.com’);
var request2 =
$.getSync(‘http://xyz1.com’);
console.log(request1);
console.log(request2)
What will happen?
1.request1 will process, then
wait for the response.
2.Request2 will process, again
wait for response.
Why? Coz thread is busy processing
that request.
Then, how Javascript works asynchronously?
The answer lies in event loop?
What this event loop is?
Let’s see...

Recommended for you

Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)

This document provides an overview and introduction to Node.js. It discusses that Node.js is a platform for building scalable network applications using JavaScript and uses non-blocking I/O and event-driven architecture. It was created by Ryan Dahl in 2009 and uses Google's V8 JavaScript engine. Node.js allows building web servers, networking tools and real-time applications easily and efficiently by handling concurrent connections without threads. Some popular frameworks and modules built on Node.js are also mentioned such as Express.js, Socket.IO and over 1600 modules in the npm registry.

nodejs javascript js
Node.js Lab
Node.js LabNode.js Lab
Node.js Lab

This document outlines labs for learning Node.js and Express.js. Lab 01 focuses on Node.js, with exercises on installing Node.js, writing basic console, HTTP, TCP, and UDP applications. Lab 02 covers Express.js, including installing and configuring Express.js, generating an Express application, and using MySQL with Express. Each exercise provides code snippets and links to video tutorials.

node.jsjavascript
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

This document contains information about Ricardo Silva's background and areas of expertise. It includes his degree in Computer Science from ISTEC and MSc in Computation and Medical Instrumentation from ISEP. It also notes that he works as a Software Developer at Shortcut, Lda and maintains a blog and email contact for Node.js topics. The document then covers several JavaScript, Node.js and Websockets topics through examples and explanations in 3 sentences or less each.

node.jsnodejssockets
What is Node.js then?A server side v8 engine
I hope you now have a basic idea of how javascript
works on browser?
What? Now we can run javascript on server side.
Yes, it allows us to run JavaScript code in the backend,
outside a browser.
How? Google's V8 VM.
Comes with two things: a runtime environment and a library
(NPM).
Sounds awesome, right?
Features of Node Js
Relies on asynchronous code to stay fast and non-blocking.
Non-blocking
Blocking:
console.log("Hi!");
for(var i=0; i<100; i++) {
console.log("Inside the loop");
}
console.log("Welcome to NodeXperts.");
Continue...
Non-blocking:
console.log("Hi!");
setTimeout(function timeout() {
for(var i=0; i<100; i++) {
console.log("Inside the loop");
}
}, 5000);
console.log("Welcome to NodeXperts.");
Where does it go? It goes inside EVENT LOOP (through
callbacks).

Recommended for you

The Node.js Event Loop: Not So Single Threaded
The Node.js Event Loop: Not So Single ThreadedThe Node.js Event Loop: Not So Single Threaded
The Node.js Event Loop: Not So Single Threaded

This document contains code snippets and graphs demonstrating the difference between synchronous and asynchronous functions in JavaScript. It shows how synchronous functions like crypto.pbkdf2Sync block further code execution, while asynchronous functions like crypto.pbkdf2 and https.request allow other work to continue in parallel and complete faster overall.

javascriptnode.js
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network

The document discusses various methods for connecting to a network and downloading content in Android, including checking network connectivity, performing long operations off the main thread using AsyncTask, downloading content from URLs, and considerations around using HttpClient versus HttpURLConnection. It provides code examples for tasks like retrieving the device IP address, disabling HTTP connection reuse, and handling gzip encoding.

androidnetwork
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick start

This document provides an overview of Node.js basics like running a simple "Hello World" program, using the Node Package Manager (NPM) to install packages, debugging with node-inspector, and using the Express framework to build web applications. It also covers using MongoDB and the Mongoose ODM to interface with MongoDB to create, retrieve, and save documents to a database in Express applications.

Let’s take a look at an example
var fs = require('fs');
fs.readFile('nx.txt', function (err, data){
if(err) throw err;
console.log(data);
})
While there are events to process:
e = get the next event
Perform the action requested by e in thread
If e’s thread is complete and there is a callback associated with e:
Call the callback
Continue...
Event Loop: How it is different from browser?
Where you can use Node Js?
Few CPU cycles
I/O operations
Chat Applications
Proxies

Recommended for you

Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...

Avoid the callback hell and improve on promises in node.js and JavaScript by using the new ES6 generators. This presentation will show you before and after code examples that will illustrate the full benefit of using this new syntax.

coffeescriptes6javascript
Node Web Development 2nd Edition: Chapter3 Node Modules
Node Web Development 2nd Edition: Chapter3 Node ModulesNode Web Development 2nd Edition: Chapter3 Node Modules
Node Web Development 2nd Edition: Chapter3 Node Modules

This document discusses Node.js modules and the Node Package Manager (NPM). It explains that modules are defined using one .js file, and objects not assigned to exports are private. It also covers module loading using require(), module encapsulation, module identifiers, the node_modules search path, the package.json format, dependencies, and basic NPM commands like install, uninstall, search, and publish.

node
Node intro
Node introNode intro
Node intro

Node.js is an environment for developing high-performance web services using JavaScript on the server-side. It uses Google's V8 JavaScript engine and an event-driven, non-blocking I/O model that makes it lightweight and efficient, especially for real-time web applications with many concurrent connections. Common programming techniques in Node.js include asynchronous I/O with callbacks, event-driven programming, and a common module system for building reusable components.

Where you can not use Node Js?
Heavy computation.
Large and complicated web application because it doesn’t
support multi-threaded programming.
Advantages of Node Js
Open source
JavaScript language is used on both front-end & back-end
High Scalability both Horizontally & Vertically
Better Performance than traditional web servers
Has a wide community of developers around the world
Thank you
Any questions?
Hope you all enjoyed :)

More Related Content

What's hot

JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by Aryo
Agate Studio
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
 
Don’t block the event loop!
Don’t block the event loop!Don’t block the event loop!
Don’t block the event loop!
hujinpu
 
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
EPAM Systems
 
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Ontico
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
Felix Geisendörfer
 
Node.js Lab
Node.js LabNode.js Lab
Node.js Lab
Leo Nguyen
 
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
 
The Node.js Event Loop: Not So Single Threaded
The Node.js Event Loop: Not So Single ThreadedThe Node.js Event Loop: Not So Single Threaded
The Node.js Event Loop: Not So Single Threaded
Bryan Hughes
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
Mu Chun Wang
 
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick start
Guangyao Cao
 
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
andreaslubbe
 
Node Web Development 2nd Edition: Chapter3 Node Modules
Node Web Development 2nd Edition: Chapter3 Node ModulesNode Web Development 2nd Edition: Chapter3 Node Modules
Node Web Development 2nd Edition: Chapter3 Node Modules
Rick Chang
 
Node intro
Node introNode intro
Node intro
cloudhead
 
Multi-core Node.pdf
Multi-core Node.pdfMulti-core Node.pdf
Multi-core Node.pdf
Ahmed Hassan
 
Node.js - As a networking tool
Node.js - As a networking toolNode.js - As a networking tool
Node.js - As a networking tool
Felix Geisendörfer
 
Introduction to Erebos: a JavaScript client for Swarm
Introduction to Erebos: a JavaScript client for SwarmIntroduction to Erebos: a JavaScript client for Swarm
Introduction to Erebos: a JavaScript client for Swarm
Miloš Mošić
 
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Ontico
 
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Ontico
 

What's hot (20)

JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by Aryo
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
Don’t block the event loop!
Don’t block the event loop!Don’t block the event loop!
Don’t block the event loop!
 
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
 
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
 
Node.js Lab
Node.js LabNode.js Lab
Node.js Lab
 
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
 
The Node.js Event Loop: Not So Single Threaded
The Node.js Event Loop: Not So Single ThreadedThe Node.js Event Loop: Not So Single Threaded
The Node.js Event Loop: Not So Single Threaded
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
 
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick start
 
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
 
Node Web Development 2nd Edition: Chapter3 Node Modules
Node Web Development 2nd Edition: Chapter3 Node ModulesNode Web Development 2nd Edition: Chapter3 Node Modules
Node Web Development 2nd Edition: Chapter3 Node Modules
 
Node intro
Node introNode intro
Node intro
 
Multi-core Node.pdf
Multi-core Node.pdfMulti-core Node.pdf
Multi-core Node.pdf
 
Node.js - As a networking tool
Node.js - As a networking toolNode.js - As a networking tool
Node.js - As a networking tool
 
Introduction to Erebos: a JavaScript client for Swarm
Introduction to Erebos: a JavaScript client for SwarmIntroduction to Erebos: a JavaScript client for Swarm
Introduction to Erebos: a JavaScript client for Swarm
 
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
 
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
 

Similar to Introduction to Node.js

Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
Budh Ram Gurung
 
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
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
Mike Hagedorn
 
NodeJS
NodeJSNodeJS
NodeJS
Alok Guha
 
Kotlin Coroutines and Rx
Kotlin Coroutines and RxKotlin Coroutines and Rx
Kotlin Coroutines and Rx
Shaul Rosenzwieg
 
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
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
Oleg Podsechin
 
Full-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.jsFull-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.js
Michael Lehmann
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
Oleg Podsechin
 
JavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptxJavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptx
RAHITNATH
 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
Piotr Pelczar
 
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
 
node.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Servernode.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Server
David Ruiz
 
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
GITS Indonesia
 
Node js lecture
Node js lectureNode js lecture
Node js lecture
Darryl Sherman
 
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
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
Yiguang Hu
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Pavlo Baron
 

Similar to Introduction to Node.js (20)

Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
 
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.
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
 
NodeJS
NodeJSNodeJS
NodeJS
 
Kotlin Coroutines and Rx
Kotlin Coroutines and RxKotlin Coroutines and Rx
Kotlin Coroutines and Rx
 
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
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
Full-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.jsFull-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.js
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
JavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptxJavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptx
 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
 
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
 
node.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Servernode.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Server
 
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...
 
Node js lecture
Node js lectureNode js lecture
Node js lecture
 
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
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 

More from NodeXperts

ECMA Script
ECMA ScriptECMA Script
ECMA Script
NodeXperts
 
Apollo Server IV
Apollo Server IVApollo Server IV
Apollo Server IV
NodeXperts
 
React Context API
React Context APIReact Context API
React Context API
NodeXperts
 
Devops - Microservice and Kubernetes
Devops - Microservice and KubernetesDevops - Microservice and Kubernetes
Devops - Microservice and Kubernetes
NodeXperts
 
Introduction to EC2 (AWS)
Introduction to EC2 (AWS)Introduction to EC2 (AWS)
Introduction to EC2 (AWS)
NodeXperts
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
NodeXperts
 
Apollo server II
Apollo server IIApollo server II
Apollo server II
NodeXperts
 
Apollo Server
Apollo ServerApollo Server
Apollo Server
NodeXperts
 
Apollo Server III
Apollo Server IIIApollo Server III
Apollo Server III
NodeXperts
 
Getting Reactive Data
Getting Reactive DataGetting Reactive Data
Getting Reactive Data
NodeXperts
 
State, Life cycle, Methods & Events
State, Life cycle, Methods & Events State, Life cycle, Methods & Events
State, Life cycle, Methods & Events
NodeXperts
 
Refs in react
Refs in reactRefs in react
Refs in react
NodeXperts
 
Flow router, components and props
Flow router, components and propsFlow router, components and props
Flow router, components and props
NodeXperts
 
Using react with meteor
Using react with meteorUsing react with meteor
Using react with meteor
NodeXperts
 
Introduction to Reactjs
Introduction to ReactjsIntroduction to Reactjs
Introduction to Reactjs
NodeXperts
 
Mobile apps using meteor - Part 1
Mobile apps using meteor - Part 1Mobile apps using meteor - Part 1
Mobile apps using meteor - Part 1
NodeXperts
 
Microservice architecture : Part 1
Microservice architecture : Part 1Microservice architecture : Part 1
Microservice architecture : Part 1
NodeXperts
 
Reactive web applications using MeteorJS
Reactive web applications using MeteorJSReactive web applications using MeteorJS
Reactive web applications using MeteorJS
NodeXperts
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
NodeXperts
 
Meteor workshop
Meteor workshopMeteor workshop
Meteor workshop
NodeXperts
 

More from NodeXperts (20)

ECMA Script
ECMA ScriptECMA Script
ECMA Script
 
Apollo Server IV
Apollo Server IVApollo Server IV
Apollo Server IV
 
React Context API
React Context APIReact Context API
React Context API
 
Devops - Microservice and Kubernetes
Devops - Microservice and KubernetesDevops - Microservice and Kubernetes
Devops - Microservice and Kubernetes
 
Introduction to EC2 (AWS)
Introduction to EC2 (AWS)Introduction to EC2 (AWS)
Introduction to EC2 (AWS)
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 
Apollo server II
Apollo server IIApollo server II
Apollo server II
 
Apollo Server
Apollo ServerApollo Server
Apollo Server
 
Apollo Server III
Apollo Server IIIApollo Server III
Apollo Server III
 
Getting Reactive Data
Getting Reactive DataGetting Reactive Data
Getting Reactive Data
 
State, Life cycle, Methods & Events
State, Life cycle, Methods & Events State, Life cycle, Methods & Events
State, Life cycle, Methods & Events
 
Refs in react
Refs in reactRefs in react
Refs in react
 
Flow router, components and props
Flow router, components and propsFlow router, components and props
Flow router, components and props
 
Using react with meteor
Using react with meteorUsing react with meteor
Using react with meteor
 
Introduction to Reactjs
Introduction to ReactjsIntroduction to Reactjs
Introduction to Reactjs
 
Mobile apps using meteor - Part 1
Mobile apps using meteor - Part 1Mobile apps using meteor - Part 1
Mobile apps using meteor - Part 1
 
Microservice architecture : Part 1
Microservice architecture : Part 1Microservice architecture : Part 1
Microservice architecture : Part 1
 
Reactive web applications using MeteorJS
Reactive web applications using MeteorJSReactive web applications using MeteorJS
Reactive web applications using MeteorJS
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Meteor workshop
Meteor workshopMeteor workshop
Meteor workshop
 

Recently uploaded

Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
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
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
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
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
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
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
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
 
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
 
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
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
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
 
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
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 

Recently uploaded (20)

Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
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
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
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
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
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
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
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
 
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
 
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
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
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
 
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
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 

Introduction to Node.js

  • 1. Introduction to Node.js Single threaded, non-blocking, asynchronous runtime (server side Javascript)
  • 2. About me? NodeXperts? Premier Software Development Services Company. Build & Deliver for Node.js. Tremendous work in : Angular.js, D3.js, Meteor.js, ReactJs and many more.
  • 3. intro to Javascript. What the heck is an event loop?
  • 4. What is javascript? JavaScript has “event-loop”, “callback” and a stack. It is “asynchronous”, “single-threaded” and “non-blocking”. It uses v8 engine for runtime. What does it mean? Everything revolves around “event loop”.
  • 6. Stack Call? function foo2() { console.log(“hello world”); } function foo1() { foo2(); } foo1(); Stack: Finally: hello world foo2() foo1() main()
  • 7. What happen when we run code synchronously in single threaded environment? var request1 = $.getSync(‘http://xyz.com’); var request2 = $.getSync(‘http://xyz1.com’); console.log(request1); console.log(request2) What will happen? 1.request1 will process, then wait for the response. 2.Request2 will process, again wait for response. Why? Coz thread is busy processing that request.
  • 8. Then, how Javascript works asynchronously? The answer lies in event loop? What this event loop is? Let’s see...
  • 9. What is Node.js then?A server side v8 engine I hope you now have a basic idea of how javascript works on browser?
  • 10. What? Now we can run javascript on server side. Yes, it allows us to run JavaScript code in the backend, outside a browser. How? Google's V8 VM. Comes with two things: a runtime environment and a library (NPM). Sounds awesome, right?
  • 11. Features of Node Js Relies on asynchronous code to stay fast and non-blocking. Non-blocking Blocking: console.log("Hi!"); for(var i=0; i<100; i++) { console.log("Inside the loop"); } console.log("Welcome to NodeXperts.");
  • 12. Continue... Non-blocking: console.log("Hi!"); setTimeout(function timeout() { for(var i=0; i<100; i++) { console.log("Inside the loop"); } }, 5000); console.log("Welcome to NodeXperts."); Where does it go? It goes inside EVENT LOOP (through callbacks).
  • 13. Let’s take a look at an example var fs = require('fs'); fs.readFile('nx.txt', function (err, data){ if(err) throw err; console.log(data); })
  • 14. While there are events to process: e = get the next event Perform the action requested by e in thread If e’s thread is complete and there is a callback associated with e: Call the callback
  • 15. Continue... Event Loop: How it is different from browser?
  • 16. Where you can use Node Js? Few CPU cycles I/O operations Chat Applications Proxies
  • 17. Where you can not use Node Js? Heavy computation. Large and complicated web application because it doesn’t support multi-threaded programming.
  • 18. Advantages of Node Js Open source JavaScript language is used on both front-end & back-end High Scalability both Horizontally & Vertically Better Performance than traditional web servers Has a wide community of developers around the world
  • 19. Thank you Any questions? Hope you all enjoyed :)

Editor's Notes

  1. Show that loupe work on browser.
  2. More information on NPM