SlideShare a Scribd company logo
node.js
introduction of server side javascript
Saturday, November 23, 13
Sira Sujjinanont
@hunt
Managing Director
Webiz Co.,Ltd.
CTO Jitta.com

15 years in
Web development

Saturday, November 23, 13
Web Development Journey
•

Static HTML

•

PERL/CGI (2 years)

•

PHP (11 years)
•
•

•

CMS > Drupal, Wordpress, Joomla
Framework > Yii, Zend, CodeIgniter, …

What’s next?!?

Saturday, November 23, 13
PHP bad parts
•

Consume a lot of memories

•

Cannot do Realtime Application

•

Cannot deal direct with protocol layer

•

No parallel processing

Saturday, November 23, 13
What I need in the next?
•

Easy to learn (for me and for my team)

•

Fast / Scalability

•

Allow us to dig deep in engineering

•

New technology! New boundary!

•

Open source with great community

Saturday, November 23, 13
And node.js came up!
(server-side javascript)
but we need to dig it deep!!

Saturday, November 23, 13
Why Javascript?
•

Easy to learn and understanding!

•

Front-end coder can do backend immediately!

•

Javascript Engine war!
(huge changed on web industry)

•

Non-blocking I/O

•

One language on both front and back!!!

Saturday, November 23, 13
Server-side javascript

•

Netscape LiveWrite 1996

•

Rhino 1997

•

and over 50 platforms!

Saturday, November 23, 13
Many problems!

•

Slow engines

•

Lag of interest in Javascript language
(until 2005… ajax trend!)

•

Great competitors platform and language

Saturday, November 23, 13
•

Created by Ryan Dahl in 2009
easily building fast, scalable network applications

•

Google V8 Javascript Engine
(Same technology in Google Chrome)

•

NPM Package Manager
(Come by default great as it should be: 48,362 modules)

•

Realtime, Command line, Many tools

Saturday, November 23, 13
When do we need a web?

•

Download web server and install

•

Install PHP and maybe database

•

Configuration….

•

And now we can put our code on it!

Saturday, November 23, 13
See Node.js way!
(create a web server, just in 6 lines of code)
1

Download and click install
apt-get install nodejs

2
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200);
res.end("Hello World!n");
}).listen(3000);
console.log('Server running at http://localhost:3000/');

Saturday, November 23, 13
It just works!
Web server and ready for
a huge traffic :)

even 10,000/reqs
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200);
res.end("Hello World!n");
}).listen(3000);
console.log('Server running at http://localhost:3000/');

Saturday, November 23, 13
Blocking I/O
var a = db.query(“SELECT * FROM users”);
console.log(‘Result a:’, a);

var b = db.query(“SELECT * FROM documents”);
console.log(‘Result B:’, b);

Saturday, November 23, 13
Blocking I/O
var a = db.query(“SELECT * FROM users”);
console.log(‘Result a:’, a);

wait

var b = db.query(“SELECT * FROM documents”);
console.log(‘Result B:’, b);

Waste cpu cycles from waiting…
other part of code, they need to wait too!

Saturday, November 23, 13

wait
Blocking I/O
var a = db.query(“SELECT * FROM users”);
console.log(‘Result a:’, a);

wait

var b = db.query(“SELECT * FROM documents”);
console.log(‘Result B:’, b);

sum ( a + b)
Saturday, November 23, 13

wait
Non Blocking I/O
var a = db.query(“SELECT * FROM users”,
function(result){
console.log(‘Result a:’, a);
}
);

var b = db.query(“SELECT * FROM documents”,
function(result){
console.log(‘Result b:’, ab);
}
);

Saturday, November 23, 13
Non Blocking I/O
var a = db.query(“SELECT * FROM users”,
function(result){
console.log(‘Result a:’, a);
}
);

run parallel

var b = db.query(“SELECT * FROM documents”,
function(result){
console.log(‘Result b:’, ab);
}
);

max ( a, b )
Saturday, November 23, 13

run parallel
Benchmark

nginx (non blocking i/o)

Saturday, November 23, 13

apache (blocking i/o)
Suitable Applications
•

Single page app

•

Full web app

•

