Benjamin San Souci & Maude Lemaire

Similar documents
An Inside Look at the Architecture of NodeJS

NoSQL web apps. w/ MongoDB, Node.js, AngularJS. Dr. Gerd Jungbluth, NoSQL UG Cologne,

Server-Side JavaScript auf der JVM. Peter Doschkinow Senior Java Architect

MEAN/Full Stack Web Development - Training Course Package

PROFESSIONAL. Node.js BUILDING JAVASCRIPT-BASED SCALABLE SOFTWARE. Pedro Teixeira WILEY. John Wiley & Sons, Inc.

Extending Tizen Native Framework with Node.js

Exercise 1 Media Metadata Analysis

Building A Self-Hosted WebRTC Project

Why Threads Are A Bad Idea (for most purposes)

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Building a Real-Time Cloud Analytics Service with Node.js

ICON UK 2015 node.js for Domino developers. Presenter: Matt White Company: LDC Via

RED HAT SOFTWARE COLLECTIONS BRIDGING DEVELOPMENT AGILITY AND PRODUCTION STABILITY

MASTER THESIS. TITLE: Analysis and evaluation of high performance web servers

Effective Java Programming. efficient software development

Node.JS Appliances on Embedded Linux Devices. Mehmet Fatih Karagöz & Cevahir Turgut

Streaming Data, Concurrency And R

Introducing. Cathal McGloin, VP & General Manager, Mobile Platforms Javier Perez, Director of Product Management and Global Consulting

MA-WA1920: Enterprise iphone and ipad Programming

Building Scalable Applications Using Microsoft Technologies

Contents Introduction... 5 Deployment Considerations... 9 Deployment Architectures... 11

Understanding Evolution's Architecture A Technical Overview

Code and Process Migration! Motivation!

Agenda. Success Stories with OpenShift. 11:15-11:45 am. OpenShift Tech Overview 9:40-10:30 am. Red Hat Mobile on OpenShift 10:45-11:15 am

A REVIEW PAPER ON THE HADOOP DISTRIBUTED FILE SYSTEM

Apache Thrift and Ruby

Art of Code Front-end Web Development Training Program

Java Performance. Adrian Dozsa TM-JUG

ReactOS is (not) Windows. Windows internals and why ReactOS couldn t just use a Linux kernel

-8*6-DYD6HPLQDU 6HUYOHW$UFKLWHFWXUHV 5DLQHU+LVV$QGUHDV.DSS 6<6725$*

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

Introduction to Virtual Machines

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010


Apache Jakarta Tomcat

GUI and Web Programming

FormAPI, AJAX and Node.js

Onegini Token server / Web API Platform

Tomcat Tuning. Mark Thomas April 2009

White Paper Server. SUSE Linux Enterprise Server 12 Modules

Comparing performance between plain JavaScript and popular JavaScript frameworks

Open Source DBMS CUBRID 2008 & Community Activities. Byung Joo Chung bjchung@cubrid.com

RIA Technologies Comparison

Programming IoT Gateways With macchina.io

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

Oracle Primavera P6 Enterprise Project Portfolio Management Performance and Sizing Guide. An Oracle White Paper October 2010

GTask Developing asynchronous applications for multi-core efficiency

How To Write A Web Server In Javascript

Cloud Based Application Architectures using Smart Computing

Research and Design of Universal and Open Software Development Platform for Digital Home

ios Hybrid Mobile Application Development

IBM Software Group. Lotus Domino 6.5 Server Enablement

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Node Without Servers: Event-Driven Computing with AWS Lambda

NoSQL replacement for SQLite (for Beatstream) Antti-Jussi Kovalainen Seminar OHJ-1860: NoSQL databases

Large-Scale Web Applications

Language Based Virtual Machines... or why speed matters. by Lars Bak, Google Inc

COS 318: Operating Systems. Virtual Machine Monitors

<Insert Picture Here> Java, the language for the future

The Fastest Way to Parallel Programming for Multicore, Clusters, Supercomputers and the Cloud.

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

Introduction to IBM Worklight Mobile Platform

Using Cloud Services for Building Next Generation Mobile Apps

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

QML and JavaScript for Native App Development

Lua as a business logic language in high load application. Ilya Martynov ilya@iponweb.net CTO at IPONWEB

A distributed system is defined as

Develop Hybrid Mobile Applications with Apache Cordova & PhoneGap Enterprise

4D and SQL Server: Powerful Flexibility

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

OpenText Information Hub (ihub) 3.1 and 3.1.1

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Building native mobile apps for Digital Factory

ENABLING THE MOBILE ENTERPRISE. James W. Hammons Regional Sales Manager Red Hat Mobile Southern Europe, Middle East & Africa

MAGENTO HOSTING Progressive Server Performance Improvements

Search Engine Architecture

Multi-core Programming System Overview

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

Virtual Machines.

Project Proposal. Developing modern E-commerce web application via Responsive Design

SEMS: The SIP Express Media Server. FRAFOS GmbH

Full and Para Virtualization

General Introduction

Web Server Architectures

Monitis Project Proposals for AUA. September 2014, Yerevan, Armenia

