State of the art: Server-Side JavaScript (ParisJS)

10,531 views
10,056 views

Published on

Lightening talk presented at ParisJS #10 in 15min

Full version should be presented at Wakanday aka
JS.everywhere(Boston, October, 15)

http://wakanday.org

Published in: Technology
2 Comments
10 Likes
Statistics
Notes
  • An updated version has been presented at WebWorkersCamp V during the Open World Forum. The slides are available there: http://www.slideshare.net/alexandre_morgaut/state-of-the-art-server-side-java-script-webworkerscamp-9406069
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • This is the first version of this presentations for a 15min long talk in french
    Other versions will come
    More the half of the informations are not on the slides themselves
    I’ll provide a link to the video once available, if possible with subtitles in english.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
10,531
On SlideShare
0
From Embeds
0
Number of Embeds
125
Actions
Shares
0
Downloads
109
Comments
2
Likes
10
Embeds 0
No embeds

No notes for slide
  • Brendan Eich creates JavaScript for NetScape 1 year after, he puts it on the server Each time Microsoft followed just one year after
  • JavaScript long growing maturity
  • Server-Side JavaScript: the come back
  • Maturité de l’environement (Tools, Standards, libraries) mais aussi montée des performances “ The JavaScript Performance Race”
  • Maturité de l’environement (Tools, Standards, libraries) mais aussi montée des performances “ The JavaScript Performance Race”
  • State of the art: Server-Side JavaScript (ParisJS)

    1. State of the Art Server-Side JavaScript #10@amorgaut 4d.com@thibarg 2011-08-31
    2. NotesThese slides are part of a 15min version ofthe talk for ParisJSa more recent version has been presented atWebWorkersCamp IV duringOpen World Forumhttp://www.slideshare.net/alexandre_morgaut/state-of-the-art-server-side-java-script-webworkerscamp-9406069
    3. History
    4. Birth1995LiveScript/JavaScript1996Microsoft JScript (IE4)NetScape Enterprise Server 2aka LiveWire/iPlanet1997ECMAScript 1“DHTML”Windows IIS 3
    5. Maturity1998 - DOM, Mozilla Rhino1999 - ES3, XMLHttpRequest, HTML 42000 - ActionScript, Helma Hop2001 - JSON, Apple JavaScript OSA2002 - JSLint2003 - JavaScript Adobe Press2004 - E4X , “Web 2.0”2005 - Prototype, “Ajax”2006 - Firebug, jQuery, “Comet”, “HTML5”2007 - SitePoint Persevere, Rhino on Rails
    6. SSJS: The comeback2008Aptana JaxerCouchDB2009Narwhal & JackServerJS/CommonJSNode.JSECMAScript 52010Helma NG -> RingoJSSun Phobos2011Wakanda
    7. SSJS: The comeback2008Aptana JaxerCouchDB2009Narwhal & JackServerJS/CommonJSNode.JSECMAScript 52010Helma NG -> RingoJSSun Phobos2011Wakanda
    8. SSJS: The comeback2008Aptana JaxerCouchDB2009Narwhal & JackServerJS/CommonJSNode.JSECMAScript 52010Helma NG -> RingoJSSun Phobos2011Wakanda
    9. SSJS: The comeback2008Aptana JaxerCouchDB2009Narwhal & JackServerJS/CommonJSNode.JSECMAScript 52010Helma NG -> RingoJSSun Phobos2011Wakanda
    10. 60+ existing solutionshttp://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions
    11. Engines
    12. EnginesSpiderMonkey webkit JavaScriptCore: JSC TraceMonkey (JIT) SquirrelFish Extreme: SFX (JIT) JägerMonkey (JIT) IonMonkey (JIT) Nitro Rhino V8 Trident Chakra Carakan Tamarin Futhark
    13. Engines C/ C/ C+ C+ + +SpiderMonkey webkit JavaScriptCore: JSC Narwhal Narwhal CouchDB, MongoDB Wakanda Spidernode ... ... Sp ide C/ rM C+ o nk + Rhino V8 ey in Ja va Narwhal Narwhal RingoJS Akshell Persevere Node.js ... C/ ... C+ Trident / Chakra + ASP / .NET
    14. Benchmarks?
    15. Persevere JavaScriptDB (April 2009)http://www.sitepen.com/blog/2009/04/20/javascriptdb-perseveres-new-high-performance-storage-engine/
    16. 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 8759http://four.livejournal.com/1019177.html
    17. RingoJS vs NodeJS (September 2010)http://hns.github.com/2010/09/21/benchmark.html
    18. Sunspider 0.9.1 (August 2011) 7 8 6 5 4 3 2 1http://expansive-derivation.ossreleasefeed.com/2011/08/javascript-performance-test-results-with-sunspider/
    19. Main Concepts
    20. Integration-OrientedRhino SpiderMonkey in Java Interaction with Java (APIs and objects) Helma, Persevere, Narwhal*, RingoJS, Sun Phobos...JScript .Net Chakra (C++) Interaction with Windows APIs
    21. Async. Event-basedOne single threadCooperative («one at a time») with async. callbacksnodejs (V8)
    22. Async. Event-based One single thread Cooperative («one at a time») with async. callbacks nodejs (V8)Cons Pros Vulnerable to synchronous Can handle a lot of operations requests Share failure Low memory usage Doesn’t use other cores Uses only one core Hard to debug and maintain
    23. Thread-basedOne thread per contextPreemptive: Parallel code executionAbout all others
    24. Thread-based One thread per context Preemptive: Parallel code execution About all othersCons Pros Memory/CPU limits Vertical scalability (cloud) Race conditions, deadlocks, ... Thread-safety for concurrent (internal, C++) access Uses all available cores Uses all available cores
    25. Database-drivenCouchDB, MongoDB (SpiderMonkey): Document StoreWakanda (JavaScriptCore) Object Store
    26. APIs
    27. CommonJSModules BinaryPackages FilePromises JSGISystem StreamUnit-Testing http://wiki.commonjs.org/wiki/CommonJS
    28. Node.js async APIsBuffer StreamsEvents TimersFile ...NetOSProcess http://nodejs.org/docs/v0.5.5/api/
    29. W3C / HTML5 & other standardsConsole Structured clonesBlob, Blob URL* Typed Arrays*DataView* Web SocketsFile / FileSystem Web StorageModules* Web WorkersProgress Events XHR 2
    30. Packages & Modulesgithub lot of commonjs modules in several repositories (Persevere, Narwhal, RingoJS, ...)NPM: Node Package Manager 3600+ packagesCPM: CommonJS Package Manager (new) http://wiki.commonjs.org/wiki/CommonJS
    31. State of the Art Server-Side JavaScript The End See us at Wakanday aka JS.everywhere(Boston, October, 15)@amorgaut 4d.com@thibarg wakanday.org@wakandasoft @wakanday

    ×