Realtime app
chat, notification, games

•

Crawler, Bot

•

Streaming

•

File uploading

Saturday, November 23, 13
Who using now?

and thousand thousand more…
including me... Molome ....

Saturday, November 23, 13
You should try!
•

It’s not hard to start if you familiar with Javascript

•

If you looking for another language

•

It’ll change the way you do a web

•

And it’s FUN!!

Saturday, November 23, 13
Start now!
http://github.com/hunt/seventies
template for node.js web application
by me!
https://github.com/jlleblanc/nodejs-joomla
module for Joomla

Saturday, November 23, 13
Q&A

Free to ask!

Saturday, November 23, 13

More Related Content

What's hot

Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Weaveworks
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
Sarunyhot Suwannachoti
 
Consuming Web Services in Android
Consuming Web Services in AndroidConsuming Web Services in Android
Consuming Web Services in Android
David Truxall
 
Using Google App Engine Python
Using Google App Engine PythonUsing Google App Engine Python
Using Google App Engine Python
Akshay Mathur
 
Why NodeJS
Why NodeJSWhy NodeJS
Why NodeJS
Riza Fahmi
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Riza Fahmi
 
The State of Rust Web Frameworks
The State of Rust Web FrameworksThe State of Rust Web Frameworks
The State of Rust Web Frameworks
IanWagner10
 
Why Wordnik went non-relational
Why Wordnik went non-relationalWhy Wordnik went non-relational
Why Wordnik went non-relational
Tony Tam
 
Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)
Serverless User Group Poland
 
Development Workflow in Kubernetes
Development Workflow in KubernetesDevelopment Workflow in Kubernetes
Development Workflow in Kubernetes
Christian Melendez
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
Valeri Karpov
 
Event Sourcing your AngularJS applications
Event Sourcing your AngularJS applicationsEvent Sourcing your AngularJS applications
Event Sourcing your AngularJS applications
Maurice De Beijer [MVP]
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction
Kanika Gera
 
Shifting security to the left with kubernetes, azure, and istio
Shifting security to the left with kubernetes, azure, and istioShifting security to the left with kubernetes, azure, and istio
Shifting security to the left with kubernetes, azure, and istio
Christian Melendez
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
Quentin Adam
 
Serverless
ServerlessServerless
Serverless
Diego Pacheco
 
Building a Distributed Build System at Google Scale
Building a Distributed Build System at Google ScaleBuilding a Distributed Build System at Google Scale
Building a Distributed Build System at Google Scale
Aysylu Greenberg
 
Understand How Node.js and Core Features Works
Understand How Node.js and Core Features WorksUnderstand How Node.js and Core Features Works
Understand How Node.js and Core Features Works
Hengki Sihombing
 
Functional Programming in Serverless World
Functional Programming in Serverless WorldFunctional Programming in Serverless World
Functional Programming in Serverless World
Wojciech Gawroński
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.io
Jonathan LeBlanc
 

What's hot (20)

Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
 
Consuming Web Services in Android
Consuming Web Services in AndroidConsuming Web Services in Android
Consuming Web Services in Android
 
Using Google App Engine Python
Using Google App Engine PythonUsing Google App Engine Python
Using Google App Engine Python
 
Why NodeJS
Why NodeJSWhy NodeJS
Why NodeJS
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
 
The State of Rust Web Frameworks
The State of Rust Web FrameworksThe State of Rust Web Frameworks
The State of Rust Web Frameworks
 
Why Wordnik went non-relational
Why Wordnik went non-relationalWhy Wordnik went non-relational
Why Wordnik went non-relational
 
Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)
 
Development Workflow in Kubernetes
Development Workflow in KubernetesDevelopment Workflow in Kubernetes
Development Workflow in Kubernetes
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Event Sourcing your AngularJS applications
Event Sourcing your AngularJS applicationsEvent Sourcing your AngularJS applications
Event Sourcing your AngularJS applications
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction
 
Shifting security to the left with kubernetes, azure, and istio
Shifting security to the left with kubernetes, azure, and istioShifting security to the left with kubernetes, azure, and istio
Shifting security to the left with kubernetes, azure, and istio
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
Serverless
ServerlessServerless
Serverless
 
