Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
State of the Art
     Server-Side JavaScript

              2011-12-06




@amorgaut                     4d.com
History
Birth
•   1995
    Mocha > LiveScript > JavaScript

•   1996
    Microsoft JScript (IE4)
    NetScape Enterprise Server 2
...
Maturity
•   1998 - HTML/XML DOM, Sun/Mozilla Rhino

•   1999 - ECMAScript 3, XMLHttpRequest, HTML 4

•   2000 - ActionScr...
SSJS: The comeback
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > Commo...
SSJS: The comeback
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > Commo...
SSJS: The comeback
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > Commo...
SSJS: The comeback
•   2008
    Aptana Jaxer
    CouchDB
    Acid Test 3

•   2009
    Narwhal & Jack
    ServerJS > Commo...
60+ existing solutions




http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions
Engines
C+
                                                                                                                       ...
CLIENT-SIDE

SpiderMonkey             JavaScriptCore



    Rhino                      V8



 Tamarin    Trident / Chakra ...
SERVER-SIDE


SpiderMonkey                                       JavaScriptCore
         Narwhal,
                        ...
Benchmarks
 and what they worth....
Browsers War II
                                           (MAY 2009)




http://www.maximumpc.com/article/features/browse...
Persevere & JavaScriptDB
                                    (April 2009)




 http://www.sitepen.com/blog/2009/04/20/java...
Node vs Thin vs Narwhal
      (September 2009)

                                300 concurrent clients

                  ...
RingoJS vs NodeJS
   (September 2010)




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


                                                            1.5 is ~ Firefox 2.0 (and ES-3)
               ...
Sunspider 0.9.1
                                  (August 2011)

         7
         8
         6
         5
         4
  ...
Main Concepts
Integration-Oriented

•   Rhino
    - Interaction with Java (APIs and objects)
    - Helma, Persevere, Narwhal, RingoJS, S...
Common JavaScript
• Working Groups:
  -   CommonJS
  -   WHATWG
  -   W3C
  -   ECMA TC39

• Ubiquity not only for ECMAScr...
Async. Event-based
                            Node.js like



•   Browser Event-Loop on the Server

•   An Event Loop in ...
Single & multi threading
                                   One context per thread


SINGLE                               ...
Database-driven
• Document Store
 -   CouchDB, MongoDB

• Key/value Store
 -   Riak

• Object Store
 -   Wakanda

• Push S...
APIs - Packages
CommonJS

Modules                  Packages                      Promises

     •    System                     •   File

...
Node
           Async APIs
•   Buffer                            •   Process


•   Events                            •   S...
W3C / HTML5 / ES.Next
  & other standards
•   Console             •   Structured clones

•   Blob, Blob URL*     •   Typed...
Packages & Modules

•   github: CommonJS modules in projects    (Persevere, Narwhal, RingoJS, ...)




•   NPM: Node Packa...
State of the Art
      Server-Side JavaScript
                     The End

            or... the beginning....

@amorgaut...
Upcoming SlideShare
Loading in …5
×

of

State of the art: Server-side JavaScript - MoscowJS Slide 1 State of the art: Server-side JavaScript - MoscowJS Slide 2 State of the art: Server-side JavaScript - MoscowJS Slide 3 State of the art: Server-side JavaScript - MoscowJS Slide 4 State of the art: Server-side JavaScript - MoscowJS Slide 5 State of the art: Server-side JavaScript - MoscowJS Slide 6 State of the art: Server-side JavaScript - MoscowJS Slide 7 State of the art: Server-side JavaScript - MoscowJS Slide 8 State of the art: Server-side JavaScript - MoscowJS Slide 9 State of the art: Server-side JavaScript - MoscowJS Slide 10 State of the art: Server-side JavaScript - MoscowJS Slide 11 State of the art: Server-side JavaScript - MoscowJS Slide 12 State of the art: Server-side JavaScript - MoscowJS Slide 13 State of the art: Server-side JavaScript - MoscowJS Slide 14 State of the art: Server-side JavaScript - MoscowJS Slide 15 State of the art: Server-side JavaScript - MoscowJS Slide 16 State of the art: Server-side JavaScript - MoscowJS Slide 17 State of the art: Server-side JavaScript - MoscowJS Slide 18 State of the art: Server-side JavaScript - MoscowJS Slide 19 State of the art: Server-side JavaScript - MoscowJS Slide 20 State of the art: Server-side JavaScript - MoscowJS Slide 21 State of the art: Server-side JavaScript - MoscowJS Slide 22 State of the art: Server-side JavaScript - MoscowJS Slide 23 State of the art: Server-side JavaScript - MoscowJS Slide 24 State of the art: Server-side JavaScript - MoscowJS Slide 25 State of the art: Server-side JavaScript - MoscowJS Slide 26 State of the art: Server-side JavaScript - MoscowJS Slide 27 State of the art: Server-side JavaScript - MoscowJS Slide 28 State of the art: Server-side JavaScript - MoscowJS Slide 29 State of the art: Server-side JavaScript - MoscowJS Slide 30 State of the art: Server-side JavaScript - MoscowJS Slide 31 State of the art: Server-side JavaScript - MoscowJS Slide 32
Upcoming SlideShare
RevolucióN Agraria E Industrial
Next
Download to read offline and view in fullscreen.

3 Likes

Share

Download to read offline

State of the art: Server-side JavaScript - MoscowJS

Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

State of the art: Server-side JavaScript - MoscowJS

  1. 1. State of the Art Server-Side JavaScript 2011-12-06 @amorgaut 4d.com
  2. 2. History
  3. 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. 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. 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 ECMAScript 5.1
  6. 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 ECMAScript 5.1
  7. 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 ECMAScript 5.1
  8. 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 ECMAScript 5.1
  9. 9. 60+ existing solutions http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions
  10. 10. Engines
  11. 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. 12. CLIENT-SIDE SpiderMonkey JavaScriptCore Rhino V8 Tamarin Trident / Chakra Carakan / Futhark
  13. 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. 14. Benchmarks and what they worth....
  15. 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. 16. Persevere & JavaScriptDB (April 2009) http://www.sitepen.com/blog/2009/04/20/javascriptdb-perseveres-new-high-performance-storage-engine/
  17. 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. 18. RingoJS vs NodeJS (September 2010) http://hns.github.com/2010/09/21/benchmark.html
  19. 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. 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/
  21. 21. Main Concepts
  22. 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. 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. 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. 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. 26. Database-driven • Document Store - CouchDB, MongoDB • Key/value Store - Riak • Object Store - Wakanda • Push Store - APE
  27. 27. APIs - Packages
  28. 28. CommonJS Modules Packages Promises • System • File • Unit-Testing • JSGI • Binary • Stream http://wiki.commonjs.org/wiki/CommonJS
  29. 29. Node Async APIs • Buffer • Process • Events • Streams • File • Timers • Net • ... • OS http://nodejs.org/docs/v0.5.5/api/
  30. 30. W3C / HTML5 / ES.Next & 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. 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. 32. State of the Art Server-Side JavaScript The End or... the beginning.... @amorgaut 4d.com @thibarg Wakanda.org @wakanday Wakanday.org Thanks to the CommonJS community
  • ssuserf8df5b

    Oct. 13, 2019
  • KwangjeCho

    Jul. 9, 2013
  • robbypelssers

    Dec. 15, 2011

Views

Total views

3,474

On Slideshare

0

From embeds

0

Number of embeds

931

Actions

Downloads

31

Shares

0

Comments

0

Likes

3

×