SlideShare a Scribd company logo
1 of 33
2011-11-29




        STATE OF THE ART
     SERVER-SIDE JAVASCRIPT


@amorgaut - Alexandre Morgaut               4d.com
@ThibArg - Thibaud Arguillere           Wakanda.org
HISTORY
BIRTH
•   1995
    Mocha > LiveScript > JavaScript

•   1996
    Microsoft JScript (IE4)
    NetScape Enterprise Server 2
    aka LiveWire/iPlanet

•   1997
    ECMAScript 1
    “DHTML”
    Windows IIS 3
MATURITY
•   1998 - HTML/XML DOM, Sun/Mozilla Rhino
•   1999 - ECMAScript 3, XMLHttpRequest, HTML 4
•   2000 - ActionScript, Helma Hop
•   2001 - JSON, Apple JavaScript OSA
•   2002 - JSLint, “Phoenix” (Firefox)
•   2003 - JavaScript Adobe Press, JScript .NET
•   2004 - E4X , “Web 2.0”, JSDB
•   2005 - Prototype.js, “Ajax”
•   2006 - Firebug, jQuery, “Comet”, APE, “HTML5”
•   2007 - SitePoint Persevere, Rhino on Rails
SSJS: THE COMEBACK
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > CommonJS
    Node.js
    v8cgi, GPSEE
    ECMAScript 5

•   2010
    Helma NG > RingoJS
    Sun Phobos

•   2011
    Wakanda
    CoffeeScript
SSJS: THE COMEBACK
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > CommonJS
    Node.js
    v8cgi, GPSEE
    ECMAScript 5

•   2010
    Helma NG > RingoJS
    Sun Phobos

•   2011
    Wakanda
    CoffeeScript
SSJS: THE COMEBACK
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > CommonJS
    Node.js
    v8cgi, GPSEE
    ECMAScript 5

•   2010
    Helma NG > RingoJS
    Sun Phobos

•   2011
    Wakanda
    CoffeeScript
SSJS: THE COMEBACK
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > CommonJS
    Node.js
    v8cgi, GPSEE
    ECMAScript 5

•   2010
    Helma NG > RingoJS
    Sun Phobos

•   2011
    Wakanda
    CoffeeScript
60+ EXISTING SOLUTIONS




http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions
ENGINES
C+
                                                                                                                                         +
                                          C
 SpiderMonkey                                                webkit JavaScriptCore: JSC
          3 JIT Compilers:                                                SquirrelFish Extreme: SFX aka Nitro
TraceMonkey, JägerMonkey, & IonMonkey                                              (JIT Compiler inside)




                                Jav                                                                        C+
                                   a                                                                         +
            Rhino                                                                                  V8
  Interpreted or Compiled execution                                                   JIT Compiler: CrankShaft



                                                                                     C+
                                                                                       +
                                         Trident: MSHTML
                                              Chakra
                                        -> Classic JScript, Managed JScript, & JScript.NET

                                                                                                                        C+
                             C+                                                                                           +
                               +
            Tamarin                                                                                     Carakan
       JIT Compiler: NanoJIT                                                                 Previously: Linear A, Linear B, Futhark
     -> ActionScript / “ECMAScript 4”
CLIENT-SIDE

SpiderMonkey             JavaScriptCore



    Rhino                      V8



 Tamarin    Trident / Chakra   Carakan / Futhark
SERVER-SIDE


SpiderMonkey                                       JavaScriptCore
         Narwhal,
                                                        Narwhal,
 CouchDB, MongoDB, JSDB,
                                                        Wakanda
  APE, GPSEE, SpiderNode
            ...



        Rhino                                             V8
           Narwhal,                                      Narwhal,
   Helma / RingoJS, AppJet,                            v8cgi, Akshell
 Persevere, Phobos, RhiNodeII                            Node.js
              ...


                                Trident / Chakra
                                        IronJS,
                                     Node.NET
                                     JScript.NET
BENCHMARKS



 and what they worth....
BROWSERS WAR II
                                          (MAY 2009)




http://www.maximumpc.com/article/features/browser_brouhaha_your_maximum_guide_browsers_today_and_tomorrow?page=0,6
PERSEVERE & JAVASCRIPTDB
                                 (APRIL 2009)




 http://www.sitepen.com/blog/2009/04/20/javascriptdb-perseveres-new-high-performance-storage-engine/