Building a Distributed Build System at Google Scale
Building a Distributed Build System at Google ScaleBuilding a Distributed Build System at Google Scale
Building a Distributed Build System at Google Scale
 
Understand How Node.js and Core Features Works
Understand How Node.js and Core Features WorksUnderstand How Node.js and Core Features Works
Understand How Node.js and Core Features Works
 
Functional Programming in Serverless World
Functional Programming in Serverless WorldFunctional Programming in Serverless World
Functional Programming in Serverless World
 
High Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.ioHigh Performance API Mashups with Node.js and ql.io
High Performance API Mashups with Node.js and ql.io
 

Viewers also liked

Sani UAE
Sani UAESani UAE
Sani UAE
Barbara Bashour
 
Lord of the Flies Pictures
Lord of the Flies PicturesLord of the Flies Pictures
Lord of the Flies Picturesapenn
 
Przeksztalanie wzorow fizycznych
Przeksztalanie wzorow fizycznychPrzeksztalanie wzorow fizycznych
Przeksztalanie wzorow fizycznychzbysiun
 
A5175 Mar2008
A5175 Mar2008A5175 Mar2008
A5175 Mar2008rbarnett
 
Adnan 2D Computer
Adnan  2D ComputerAdnan  2D Computer
Adnan 2D Computer
Barbara Bashour
 
Adam 2D Computer
Adam   2D ComputerAdam   2D Computer
Adam 2D Computer
Barbara Bashour
 
How people use Twitter
How people use TwitterHow people use Twitter
How people use TwitterBob Crawshaw
 
Internetsehat 2010
Internetsehat 2010Internetsehat 2010
Internetsehat 2010Izharul Haq
 
The changing pr economy
The changing pr economyThe changing pr economy
The changing pr economy
Bob Crawshaw
 
Lets Do It Right
Lets Do It RightLets Do It Right
Lets Do It Right
Asociatia Secolului
 
Escritorio
EscritorioEscritorio
December 2009--ACS Beirut, Lebanon Elementary Hallways
December 2009--ACS Beirut, Lebanon Elementary HallwaysDecember 2009--ACS Beirut, Lebanon Elementary Hallways
December 2009--ACS Beirut, Lebanon Elementary Hallways
Barbara Bashour
 
Iraq Zaid
Iraq ZaidIraq Zaid
Iraq Zaid
Barbara Bashour
 
Affen social learning
Affen social learningAffen social learning
Affen social learning
Éric Delcroix
 
Social Media Presentation 10 Dec 2009 (1)
Social Media Presentation 10 Dec 2009 (1)Social Media Presentation 10 Dec 2009 (1)
Social Media Presentation 10 Dec 2009 (1)
Bob Crawshaw
 
Handy Content Marketing Tools: The Audio News Release
 Handy Content Marketing Tools: The Audio News Release Handy Content Marketing Tools: The Audio News Release
Handy Content Marketing Tools: The Audio News Release
Bob Crawshaw
 

Viewers also liked (20)

Sani UAE
Sani UAESani UAE
Sani UAE
 
Derek IEP
Derek IEPDerek IEP
Derek IEP
 
Lord of the Flies Pictures
Lord of the Flies PicturesLord of the Flies Pictures
Lord of the Flies Pictures
 
Przeksztalanie wzorow fizycznych
Przeksztalanie wzorow fizycznychPrzeksztalanie wzorow fizycznych
Przeksztalanie wzorow fizycznych
 
A5175 Mar2008
A5175 Mar2008A5175 Mar2008
A5175 Mar2008
 
Adnan 2D Computer
Adnan  2D ComputerAdnan  2D Computer
Adnan 2D Computer
 
Adam 2D Computer
Adam   2D ComputerAdam   2D Computer
Adam 2D Computer
 
How people use Twitter
How people use TwitterHow people use Twitter
How people use Twitter
 
Internetsehat 2010
Internetsehat 2010Internetsehat 2010
Internetsehat 2010
 
Colors
ColorsColors
Colors
 
The changing pr economy
The changing pr economyThe changing pr economy
The changing pr economy
 
