SlideShare a Scribd company logo
Oscar Renalias
Getting started with Node.js
October 11, 2013

Organizers

Top Media Partner

Media Partner

Supporter
About me

@oscarrenalias
github.com/oscarrenalias
oscar.renalias@accenture.com

oscar@renalias.net
Node.js, for architects - OpenSlava 2013
Server-side
Javascript
•

Dynamically typed

•

Supports functions/closures

•

Object-oriented with prototype-based inheritance

•

Standardized as ECMAScript
V8: High Performance JavaScript Engine
•

JIT to native: x86, ARM and MIPS

•

On-the-fly recompilation of “hot” functions with an
optimizing compiler

•

ECMAScript compliant
Single threaded??
Asynchronous, Event-based

Event
producers

Event
Event

Event

Callbacks
Single threaded, asynchronous, event-based!

Wait for
callback

Wait for
I/O

Wait for
I/O

Callback
ready
Event callbacks
Sequential callbacks?
So why are async and events good?
•

Easier to write

•

Scales better

•

Lower memory, CPU overhead
Node.js, for architects - OpenSlava 2013
Rapid prototyping, rapid development
RESTful services with no effort
No-fuss, native JSON handling
Awesome Package management

•

Gets out of the way

•

Support for internal and public modules

•

Kiss problems with transitive dependencies goodbye
Community modules
http://npmjs.org
Interesting Projects: Express
•

Minimal web application framework

•

Additional features are provided as modules or
middleware: template engines, models, authentication
and authorization, etc
Interesting Projects: Socket.io
•

Provides support for server-initiated push events using
WebSockets, Ajax polling, Iframe, JSONP or Flashbased channels

•

Transparent for both clients and servers

•

Can run standalone or integrated with Express

SERVER

CLIENT
Interesting Projects: Meteor
•

Next-gen framework for real-time collaborative web
applications

•

Live page updates

•

Support for offline databases with subsequent
synchronization
When to use Node.js
•

REST+JSON APIs

•

Backend for single-page web apps: same language in
client and server

•

Real-time web apps with Socket.io and Meteor

•

Quick prototyping

•

Rapidly evolving applications: media sites, marketing,
etc
When not to use Node.js
•

CPU-bound tasks

•

Multi-threaded applications

•

Applications that have to process large amounts of
data

•

Boring CRUD-type web apps
Ready for the Enterprise?
Maturity
•

Under development since 2008

•

Node.js 1.0 around the corner

•

Nearly 40000 modules available via npm

•

Awesome community

•

Commercial support
Lightweight Architecture Enabler
Does it Scale?
Performance

Test: multiple database queries per request, serialized as JSON
responses
More Performance

Test: return a response as a simple serialized JSON object
Source: http://www.techempower.com/benchmarks/
Not the fastest; does it always
matter?
Javascript

Weird
shit

Like Java, with
simple syntax
and no types
JavaScript is quirky different
•

Prototype-based inheritance

•

“==“ versus “===“

•

The meaning of “this”

•

Call, apply and bind in Function.prototype

And more.
Solid development toolset
Toolset
•

Large selection of testing libraries: unit testing,
functional testing, BDD

•

Static code analysis (JsHint)

•

IntelliJ IDEA, Eclipse (Nodeclipse) integration:
highlighting, refactoring, debugging

•

Integration with Jenkins/Hudson, Node.js specific CI
servers

•

NPM supports internal module repositories
Architects have a little bit of extra work
Node.js currently lacks standards; extra effort and
care must be paid to
•

application architecture,

•

development lifecycle,

•

code quality,

And many more.
Big teams, big codebases
Where does it run?
Is it commercially supported?
Joyent is the corporate
steward of Node.js, the
world’s best runtime for
today's data-intensive,
real-time applications.
Joyent offers exclusive
debugging and
performance analysis
tools for Node.js
applications.
Anybody using it?

More Related Content