NODE VS THIN VS NARWHAL
      (SEPTEMBER 2009)

                                 300 concurrent clients

                                 completed requests:
                                 thin 36045
                                 node 35668
                                 narwhal 2921

                                 > summary(node300$ttime)
                                    Min. 1st Qu. Median      Mean 3rd Qu.    Max.
                                    12.0    66.0   112.0    239.4   157.0 12200.0

                                 > summary(thin300$ttime)
                                    Min. 1st Qu. Median      Mean 3rd Qu.    Max.
                                    71.0    84.0    87.0    208.7   107.0 23950.0

                                 > summary(narwhal300$ttime)
                                    Min. 1st Qu. Median      Mean 3rd Qu.    Max.
                                     928    2837    2935     2921    3018    8759




        http://four.livejournal.com/1019177.html
RINGOJS VS NODEJS
   (SEPTEMBER 2010)




   http://hns.github.com/2010/09/21/benchmark.html
SPIDERMONKEY


                                                             1.5 is ~ Firefox 2.0 (and ES-3)
                                                             1.7 is ~ Firefox 3.0
                                                             1.8 is ~ Firefox 3.6
                                                             1.8.5 + JITs is ~ Firefox 4




http://www.page.ca/~wes/SpiderMonkey/Perf/sunspider_history.png
SUNSPIDER 0.9.1
                              (AUGUST 2011)

        7
        8
        6
        5
        4
        3
        2
        1
http://expansive-derivation.ossreleasefeed.com/2011/08/javascript-performance-test-results-with-sunspider/
MAIN CONCEPTS
INTEGRATION-ORIENTED

• Rhino

  - Interaction with Java (APIs and objects)
  - Helma, Persevere, Narwhal, RingoJS, Sun Phobos...

• JScript   .Net
  - Interaction with MS .NET (APIs and objects)
  - IronJS, Node.NET
COMMON JAVASCRIPT
•   Working Groups:
    -   CommonJS
    -   WHATWG
    -   W3C
    -   ECMA TC39

•   Ubiquity not only for ECMAScript

•   HTML5 is also known as: “Web Applications 1.0”

•   Asynchronous & Synchronous APIs
ASYNC. EVENT-BASED
                           Node.js like



• Browser   Event-Loop on the Server

• An   Event Loop in one single thread

• Cooperative   («one at a time») with async. callbacks

• Node.js   (V8), SpiderNode, RhiNodeII, Node.NET
SINGLE & MULTI THREADING
                                   One context per thread


SINGLE                                                 MULTI
•   Low memory usage                                    •   Vertical scalability (multi-core)
•   Potentially handle lot of requests                  •   Thread-safety for concurrent access
•   Cooperative                                         •   Preemptive: Parallel code execution
•   Shared context                                      •   Allow Synchronous APIs
•   Use mostly one core                                 •   Uses easily all available cores


    Notes:
    - an event loop can generate some other threads
    - multi-thread architectures can run event loops in some of their threads
DATABASE-DRIVEN
•   Document Store
    -   CouchDB, MongoDB

•   Key/value Store
    -   Riak

•   Object Store
    -   Wakanda

•   Push Store
    -   APE
APIS - PACKAGES
COMMONJS
•   Modules

•   Packages                           •   Binary

•   Promises                           •   File

•   System                             •   JSGI

•   Unit-Testing                       •   Stream




                   http://wiki.commonjs.org/wiki/CommonJS
NODE ASYNC APIS
•   Buffer                     •   Process

•   Events                     •   Streams

•   File                       •   Timers

•   Net                        •   ...

•   OS




             http://nodejs.org/docs/v0.5.5/api/
W3C / HTML5
       & OTHER STANDARDS
•   Console             •   Structured clones

•   Blob, Blob URL*     •   Typed Arrays*

•   DataView*           •   Web Sockets

•   File / FileSystem   •   Web Storage, Indexed DB

•   Modules*            •   Web Workers

•   Progress Events     •   XHR 2
PACKAGES & MODULES
• github: CommonJS     modules in projects (Persevere, Narwhal, RingoJS, ...)

• NPM: Node   Package Manager (thousands packages)

• CPM: CommonJS      Package Manager (new)

• PINF: Universal   module loader
CREDITS

Thanks for their contributions to

• Wesley   Garland

