SlideShare a Scribd company logo
The future of server side JavaScript @olegpodsechin #froscon 20.08.2011
Why use JavaScript on the server? Language of the browser Competition amongst browser vendors means increased performance Code reuse between the server and client, no need for context switching Dynamic language No unnecessary constraints, allows one to mix procedural, object oriented and functional styles Allows for meta programing Data in JSON, no marshalling reduces amount of code
Why use JavaScript on the server? Lingua franca of the web Widely accessible, even to beginning developers Widely available in terms of platforms Decent IDE support Closures work well with asynchronous, real time web Diverse, active,  growing community – http://communityjs.org We are stuck with it for the foreseeable future
It's Trendy
ServerJS != Node Engines Environments Platforms Frameworks
Engines 1996 SpiderMonkey (Mozilla) 1998 Rhino (Mozilla) 2008 Nitro/SquirrelFish (Apple) 2008 V8 (Google) 2011 Chakra (Microsoft) 2012 Nashorn (Oracle)
Rhino JavaScript 1.7 Interpreted or compiled to Java bytecode, allows for continuations Includes new and old features like destructuring assignment (var {a, b} = x) and E4X Easy access to Java classes Recent patches improve performance, e.g. InvokeDynamic in Java7
V8 EcmaScript 5 Compiles to native code – fast! Extended via native libraries Primarily targets the web browser
CommonJS Modules - 1.0,  1.1 , Async/A Packages - 1.0,  1.1 Console System Unit Testing –  1.0 Binary - A,  B , C, D, E, Lite, F IO -  A , B, C Filesystem -  A , B JSGI - 0.2,  0.3 HttpClient –  A , B
CommonJS modules // math.js exports.add = function(a, b) {  return a + b; } // server.js var add = require('math').add; console.log(add(2, 2)); // client.js ???
CommonJS packages // package.json { &quot;name&quot;: &quot;hello&quot;, &quot;version&quot;: &quot;0.1.0&quot;, &quot;description&quot;: &quot;Hello world package&quot;, &quot;keywords&quot;: [&quot;hello&quot;, &quot;world&quot;], &quot;author&quot;: &quot;John Smith <john@smith.com>&quot;, &quot;main&quot;: &quot;./lib/hello.js&quot;, &quot;dependencies&quot;: {&quot;whatever&quot; : &quot;1&quot;}, &quot;engines&quot; : [&quot;v8&quot;, &quot;node&quot;, &quot;rhino&quot;], }
Future of CommonJS http://groups.google.com/group/commonjs Node mostly ignored CommonJS AMD split out into separate mailing list UncommonJS https://github.com/kriskowal/uncommonjs
Environments 1996 Netscape Livewire  1998 Helma (Rhino) 2007 AppJet (Rhino) 2008 CouchDB / Couch Apps (SpiderMonkey) 2008 RingoJS (Rhino) 2009 Narwhal (Rhino, V8, SpiderMonkey) 2009 Node (V8) 2010 Akshell (V8) 2011 Wakanda (Nitro) Over 30 in total http://wiki.commonjs.org/wiki/Implementations
Sync  vs. Async http.get(url1) + http.get(url2)
Sync vs.  Async function add(callback) { http.get(url1, function(response1) { var part1 = response1.data; http.get(url2, function(response2) { var part2 = response2.data; callback(part1 + part2); } } }
Interoperability Pure JavaScript CommonJS modules can run in any environment Templating, parsing, formatting, encoding – what else? Anything that does I/O must expose either a synchronous or an asynchronous API Dictates the style of interface exposed by higher level packages, e.g. database driver, ORM
API vs. Implementation Asynchronous, implement Node API Node RhiNodeII - https://github.com/lhofhansl/RhiNodeII SpiderNode - https://github.com/zpao/spidernode Node.NET - https://github.com/dnewcome/Node.net Synchronous, implement CommonJS API Ringo - https://github.com/ringo/ringojs Narwhal - https://github.com/280north/narwhal Common Node – https://github.com/olegp/common-node
Common Node Implements a number of  synchronous  CommonJS specifications on top of Node Uses node-fibers  Uses co routines or multiple stacks within the same process not a fork or a hack Google's Traceur to support latest language features Bridges the gap between Ringo and Node, sync and async Fibers, HTTP proxy code examples & benchmarks
 
 
 
Platforms Node Joyent, Heroku, Nodejitsu, Nodester, Nodesocket, CloudFoundry Ringo Erbix, AppEngine & any other Java platform Akshell
Frameworks ServerJS is missing a Rails like framework Asynchronous DIY using Connect, Express etc. with Node Less of a problem, since Node is often used as glue  Synchronous DIY using JSGI, Stick etc. with RingoJS Lack of a solid framework more of an issue
Trends Wider adoption Front end developers First time developers - http://www.codecademy.com Enterprises moving off legacy systems Java, PHP New operating systems Windows, mobile devices (but not WebOS)
Trends Web IDEs, XaaS Cloud9 – http://www.cloud9ide.com Akshell – http://www.akshell.com Compile to JavaScript languages CoffeeScript, AltJS http://altjs.org & http://notjs.org Extensible systems, crowd sourced functionality Think WordPress plugins + platform Locker Project http://lockerproject.org
Thank you! Questions? @olegpodsechin

More Related Content

PPT
Common Node
PPTX
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
PDF
Chromium: NaCl and Pepper API
PPTX
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
PDF
Functional MCU programming
PDF
Middleware as Code with mruby
PDF
マイクロサービスバックエンドAPIのためのRESTとgRPC
PDF
(phpconftw2012) PHP as a Middleware in Embedded Systems
Common Node
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
Chromium: NaCl and Pepper API
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Functional MCU programming
Middleware as Code with mruby
マイクロサービスバックエンドAPIのためのRESTとgRPC
(phpconftw2012) PHP as a Middleware in Embedded Systems

What's hot (20)

PPSX
Webpack & EcmaScript 6 (Webelement #32)
PDF
Fix: static code analysis into our project
PDF
Python for IoT, A return of experience
PPTX
3 Things Everyone Knows About Node JS That You Don't
PDF
Golang Project Layout and Practice
PDF
markedj: The best of markdown processor on JVM
PDF
A Look at Command Line Swift
PDF
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
PDF
An Introduction of Node Package Manager (NPM)
PDF
The Parenscript Common Lisp to JavaScript compiler
PDF
Building GUI App with Electron and Lisp
PDF
Cache in Chromium: Disk Cache
PPTX
Data Management and Streaming Strategies in Drakensang Online
PPTX
Mongo db - How we use Go and MongoDB by Sam Helman
PDF
蔡学镛 Rebol漫谈
PDF
Understanding how concurrency work in os
PDF
The Future of library dependency management of Ruby
PDF
Introduction to protocol buffer
PDF
Lunch and Learn - FFmpeg
PDF
Calling java from a bash script 5
Webpack & EcmaScript 6 (Webelement #32)
Fix: static code analysis into our project
Python for IoT, A return of experience
3 Things Everyone Knows About Node JS That You Don't
Golang Project Layout and Practice
markedj: The best of markdown processor on JVM
A Look at Command Line Swift
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
An Introduction of Node Package Manager (NPM)
The Parenscript Common Lisp to JavaScript compiler
Building GUI App with Electron and Lisp
Cache in Chromium: Disk Cache
Data Management and Streaming Strategies in Drakensang Online
Mongo db - How we use Go and MongoDB by Sam Helman
蔡学镛 Rebol漫谈
Understanding how concurrency work in os
The Future of library dependency management of Ruby
Introduction to protocol buffer
Lunch and Learn - FFmpeg
Calling java from a bash script 5
Ad

Similar to The future of server side JavaScript (20)

PDF
CommonJS Frameworks
PPT
JS everywhere 2011
PDF
Node.js
PDF
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
PDF
Developing realtime apps with Drupal and NodeJS
PPT
Node js presentation
PDF
Appenginejs (old presentation)
PDF
Nodejs - A quick tour (v5)
PPT
Server side JavaScript: going all the way
PDF
Nodejs - Should Ruby Developers Care?
PDF
Node.js for Rubists
KEY
Dcjq node.js presentation
PDF
JavaScript Modules Done Right
KEY
Node.js - A practical introduction (v2)
KEY
NodeJS
PPTX
Introduction to Node.js
PPTX
Beginners Node.js
PDF
Matthew Eernisse, NodeJs, .toster {webdev}
PDF
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
PDF
JSLab.Руслан Шевченко."JavaScript как платформа компиляции"
CommonJS Frameworks
JS everywhere 2011
Node.js
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
Developing realtime apps with Drupal and NodeJS
Node js presentation
Appenginejs (old presentation)
Nodejs - A quick tour (v5)
Server side JavaScript: going all the way
Nodejs - Should Ruby Developers Care?
Node.js for Rubists
Dcjq node.js presentation
JavaScript Modules Done Right
Node.js - A practical introduction (v2)
NodeJS
Introduction to Node.js
Beginners Node.js
Matthew Eernisse, NodeJs, .toster {webdev}
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JSLab.Руслан Шевченко."JavaScript как платформа компиляции"
Ad

More from Oleg Podsechin (11)

PDF
Why SaaS (in Helsinki)?
PDF
Staying safe in the cloud
PDF
Tips from angular js users anonymous
PPT
AngularJS - the folly of choice
PDF
Lean and mean MongoDB
PPT
PPT
What every developer can learn from startups
PPT
Current State of Server Side JavaScript
PPT
On Platforms
PPT
PPT
Grid and Cloud Computing Intro
Why SaaS (in Helsinki)?
Staying safe in the cloud
Tips from angular js users anonymous
AngularJS - the folly of choice
Lean and mean MongoDB
What every developer can learn from startups
Current State of Server Side JavaScript
On Platforms
Grid and Cloud Computing Intro

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced Soft Computing BINUS July 2025.pdf
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Chapter 3 Spatial Domain Image Processing.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
GamePlan Trading System Review: Professional Trader's Honest Take
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced Soft Computing BINUS July 2025.pdf

The future of server side JavaScript

  • 1. The future of server side JavaScript @olegpodsechin #froscon 20.08.2011
  • 2. Why use JavaScript on the server? Language of the browser Competition amongst browser vendors means increased performance Code reuse between the server and client, no need for context switching Dynamic language No unnecessary constraints, allows one to mix procedural, object oriented and functional styles Allows for meta programing Data in JSON, no marshalling reduces amount of code
  • 3. Why use JavaScript on the server? Lingua franca of the web Widely accessible, even to beginning developers Widely available in terms of platforms Decent IDE support Closures work well with asynchronous, real time web Diverse, active, growing community – http://communityjs.org We are stuck with it for the foreseeable future
  • 5. ServerJS != Node Engines Environments Platforms Frameworks
  • 6. Engines 1996 SpiderMonkey (Mozilla) 1998 Rhino (Mozilla) 2008 Nitro/SquirrelFish (Apple) 2008 V8 (Google) 2011 Chakra (Microsoft) 2012 Nashorn (Oracle)
  • 7. Rhino JavaScript 1.7 Interpreted or compiled to Java bytecode, allows for continuations Includes new and old features like destructuring assignment (var {a, b} = x) and E4X Easy access to Java classes Recent patches improve performance, e.g. InvokeDynamic in Java7
  • 8. V8 EcmaScript 5 Compiles to native code – fast! Extended via native libraries Primarily targets the web browser
  • 9. CommonJS Modules - 1.0, 1.1 , Async/A Packages - 1.0, 1.1 Console System Unit Testing – 1.0 Binary - A, B , C, D, E, Lite, F IO - A , B, C Filesystem - A , B JSGI - 0.2, 0.3 HttpClient – A , B
  • 10. CommonJS modules // math.js exports.add = function(a, b) { return a + b; } // server.js var add = require('math').add; console.log(add(2, 2)); // client.js ???
  • 11. CommonJS packages // package.json { &quot;name&quot;: &quot;hello&quot;, &quot;version&quot;: &quot;0.1.0&quot;, &quot;description&quot;: &quot;Hello world package&quot;, &quot;keywords&quot;: [&quot;hello&quot;, &quot;world&quot;], &quot;author&quot;: &quot;John Smith <john@smith.com>&quot;, &quot;main&quot;: &quot;./lib/hello.js&quot;, &quot;dependencies&quot;: {&quot;whatever&quot; : &quot;1&quot;}, &quot;engines&quot; : [&quot;v8&quot;, &quot;node&quot;, &quot;rhino&quot;], }
  • 12. Future of CommonJS http://groups.google.com/group/commonjs Node mostly ignored CommonJS AMD split out into separate mailing list UncommonJS https://github.com/kriskowal/uncommonjs
  • 13. Environments 1996 Netscape Livewire 1998 Helma (Rhino) 2007 AppJet (Rhino) 2008 CouchDB / Couch Apps (SpiderMonkey) 2008 RingoJS (Rhino) 2009 Narwhal (Rhino, V8, SpiderMonkey) 2009 Node (V8) 2010 Akshell (V8) 2011 Wakanda (Nitro) Over 30 in total http://wiki.commonjs.org/wiki/Implementations
  • 14. Sync vs. Async http.get(url1) + http.get(url2)
  • 15. Sync vs. Async function add(callback) { http.get(url1, function(response1) { var part1 = response1.data; http.get(url2, function(response2) { var part2 = response2.data; callback(part1 + part2); } } }
  • 16. Interoperability Pure JavaScript CommonJS modules can run in any environment Templating, parsing, formatting, encoding – what else? Anything that does I/O must expose either a synchronous or an asynchronous API Dictates the style of interface exposed by higher level packages, e.g. database driver, ORM
  • 17. API vs. Implementation Asynchronous, implement Node API Node RhiNodeII - https://github.com/lhofhansl/RhiNodeII SpiderNode - https://github.com/zpao/spidernode Node.NET - https://github.com/dnewcome/Node.net Synchronous, implement CommonJS API Ringo - https://github.com/ringo/ringojs Narwhal - https://github.com/280north/narwhal Common Node – https://github.com/olegp/common-node
  • 18. Common Node Implements a number of synchronous CommonJS specifications on top of Node Uses node-fibers Uses co routines or multiple stacks within the same process not a fork or a hack Google's Traceur to support latest language features Bridges the gap between Ringo and Node, sync and async Fibers, HTTP proxy code examples & benchmarks
  • 19.  
  • 20.  
  • 21.  
  • 22. Platforms Node Joyent, Heroku, Nodejitsu, Nodester, Nodesocket, CloudFoundry Ringo Erbix, AppEngine & any other Java platform Akshell
  • 23. Frameworks ServerJS is missing a Rails like framework Asynchronous DIY using Connect, Express etc. with Node Less of a problem, since Node is often used as glue Synchronous DIY using JSGI, Stick etc. with RingoJS Lack of a solid framework more of an issue
  • 24. Trends Wider adoption Front end developers First time developers - http://www.codecademy.com Enterprises moving off legacy systems Java, PHP New operating systems Windows, mobile devices (but not WebOS)
  • 25. Trends Web IDEs, XaaS Cloud9 – http://www.cloud9ide.com Akshell – http://www.akshell.com Compile to JavaScript languages CoffeeScript, AltJS http://altjs.org & http://notjs.org Extensible systems, crowd sourced functionality Think WordPress plugins + platform Locker Project http://lockerproject.org
  • 26. Thank you! Questions? @olegpodsechin