SlideShare a Scribd company logo
1 of 39
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
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
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

What's hot

What's hot (20)

NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Understanding the Single Thread Event Loop
Understanding the Single Thread Event LoopUnderstanding the Single Thread Event Loop
Understanding the Single Thread Event Loop
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?Introduction to Node.js: What, why and how?
Introduction to Node.js: What, why and how?
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
 
Node.js In The Enterprise - A Primer
Node.js In The Enterprise - A PrimerNode.js In The Enterprise - A Primer
Node.js In The Enterprise - A Primer
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven Programming
 
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
 

Viewers also liked

Fronts
FrontsFronts
Fronts
bluelf
 

Viewers also liked (7)

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

Similar to Node.js, for architects - OpenSlava 2013

Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
Avi Kedar
 
Resume
ResumeResume
Resume
Mina k
 

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

Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
 
After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 
Web Applications Development with MEAN Stack
Web Applications Development with MEAN StackWeb Applications Development with MEAN Stack
Web Applications Development with MEAN Stack
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDB
 
Nodejs overview
Nodejs overviewNodejs overview
Nodejs overview
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Oracle application container cloud back end integration using node final
Oracle application container cloud back end integration using node finalOracle application container cloud back end integration using node final
Oracle application container cloud back end integration using node final
 
Introduction to Napa.js
Introduction to Napa.jsIntroduction to Napa.js
Introduction to Napa.js
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Resume
ResumeResume
Resume
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 

More from Oscar Renalias

More from Oscar Renalias (11)

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

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 

Node.js, for architects - OpenSlava 2013

Editor's Notes

  1. Unashamedly inspired by: http://www.slideshare.net/sergimansilla/big-app-design-for-nodejs (slide 11)
  2. 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
  3. Node-restifyisusedhere, butit can all be accomplishedwithout a frameworktoo.
  4. JSON is Javascript’s native serialization formatIntegrates very well with things like JSON-based APIs,MongoDB, etc – things that speak JSON natively
  5. http://www.meteor.com
  6. Note on “boring CRUD-type web apps”: Node.jsframeworksdon’tmakeitneithereasiernor more difficulttowritetraditional web apps; Node.js and itsframeworksjustsimplymake no differencehere
  7. Imagecredit: http://www.allmystery.de/i/bk33NhA_ayZYgl_USS_Enterprise_NCC_1701_A_by_cb93.jpg
  8. https://groups.google.com/d/topic/nodejs/9afurRCTlOc/discussion
  9. 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.
  10. Imagesource: http://drtom.ch/talks/2012/06/jazoon/images/tip_of_the_iceberg.jpgOriginal idea:https://speakerdeck.com/anguscroll/the-politics-of-javascript
  11. JavaScript is not better or worse than other languages; but it may look more accessible and easier to learn than it actually is.
  12. Grunt = Ant,MavenYeoman = Maven, someparts of itincludingarchetypes (“generators” in Yeomanese)
  13. Thereis no substitutefor a compilerNo provensuccess of Node.jsapplications in theenterpriseworld, yet