• Ondrej   Zara
STATE OF THE ART
     SERVER-SIDE JAVASCRIPT
                     The End


                See us at Wakanday aka
        JS.everywhere(Boston, October, 15)




@amorgaut                                   4d.com
@thibarg                               Wakanda.org
@wakanday                              Wakanday.org

More Related Content

What's hot

Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
Marco Pas
 
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyスローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
Yusuke Yamamoto
 
Jvm operation casual talks
Jvm operation casual talksJvm operation casual talks
Jvm operation casual talks
Yusaku Watanabe
 
Torquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosTorquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundos
Bruno Oliveira
 
Java in flames
Java in flamesJava in flames
Java in flames
Isuru Perera
 

What's hot (20)

MongoTokyo
MongoTokyoMongoTokyo
MongoTokyo
 
Aloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRubyAloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRuby
 
近未来的並列 LL
近未来的並列 LL近未来的並列 LL
近未来的並列 LL
 
Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
 
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyスローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
 
ClassLoader Leaks
ClassLoader LeaksClassLoader Leaks
ClassLoader Leaks
 
When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torquebox
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
Jvm internals
Jvm internalsJvm internals
Jvm internals
 
MySQL-and-virtualization
MySQL-and-virtualizationMySQL-and-virtualization
MySQL-and-virtualization
 
Jvm operation casual talks
Jvm operation casual talksJvm operation casual talks
Jvm operation casual talks
 
XT Best Practices
XT Best PracticesXT Best Practices
XT Best Practices
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
Torquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosTorquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundos
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
 
Fight with Metaspace OOM
Fight with Metaspace OOMFight with Metaspace OOM
Fight with Metaspace OOM
 
Java in flames
Java in flamesJava in flames
Java in flames
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
 
µjax in 30 minutes
µjax in 30 minutesµjax in 30 minutes
µjax in 30 minutes
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
 

Viewers also liked

Lançando versões em um clique - deploy contínuo
Lançando versões em um clique - deploy contínuoLançando versões em um clique - deploy contínuo
Lançando versões em um clique - deploy contínuo
Hélio Medeiros
 

Viewers also liked (20)

Twitter in the Internet of Things
Twitter in the Internet of ThingsTwitter in the Internet of Things
Twitter in the Internet of Things
 
The Web is Open. Let's Keep It That Way
The Web is Open. Let's Keep It That WayThe Web is Open. Let's Keep It That Way
The Web is Open. Let's Keep It That Way
 
Social media demographics for extension
Social media demographics for extensionSocial media demographics for extension
Social media demographics for extension
 
Scrum and Kanban applicability
Scrum and Kanban applicabilityScrum and Kanban applicability
Scrum and Kanban applicability
 
Chocolate, LEGO and Scrum Jambalaya at SGNOLA2014
Chocolate, LEGO and Scrum Jambalaya at SGNOLA2014Chocolate, LEGO and Scrum Jambalaya at SGNOLA2014
Chocolate, LEGO and Scrum Jambalaya at SGNOLA2014
 
Simplicity: UXLx version
Simplicity: UXLx versionSimplicity: UXLx version
Simplicity: UXLx version
 
Hooks
HooksHooks
Hooks
 
Obfuscation, Golfing and Secret Operators in Perl
Obfuscation, Golfing and Secret Operators in PerlObfuscation, Golfing and Secret Operators in Perl
Obfuscation, Golfing and Secret Operators in Perl
 
Sigma Tau Delta Outreach
Sigma Tau Delta OutreachSigma Tau Delta Outreach
Sigma Tau Delta Outreach
 
Prototyping in the cloud
Prototyping in the cloudPrototyping in the cloud
Prototyping in the cloud
 
What may I do with your data? What do I have to do with your data? Policie...
What may I do with your data? What do I have to do with your data? Policie...What may I do with your data? What do I have to do with your data? Policie...
What may I do with your data? What do I have to do with your data? Policie...
 
Why Apps, Data and Mobile Converge in the Open Cloud
Why Apps, Data and Mobile Converge in the Open CloudWhy Apps, Data and Mobile Converge in the Open Cloud
Why Apps, Data and Mobile Converge in the Open Cloud
 
Lançando versões em um clique - deploy contínuo
Lançando versões em um clique - deploy contínuoLançando versões em um clique - deploy contínuo
Lançando versões em um clique - deploy contínuo
 
