State of the art: Server-Side JavaScript  (ParisJS)
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

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

on

  • 8,833 views

Lightening talk presented at ParisJS #10 in 15min

Lightening talk presented at ParisJS #10 in 15min

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

http://wakanday.org

Statistics

Views

Total Views
8,833
Views on SlideShare
8,714
Embed Views
119

Actions

Likes
10
Downloads
107
Comments
2

8 Embeds 119

http://lanyrd.com 73
http://www.linkedin.com 23
http://paper.li 13
http://www.socialsoft2.vi 5
http://speakerrate.com 2
http://us-w1.rockmelt.com 1
http://drizzlin.com 1
https://crowdflower.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NoDerivs LicenseCC Attribution-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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) Presentation Transcript

  • 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