PDF
Introduction to Node.js
PPTX
Node.js tutoria for beginner
PDF
Node.js Crash Course
PPTX
Node.js Patterns for Discerning Developers
PPTX
Node js for enterprise
PPTX
Introduction to node.js by jiban
PPTX
NodeJS - Server Side JS
PDF
Node.js for beginner
Introduction to Node.js
Node.js tutoria for beginner
Node.js Crash Course
Node.js Patterns for Discerning Developers
Node js for enterprise
Introduction to node.js by jiban
NodeJS - Server Side JS
Node.js for beginner

What's hot (20)

PDF
NodeJS for Beginner
PPTX
Introduction Node.js
PPTX
Introduction to Node.js
PDF
Understanding the Single Thread Event Loop
PPTX
Nodejs intro
PDF
NodeJS ecosystem
PPTX
Node.js Workshop - Sela SDP 2015
PPT
Introduction to node.js aka NodeJS
PDF
Introduction to Node.js: What, why and how?
PPTX
Intro to Node.js (v1)
PPTX
Introduction to node.js
PDF
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
PPSX
Node.js In The Enterprise - A Primer
PPTX
Node js introduction
PDF
Nodejs presentation
PDF
Complete MVC on NodeJS
PDF
Basic Understanding and Implement of Node.js
PPTX
Introduction to node.js
PDF
Server Side Event Driven Programming
PDF
Understand How Node.js and Core Features Works
NodeJS for Beginner
Introduction Node.js
Introduction to Node.js
Understanding the Single Thread Event Loop
Nodejs intro
NodeJS ecosystem
Node.js Workshop - Sela SDP 2015
Introduction to node.js aka NodeJS
Introduction to Node.js: What, why and how?
Intro to Node.js (v1)
Introduction to node.js
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
Node.js In The Enterprise - A Primer
Node js introduction
Nodejs presentation
Complete MVC on NodeJS
Basic Understanding and Implement of Node.js
Introduction to node.js
Server Side Event Driven Programming
Understand How Node.js and Core Features Works
Ad

Viewers also liked (7)

PDF
Anatomy of a Modern Node.js Application Architecture
PDF
Architecting large Node.js applications
PPTX
Fronts
PPTX
Real time Analytics with Apache Kafka and Apache Spark
PDF
Nodejs Explained with Examples
PDF
Node Foundation Membership Overview 20160907
PDF
Developing Real-Time Data Pipelines with Apache Kafka
Anatomy of a Modern Node.js Application Architecture
Architecting large Node.js applications
Fronts
Real time Analytics with Apache Kafka and Apache Spark
Nodejs Explained with Examples
Node Foundation Membership Overview 20160907
Developing Real-Time Data Pipelines with Apache Kafka
Ad

Similar to Node.js, for architects - OpenSlava 2013 (20)

PPTX
Beginners Node.js
PDF
An introduction to Node.js
PPTX
After the LAMP, it's time to get MEAN
PDF
The MEAN Stack
PPTX
Web Applications Development with MEAN Stack
KEY
20120306 dublin js
PPTX
What is Mean Stack Development ?
PDF
Delivering big content at NBC News with RavenDB
PPTX
Nodejs overview
PPTX
Kiss.ts - The Keep It Simple Software Stack for 2017++
PDF
Web Development using Ruby on Rails
PPT
Introducción y comandos en NodeJS slodte
PPTX
Oracle application container cloud back end integration using node final
PPTX
Introduction to Napa.js
PDF
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
PPTX
Comprehensive Guide to Node.js for Server-Side JavaScript Development
PDF
Hello world - intro to node js
PDF
Tech io nodejs_20130531_v0.6
PPTX
NodeJS and what is actually does
KEY
20120802 timisoara
Beginners Node.js
An introduction to Node.js
After the LAMP, it's time to get MEAN
The MEAN Stack
Web Applications Development with MEAN Stack
20120306 dublin js
What is Mean Stack Development ?
Delivering big content at NBC News with RavenDB
Nodejs overview
Kiss.ts - The Keep It Simple Software Stack for 2017++
Web Development using Ruby on Rails
Introducción y comandos en NodeJS slodte
Oracle application container cloud back end integration using node final
Introduction to Napa.js
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
Comprehensive Guide to Node.js for Server-Side JavaScript Development
Hello world - intro to node js
Tech io nodejs_20130531_v0.6
NodeJS and what is actually does
20120802 timisoara