Lynne Cazaly - Insights & Connections
Lynne Cazaly - Insights & ConnectionsLynne Cazaly - Insights & Connections
Lynne Cazaly - Insights & Connections
 
Desconf 2011 - Usar e esquecer suas ideias
Desconf 2011 - Usar e esquecer suas ideias    Desconf 2011 - Usar e esquecer suas ideias
Desconf 2011 - Usar e esquecer suas ideias
 
The collaboration network in OSM - the case of Italy
The collaboration network in OSM - the case of Italy The collaboration network in OSM - the case of Italy
The collaboration network in OSM - the case of Italy
 
Enrique Allen, D Fund - Warm Gun Conference
Enrique Allen, D Fund - Warm Gun ConferenceEnrique Allen, D Fund - Warm Gun Conference
Enrique Allen, D Fund - Warm Gun Conference
 
Questions not Stories, Agile 2013
Questions not Stories, Agile 2013Questions not Stories, Agile 2013
Questions not Stories, Agile 2013
 
Presenting the work of OSMF Working Groups - State of the Map 2013
Presenting the work of OSMF Working Groups - State of the Map 2013Presenting the work of OSMF Working Groups - State of the Map 2013
Presenting the work of OSMF Working Groups - State of the Map 2013
 
Make your web apps "Go, Go" like Power Rangers
Make your web apps "Go, Go" like Power RangersMake your web apps "Go, Go" like Power Rangers
Make your web apps "Go, Go" like Power Rangers
 

Similar to State of the art server side java script

Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Alexandre Morgaut
 
appborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-systemappborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-system
endian7000
 
J Ruby Kungfu Rails
J Ruby   Kungfu RailsJ Ruby   Kungfu Rails
J Ruby Kungfu Rails
Daniel Lv
 

Similar to State of the art server side java script (20)

State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
 
Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012
Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012
Wakanda: NoSQL & SSJS for Model-driven Web Applications - SourceDevCon 2012
 
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
Wakanda: NoSQL for Model-Driven Web applications - NoSQL matters 2012
 
appborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-systemappborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-system
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
J Ruby Kungfu Rails
J Ruby   Kungfu RailsJ Ruby   Kungfu Rails
J Ruby Kungfu Rails
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
 
Can we run the Whole Web on Apache Sling?
Can we run the Whole Web on Apache Sling?Can we run the Whole Web on Apache Sling?
Can we run the Whole Web on Apache Sling?
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Toster - Understanding the Rails Web Model and Scalability Options
Toster - Understanding the Rails Web Model and Scalability OptionsToster - Understanding the Rails Web Model and Scalability Options
Toster - Understanding the Rails Web Model and Scalability Options
 
Understanding the Rails web model and scalability options
Understanding the Rails web model and scalability optionsUnderstanding the Rails web model and scalability options
Understanding the Rails web model and scalability options
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails
 
Experiences with Power 9 at A*STAR CRC
Experiences with Power 9 at A*STAR CRCExperiences with Power 9 at A*STAR CRC
Experiences with Power 9 at A*STAR CRC
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
 
7 jvm-arguments-Confoo
7 jvm-arguments-Confoo7 jvm-arguments-Confoo
7 jvm-arguments-Confoo
 
Reactive programming with Rxjava
Reactive programming with RxjavaReactive programming with Rxjava
Reactive programming with Rxjava
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 

More from Thibaud Arguillere (6)

Wakanda Australia, 2012-03-07
Wakanda Australia, 2012-03-07Wakanda Australia, 2012-03-07
Wakanda Australia, 2012-03-07
 
Wakanda japan-2012-02-02-slide share
Wakanda japan-2012-02-02-slide shareWakanda japan-2012-02-02-slide share
Wakanda japan-2012-02-02-slide share
 
Decouverte wakanda-2012-01-24
Decouverte wakanda-2012-01-24Decouverte wakanda-2012-01-24
Decouverte wakanda-2012-01-24
 
Wakanda db parisjs-2011-12
Wakanda db parisjs-2011-12Wakanda db parisjs-2011-12
Wakanda db parisjs-2011-12
 
Wakanda presentation, MunichJS, 2011-11-29
Wakanda presentation, MunichJS, 2011-11-29Wakanda presentation, MunichJS, 2011-11-29
Wakanda presentation, MunichJS, 2011-11-29
 