Adobe Flash Player and Adobe AIR security

Mobile Application Platform

Web 2.0 Technology Overview. Lecture 8 GSL Peru 2014

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Monitoring Nginx Server

CRITICAL CONSIDERATIONS WHEN BUILDING ENTERPRISE NODE.JS APPLICATIONS. Dave Anderson & Greg Neiheisel / differential.io

A Design Framework for Highly Concurrent Systems

Mark Bennett. Search and the Virtual Machine

What is Middleware? Software that functions as a conversion or translation layer. It is also a consolidator and integrator.

PROGRESS DATADIRECT QA AND PERFORMANCE TESTING EXTENSIVE TESTING ENSURES DATA CONNECTIVITY THAT WORKS

Example of Standard API

Japan Communication India Skill Development Center

Insight into Performance Testing J2EE Applications Sep 2008

Transcription:

Benjamin San Souci & Maude Lemaire

introduction What is Node.js anyway? a complete software platform for scalable server-side and networking applications open-source under the MIT license comes bundled with a JavaScript interpreter runs on Linux, Windows, Mac OS & most other major operating systems

timeline 2009 Created by Ryan Dahl Version 1 in 2009 to revolutionize web applications Inspired by Ruby Mongrel web server 2010 Joyent sponsors Node.js development 2011 First released version of Node.js available to the public Initial version only available for Linux. Microsoft partners with Joyent to provide Windows support 2012 Complete rewrite of central libraries... 2014 Latest release v0.10.26 Still several improvements away from a stable v0.12 and a finalized v1.0

huge success

why? Up until recently, the web was a stateless environment. Interactive features were encapsulated within Flash or Java Applets Node establishes real-time, two-way connections!

how it works Built on Chrome's V8 JavaScript runtime for easily building fast, scalable network applications Uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for dataintensive real-time applications that run across distributed devices

overall structure Two major components: Main core, written in C and C++ Modules, such as Libuv library and V8 runtime engine, also written in C++

overall structure Main Single Thread All requests handled by the Main Single Thread API API in JavaScript Node Bindings (socket, http, etc) Node bindings allow for server operations V8 Asynchronous I/O (libuv) Event Loop (libuv) DNS (c-ares) Crypto (OpenSSL) Relies on Google s V8 runtime engine Libuv responsible for both asynchronous I/O & event loop

v8 runtime engine Just in Time compiler, written in C++ Consists of compiler, optimizer, and garbage collector

libuv Responsible for Node s asynchronous I/O operations Contains fixed-size thread pool

major influences Heavily influenced by architecture of Unix operating system Relies on a small core and layers of libraries and other modules to facilitate I/O operations

major influences Built-in package manager contributes to the modularity of Node

major features 1. Single threaded Most other similar web platforms are multi-threaded With each new request, heap allocation generated Each request handled sequentially

major features 2. Event Loop Typically implemented using library sand a block call, but Node is non-blocking throughout! Implemented using language construct Automatically terminated Tightly coupled to V8 engine

major features 3. Non-blocking I/O All requests temporarily saved on heap Requests handled sequentially Can support nearly 1 million concurrent connections

how it works A simple example: accessing data from a database 1. HTTP Request Node.js Single thread 3. Data Mobile Client Web Server Database 4. Response in JSON format via callback 2. Async Data Query * Here Node.js, acknowledges the request right away before writing any data to the database.

how it works A generic model of Node.js NodeJS Main Event Loop Initialize Run V8 Event Loop Exit Stop Thread n Delegate Task Create Thread Idle Perform Task I/O Operation Exit

how it works A closer look at the Event Loop Thread 1 Thread 2 Thread n (function, callback) Task 1 Node.js Application Callback 1 Event Loop (Libuv) Task 2 Task 3 Return 1 Task 4

major architectural styles Distributed Hierarchical Data Flow Implicit Asynchronous

critical analysis Benefits: Because of its single-threaded, non-blocking scheme, Node can support nearly 1 million concurrent connections Asynchronous, event-based scheme allows for scalability, lower memory usage & CPU overhead Can be used to implement an entire JavaScript-based web application Requests are acknowledged quickly due to asynchronous nature Native JSON handling Easy RESTful services Speedy native bindings in C Due to its real-time nature, it s possible to process files while they are being uploaded

critical analysis Best suited for: REST + JSON APIs Backend for single-page web apps with same language for client and server Quick prototyping Rapidly evolving applications: media sites, marketing, etc. Chat applications Ideal for computing and orchestration tasks divided using worker processes

critical analysis Limitations: Node & V8 runtime engine are tightly coupled Because it is single-threaded, it has a single point of failure for all requests (low fault-tolerance) Developers beware of exception handling Currently lacking standards regarding code quality Without a complete v1.0, backwards-compatibility is bogging down code base

critical analysis Not suited for: CPU-bound tasks Applications needing to process large amounts of data in parallel, unless using worker processes

the future of node Larger clients are seeking to integrate Node.js into their mobile platforms. Increasing enterprise influence vs. popularity among autonomous developers v1.0 release expected by the end of 2014