Thesis Defense
Thesis DefenseThesis Defense
Thesis Defense
 
Lets Do It Right
Lets Do It RightLets Do It Right
Lets Do It Right
 
Lg 20 August 2009
Lg 20 August 2009Lg 20 August 2009
Lg 20 August 2009
 
Escritorio
EscritorioEscritorio
Escritorio
 
December 2009--ACS Beirut, Lebanon Elementary Hallways
December 2009--ACS Beirut, Lebanon Elementary HallwaysDecember 2009--ACS Beirut, Lebanon Elementary Hallways
December 2009--ACS Beirut, Lebanon Elementary Hallways
 
Iraq Zaid
Iraq ZaidIraq Zaid
Iraq Zaid
 
Affen social learning
Affen social learningAffen social learning
Affen social learning
 
Social Media Presentation 10 Dec 2009 (1)
Social Media Presentation 10 Dec 2009 (1)Social Media Presentation 10 Dec 2009 (1)
Social Media Presentation 10 Dec 2009 (1)
 
Handy Content Marketing Tools: The Audio News Release
 Handy Content Marketing Tools: The Audio News Release Handy Content Marketing Tools: The Audio News Release
Handy Content Marketing Tools: The Audio News Release
 

Similar to Node.js Introduction

Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
Gonzalo Ayuso
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
Andrew Rota
 
Workers of the web - BrazilJS 2013
Workers of the web - BrazilJS 2013Workers of the web - BrazilJS 2013
Workers of the web - BrazilJS 2013
Thibault Imbert
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The When
FITC
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredev
Felix Geisendörfer
 
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
 
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
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
David Padbury
 
An opinionated intro to Node.js - devrupt hospitality hackathon
An opinionated intro to Node.js - devrupt hospitality hackathonAn opinionated intro to Node.js - devrupt hospitality hackathon
An opinionated intro to Node.js - devrupt hospitality hackathon
Luciano Mammino
 
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim SummitIntroduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Ran Mizrahi
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New AngleLone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New Angle
Pablo Godel
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1Mohammad Qureshi
 
Node.js for Rubists
Node.js for RubistsNode.js for Rubists
Node.js for RubistsSagiv Ofek
 
Mongodb beijingconf yottaa_3.3
Mongodb beijingconf yottaa_3.3Mongodb beijingconf yottaa_3.3
Mongodb beijingconf yottaa_3.3
Yottaa
 
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Ontico
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
Asher Martin
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
markuskobler
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 

Similar to Node.js Introduction (20)

Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
 
Workers of the web - BrazilJS 2013
Workers of the web - BrazilJS 2013Workers of the web - BrazilJS 2013
Workers of the web - BrazilJS 2013
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
 
Node azure
Node azureNode azure
Node azure
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The When
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredev
 
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
 
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
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
An opinionated intro to Node.js - devrupt hospitality hackathon
An opinionated intro to Node.js - devrupt hospitality hackathonAn opinionated intro to Node.js - devrupt hospitality hackathon
An opinionated intro to Node.js - devrupt hospitality hackathon
 
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim SummitIntroduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim Summit
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New AngleLone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New Angle
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Node.js for Rubists
Node.js for RubistsNode.js for Rubists
Node.js for Rubists
 