Wakanda dev con-4d-fr-nov2011
Wakanda dev con-4d-fr-nov2011Wakanda dev con-4d-fr-nov2011
Wakanda dev con-4d-fr-nov2011
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

State of the art server side java script

  • 1. 2011-11-29 STATE OF THE ART SERVER-SIDE JAVASCRIPT @amorgaut - Alexandre Morgaut 4d.com @ThibArg - Thibaud Arguillere Wakanda.org
  • 3. BIRTH • 1995 Mocha > LiveScript > JavaScript • 1996 Microsoft JScript (IE4) NetScape Enterprise Server 2 aka LiveWire/iPlanet • 1997 ECMAScript 1 “DHTML” Windows IIS 3
  • 4. MATURITY • 1998 - HTML/XML DOM, Sun/Mozilla Rhino • 1999 - ECMAScript 3, XMLHttpRequest, HTML 4 • 2000 - ActionScript, Helma Hop • 2001 - JSON, Apple JavaScript OSA • 2002 - JSLint, “Phoenix” (Firefox) • 2003 - JavaScript Adobe Press, JScript .NET • 2004 - E4X , “Web 2.0”, JSDB • 2005 - Prototype.js, “Ajax” • 2006 - Firebug, jQuery, “Comet”, APE, “HTML5” • 2007 - SitePoint Persevere, Rhino on Rails
  • 5. SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test 3 • 2009 Narwhal & Jack ServerJS > CommonJS Node.js v8cgi, GPSEE ECMAScript 5 • 2010 Helma NG > RingoJS Sun Phobos • 2011 Wakanda CoffeeScript
  • 6. SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test 3 • 2009 Narwhal & Jack ServerJS > CommonJS Node.js v8cgi, GPSEE ECMAScript 5 • 2010 Helma NG > RingoJS Sun Phobos • 2011 Wakanda CoffeeScript
  • 7. SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test 3 • 2009 Narwhal & Jack ServerJS > CommonJS Node.js v8cgi, GPSEE ECMAScript 5 • 2010 Helma NG > RingoJS Sun Phobos • 2011 Wakanda CoffeeScript
  • 8. SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test 3 • 2009 Narwhal & Jack ServerJS > CommonJS Node.js v8cgi, GPSEE ECMAScript 5 • 2010 Helma NG > RingoJS Sun Phobos • 2011 Wakanda CoffeeScript
  • 11. C+ + C SpiderMonkey webkit JavaScriptCore: JSC 3 JIT Compilers: SquirrelFish Extreme: SFX aka Nitro TraceMonkey, JägerMonkey, & IonMonkey (JIT Compiler inside) Jav C+ a + Rhino V8 Interpreted or Compiled execution JIT Compiler: CrankShaft C+ + Trident: MSHTML Chakra -> Classic JScript, Managed JScript, & JScript.NET C+ C+ + + Tamarin Carakan JIT Compiler: NanoJIT Previously: Linear A, Linear B, Futhark -> ActionScript / “ECMAScript 4”
  • 12. CLIENT-SIDE SpiderMonkey JavaScriptCore Rhino V8 Tamarin Trident / Chakra Carakan / Futhark
  • 13. SERVER-SIDE SpiderMonkey JavaScriptCore Narwhal, Narwhal, CouchDB, MongoDB, JSDB, Wakanda APE, GPSEE, SpiderNode ... Rhino V8 Narwhal, Narwhal, Helma / RingoJS, AppJet, v8cgi, Akshell Persevere, Phobos, RhiNodeII Node.js ... Trident / Chakra IronJS, Node.NET JScript.NET
  • 14. BENCHMARKS and what they worth....
  • 15. BROWSERS WAR II (MAY 2009) http://www.maximumpc.com/article/features/browser_brouhaha_your_maximum_guide_browsers_today_and_tomorrow?page=0,6
  • 16. PERSEVERE & JAVASCRIPTDB (APRIL 2009) http://www.sitepen.com/blog/2009/04/20/javascriptdb-perseveres-new-high-performance-storage-engine/
  • 17. NODE VS THIN VS NARWHAL (SEPTEMBER 2009) 300 concurrent clients completed requests: thin 36045 node 35668 narwhal 2921 > summary(node300$ttime) Min. 1st Qu. Median Mean 3rd Qu. Max. 12.0 66.0 112.0 239.4 157.0 12200.0 > summary(thin300$ttime) Min. 1st Qu. Median Mean 3rd Qu. Max. 71.0 84.0 87.0 208.7 107.0 23950.0 > summary(narwhal300$ttime) Min. 1st Qu. Median Mean 3rd Qu. Max. 928 2837 2935 2921 3018 8759 http://four.livejournal.com/1019177.html
  • 18. RINGOJS VS NODEJS (SEPTEMBER 2010) http://hns.github.com/2010/09/21/benchmark.html
  • 19. SPIDERMONKEY 1.5 is ~ Firefox 2.0 (and ES-3) 1.7 is ~ Firefox 3.0 1.8 is ~ Firefox 3.6 1.8.5 + JITs is ~ Firefox 4 http://www.page.ca/~wes/SpiderMonkey/Perf/sunspider_history.png
  • 20. SUNSPIDER 0.9.1 (AUGUST 2011) 7 8 6 5 4 3 2 1 http://expansive-derivation.ossreleasefeed.com/2011/08/javascript-performance-test-results-with-sunspider/
  • 22. INTEGRATION-ORIENTED • Rhino - Interaction with Java (APIs and objects) - Helma, Persevere, Narwhal, RingoJS, Sun Phobos... • JScript .Net - Interaction with MS .NET (APIs and objects) - IronJS, Node.NET
  • 23. COMMON JAVASCRIPT • Working Groups: - CommonJS - WHATWG - W3C - ECMA TC39 • Ubiquity not only for ECMAScript • HTML5 is also known as: “Web Applications 1.0” • Asynchronous & Synchronous APIs
  • 24. ASYNC. EVENT-BASED Node.js like • Browser Event-Loop on the Server • An Event Loop in one single thread • Cooperative («one at a time») with async. callbacks • Node.js (V8), SpiderNode, RhiNodeII, Node.NET
  • 25. SINGLE & MULTI THREADING One context per thread SINGLE MULTI • Low memory usage • Vertical scalability (multi-core) • Potentially handle lot of requests • Thread-safety for concurrent access • Cooperative • Preemptive: Parallel code execution • Shared context • Allow Synchronous APIs • Use mostly one core • Uses easily all available cores Notes: - an event loop can generate some other threads - multi-thread architectures can run event loops in some of their threads
  • 26. DATABASE-DRIVEN • Document Store - CouchDB, MongoDB • Key/value Store - Riak • Object Store - Wakanda • Push Store - APE
  • 28. COMMONJS • Modules • Packages • Binary • Promises • File • System • JSGI • Unit-Testing • Stream http://wiki.commonjs.org/wiki/CommonJS
  • 29. NODE ASYNC APIS • Buffer • Process • Events • Streams • File • Timers • Net • ... • OS http://nodejs.org/docs/v0.5.5/api/
  • 30. W3C / HTML5 & OTHER STANDARDS • Console • Structured clones • Blob, Blob URL* • Typed Arrays* • DataView* • Web Sockets • File / FileSystem • Web Storage, Indexed DB • Modules* • Web Workers • Progress Events • XHR 2
  • 31. PACKAGES & MODULES • github: CommonJS modules in projects (Persevere, Narwhal, RingoJS, ...) • NPM: Node Package Manager (thousands packages) • CPM: CommonJS Package Manager (new) • PINF: Universal module loader
  • 32. CREDITS Thanks for their contributions to • Wesley Garland • Ondrej Zara
  • 33. STATE OF THE ART SERVER-SIDE JAVASCRIPT The End See us at Wakanday aka JS.everywhere(Boston, October, 15) @amorgaut 4d.com @thibarg Wakanda.org @wakanday Wakanday.org