More from Oscar Renalias (11)

PPTX
Enterprise Open Source
PPTX
DockerCon EU 2017 - Containers are not just for microservices
PPTX
Containers aren’t just for microservices – Containerizing Legacy Workloads
PPTX
50 production deployments a day, at least
PPTX
DockerCon 2016 - Structured Container Delivery
PPTX
Containerize everything - Wildcardconf 2015
PPTX
Next-generation JavaScript - OpenSlava 2014
PPTX
OpenSlava 2013 - Dynamic Languages
PDF
Asynchronous web apps with the Play Framework 2.0
PDF
ScalaCheck Cookbook v1.0
PPTX
Unlocking value in your (big) data
Enterprise Open Source
DockerCon EU 2017 - Containers are not just for microservices
Containers aren’t just for microservices – Containerizing Legacy Workloads
50 production deployments a day, at least
DockerCon 2016 - Structured Container Delivery
Containerize everything - Wildcardconf 2015
Next-generation JavaScript - OpenSlava 2014
OpenSlava 2013 - Dynamic Languages
Asynchronous web apps with the Play Framework 2.0
ScalaCheck Cookbook v1.0
Unlocking value in your (big) data

Recently uploaded (20)

PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Advanced IT Governance
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
NewMind AI Monthly Chronicles - July 2025
Advanced IT Governance
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
Understanding_Digital_Forensics_Presentation.pptx
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced Soft Computing BINUS July 2025.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
Chapter 3 Spatial Domain Image Processing.pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...

Node.js, for architects - OpenSlava 2013

Editor's Notes

  • #8: Unashamedly inspired by: http://www.slideshare.net/sergimansilla/big-app-design-for-nodejs (slide 11)
  • #10: Other approaches to deal with application parallelism:Onethread per connection – thereisanupperlimittothenumber of concurrentthreads, and thereis a memoryoverhead per threadFork a new process per connection – same as above; limitedbytheoperatingsystemprocessscheduler, and processes are heavierthanthreadsSynchronous – don’tbotherwithparallelprocessingNode.js’ approachtoparallelismscalesbetter and uses lessmemorytoprocess a largeramount of connections – butitrequiresthatwebuildapplicationsthat are not CPU-bound
  • #16: Node-restifyisusedhere, butit can all be accomplishedwithout a frameworktoo.
  • #17: JSON is Javascript’s native serialization formatIntegrates very well with things like JSON-based APIs,MongoDB, etc – things that speak JSON natively
  • #22: http://www.meteor.com
  • #24: Note on “boring CRUD-type web apps”: Node.jsframeworksdon’tmakeitneithereasiernor more difficulttowritetraditional web apps; Node.js and itsframeworksjustsimplymake no differencehere
  • #25: Imagecredit: http://www.allmystery.de/i/bk33NhA_ayZYgl_USS_Enterprise_NCC_1701_A_by_cb93.jpg
  • #26: https://groups.google.com/d/topic/nodejs/9afurRCTlOc/discussion
  • #28: Note: Diagram inspired fromhttp://www.slideshare.net/BenLin2/webconf-nodejsproductionarchitectureNode.js processes are single threaded so scalability within the same server is dependent on the number of node processes that we run.In order to load balance the load within the same server, we can use a traditional load balancer running locally.The next step is to scale multiple servers, for which we need an additional load balanced layer on top of the local instances.Database/storage tier can be scaled according to the type of solution in use.
  • #32: Imagesource: http://drtom.ch/talks/2012/06/jazoon/images/tip_of_the_iceberg.jpgOriginal idea:https://speakerdeck.com/anguscroll/the-politics-of-javascript
  • #33: JavaScript is not better or worse than other languages; but it may look more accessible and easier to learn than it actually is.
  • #34: Grunt = Ant,MavenYeoman = Maven, someparts of itincludingarchetypes (“generators” in Yeomanese)
  • #37: Thereis no substitutefor a compilerNo provensuccess of Node.jsapplications in theenterpriseworld, yet