Mongodb beijingconf yottaa_3.3
Mongodb beijingconf yottaa_3.3Mongodb beijingconf yottaa_3.3
Mongodb beijingconf yottaa_3.3
 
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
Protecting the Web at a scale using consul and Elk / Valentin Chernozemski (S...
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Node.js Introduction

  • 1. node.js introduction of server side javascript Saturday, November 23, 13
  • 2. Sira Sujjinanont @hunt Managing Director Webiz Co.,Ltd. CTO Jitta.com 15 years in Web development Saturday, November 23, 13
  • 3. Web Development Journey • Static HTML • PERL/CGI (2 years) • PHP (11 years) • • • CMS > Drupal, Wordpress, Joomla Framework > Yii, Zend, CodeIgniter, … What’s next?!? Saturday, November 23, 13
  • 4. PHP bad parts • Consume a lot of memories • Cannot do Realtime Application • Cannot deal direct with protocol layer • No parallel processing Saturday, November 23, 13
  • 5. What I need in the next? • Easy to learn (for me and for my team) • Fast / Scalability • Allow us to dig deep in engineering • New technology! New boundary! • Open source with great community Saturday, November 23, 13
  • 6. And node.js came up! (server-side javascript) but we need to dig it deep!! Saturday, November 23, 13
  • 7. Why Javascript? • Easy to learn and understanding! • Front-end coder can do backend immediately! • Javascript Engine war! (huge changed on web industry) • Non-blocking I/O • One language on both front and back!!! Saturday, November 23, 13
  • 8. Server-side javascript • Netscape LiveWrite 1996 • Rhino 1997 • and over 50 platforms! Saturday, November 23, 13
  • 9. Many problems! • Slow engines • Lag of interest in Javascript language (until 2005… ajax trend!) • Great competitors platform and language Saturday, November 23, 13
  • 10. • Created by Ryan Dahl in 2009 easily building fast, scalable network applications • Google V8 Javascript Engine (Same technology in Google Chrome) • NPM Package Manager (Come by default great as it should be: 48,362 modules) • Realtime, Command line, Many tools Saturday, November 23, 13
  • 11. When do we need a web? • Download web server and install • Install PHP and maybe database • Configuration…. • And now we can put our code on it! Saturday, November 23, 13
  • 12. See Node.js way! (create a web server, just in 6 lines of code) 1 Download and click install apt-get install nodejs 2 var http = require('http'); http.createServer(function (req, res) { res.writeHead(200); res.end("Hello World!n"); }).listen(3000); console.log('Server running at http://localhost:3000/'); Saturday, November 23, 13
  • 13. It just works! Web server and ready for a huge traffic :) even 10,000/reqs var http = require('http'); http.createServer(function (req, res) { res.writeHead(200); res.end("Hello World!n"); }).listen(3000); console.log('Server running at http://localhost:3000/'); Saturday, November 23, 13
  • 14. Blocking I/O var a = db.query(“SELECT * FROM users”); console.log(‘Result a:’, a); var b = db.query(“SELECT * FROM documents”); console.log(‘Result B:’, b); Saturday, November 23, 13
  • 15. Blocking I/O var a = db.query(“SELECT * FROM users”); console.log(‘Result a:’, a); wait var b = db.query(“SELECT * FROM documents”); console.log(‘Result B:’, b); Waste cpu cycles from waiting… other part of code, they need to wait too! Saturday, November 23, 13 wait
  • 16. Blocking I/O var a = db.query(“SELECT * FROM users”); console.log(‘Result a:’, a); wait var b = db.query(“SELECT * FROM documents”); console.log(‘Result B:’, b); sum ( a + b) Saturday, November 23, 13 wait
  • 17. Non Blocking I/O var a = db.query(“SELECT * FROM users”, function(result){ console.log(‘Result a:’, a); } ); var b = db.query(“SELECT * FROM documents”, function(result){ console.log(‘Result b:’, ab); } ); Saturday, November 23, 13
  • 18. Non Blocking I/O var a = db.query(“SELECT * FROM users”, function(result){ console.log(‘Result a:’, a); } ); run parallel var b = db.query(“SELECT * FROM documents”, function(result){ console.log(‘Result b:’, ab); } ); max ( a, b ) Saturday, November 23, 13 run parallel
  • 19. Benchmark nginx (non blocking i/o) Saturday, November 23, 13 apache (blocking i/o)
  • 20. Suitable Applications • Single page app • Full web app • Realtime app chat, notification, games • Crawler, Bot • Streaming • File uploading Saturday, November 23, 13
  • 21. Who using now? and thousand thousand more… including me... Molome .... Saturday, November 23, 13
  • 22. You should try! • It’s not hard to start if you familiar with Javascript • If you looking for another language • It’ll change the way you do a web • And it’s FUN!! Saturday, November 23, 13
  • 23. Start now! http://github.com/hunt/seventies template for node.js web application by me! https://github.com/jlleblanc/nodejs-joomla module for Joomla Saturday, November 23, 13
  • 24. Q&A Free to ask! Saturday, November 23, 13