Editor's Notes

  1. When we started to define the Wakanda project, we did a lot of research and tests before concluding what would be the best language for it on the server and with which engine. We then decided to share with the others what we knew and what we learned. And here come this presentation.\n
  2. \n
  3. Brendan Eich creates JavaScript for NetScape.\n1 year after, he puts it on the server.\nEach time Microsoft followed just one year after.\nThe Server-Side JavaScript is 15 years old.\nBackend developers were not much convinced and mostly choose to ignore it.\n
  4. JavaScript long growing maturity.\nMozilla Rhino and Microsoft IIS were the only ones running JavaScript/JScript on the server.\nJavaScript finally had respected standards, development tools, libraries, frameworks, performances.\n\n
  5. Aptana was well respected for its support of JavaScript and JS frameworks in its Studio.\nWhen they tried to launch their Cloud solution with JS on the server via Jaxer, lot of JS experts were enthusiastic. John Resig immediately shared its own experiences on its blog.\nIn 2008, first presentation of Wakanda at The Ajax Experience ;-)\nA group called ServerJS were created from the Mozilla Developper Tools community with Kevin Dangoor.\nIt became more independent and choose to be renamed CommonJS to create standard server-side & client-side JS APIs.\nNode.js proposed an Async Event-Loop model on the server via the Google V8 JS engine. V8 had good reputation, and the concept looked quite revolutionary to JS developers.\nThe Long time running Helma choose to rename Helma NG for a new brand: RingoJS\n
  6. Aptana was well respected for its support of JavaScript and JS frameworks in its Studio.\nWhen they tried to launch their Cloud solution with JS on the server via Jaxer, lot of JS experts were enthusiastic. John Resig immediately shared its own experiences on its blog.\nIn 2008, first presentation of Wakanda at The Ajax Experience ;-)\nA group called ServerJS were created from the Mozilla Developper Tools community with Kevin Dangoor.\nIt became more independent and choose to be renamed CommonJS to create standard server-side & client-side JS APIs.\nNode.js proposed an Async Event-Loop model on the server via the Google V8 JS engine. V8 had good reputation, and the concept looked quite revolutionary to JS developers.\nThe Long time running Helma choose to rename Helma NG for a new brand: RingoJS\n
  7. Aptana was well respected for its support of JavaScript and JS frameworks in its Studio.\nWhen they tried to launch their Cloud solution with JS on the server via Jaxer, lot of JS experts were enthusiastic. John Resig immediately shared its own experiences on its blog.\nIn 2008, first presentation of Wakanda at The Ajax Experience ;-)\nA group called ServerJS were created from the Mozilla Developper Tools community with Kevin Dangoor.\nIt became more independent and choose to be renamed CommonJS to create standard server-side & client-side JS APIs.\nNode.js proposed an Async Event-Loop model on the server via the Google V8 JS engine. V8 had good reputation, and the concept looked quite revolutionary to JS developers.\nThe Long time running Helma choose to rename Helma NG for a new brand: RingoJS\n
  8. \n
  9. \n
  10. Spidermonkey now looks more C++ now but its API are still in C\nComplex Webkit naming\nTrident: Windows only\n
  11. \n
  12. SpiderMonkey: Narwhal, CouchDB, MongoDB, JSDB, APE, GPSEE, SpiderNode, ...\nJavaScriptCore: Narwhal, Wakanda\nV8: Narwhal, v8cgi, Akshell, Node.js\nRhino: Narwhal, Helma / RingoJS, AppJet, Persevere, Phobos, RhinodeII, ...\nTrident / Chackra: ASP, WSH, .NET, IronJS, Node.NET\n
  13. \n
  14. The growth of WebApps with Ajax Frameworks requires more powerful engines \n-> Browsers War II.\n
  15. COmparing js with other technologies. Here, persevere is the best.\n
  16. Who understood those stats ? ;-)\n
  17. \n
  18. \n
  19. The core engines running on the server have finally reach acceptable performances, with quite comparable results.\nThey all actively continue their own performance enhancement.\nECMAScript 5 in strict mode also help to provide better internal optimizations.\n \n
  20. \n
  21. These solutions were mostly the ones which made JavaScript survive on the server\nAll missing stuff were covered by the environment in which they are running.\nIt’s then easy to make it’s application platform dependent which often what front-end JavaScript developers want to prevent.\n-> so then came the work on standards for the “missing stuff” ;-)\n
  22. “JavaScript” is available in all modern mobile phones, tablets, Internet box, and even some remote control and TVs.\n- It is quite everywhere, but, back on the server, the JS engines only provide the Core of the language, mostly as defined by ECMAScript with ongoing features. \n- Ajax, Web 2.0, & HTML5 provided a very large & active open source community (first community on Github)\n- At least 4 important Working Groups are doing their best to make it better and better.\n- Common JavaScript oriented implementations want to enhance interoperability between each of them, hopefully more quickly than how it came on client-side.\n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \nNPM: Author ?\nCPM: by Kris Zyp\nPINF: by Christoph Dorn\n
  31. \n
  32. \n