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
\n
\n
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
\n
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, richer APIs\n\n
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
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
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
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
\n
\n
Many User groups, Many Conferences, Many Blogs & books, Large documentation, Language also used by developers from other communities\n
Most popular language on GitHub\nMany libraries and Frameworks with sometime big Companies behind (Yahoo!, Microsoft, Google, IBM, ...)\n
\n
\n
\n
\n
\n
\n
Spidermonkey now looks more C++ now but its API are still in C\nComplex Webkit naming\nTrident: Windows only\n
The growth of WebApps with Ajax Frameworks requires more powerful engines \n-> Browsers War II.\n
Ici, on compare JS avec d’autres technologies : Persevere et son js faisaient plus de req/s que php par exemple\n
\n
\n
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
\n
Juste en travaillant sur le moteur lui même a fait d’énormes gains jusque la 185, puis en ajoutant leur JIT, hop, ils divisent les temps d’exéc. par 4.\n\n“les autres ont fait pareil dans le même temps etc...” (next slide)\n
\n
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
“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
\n
\n
\n
\n
\n
\n
\n
\nNPM: Author ?\nCPM: by Kris Zyp\nPINF: by Christoph Dorn\n
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 4http://www.page.ca/~wes/SpiderMonkey/Perf/sunspider_history.png
MAIN CONCEPTS
INTEGRATION-ORIENTED • PHP (J2PA, V8JS)- using Rhino like with - Helma, Persevere, Narwhal, RingoJS, • C (GPSEE), Sun Phobos...- Oracle Nashorn? • Objective C (iMonkey), • Ruby (Johnson),- using JScript.NET like with - IronJS, Node.NET • Perl (JE), …
COMMON JAVASCRIPT• Working Groups: - ECMA TC39 - W3C - WHATWG - CommonJS• Ubiquity beyond ECMAScript• HTML5 specification was also known as: “Web Applications 1.0” http://www.whatwg.org/specs/web-apps/current-work/• Asynchronous & Synchronous APIs
ASYNC. EVENT-BASED• Browser’s 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 global context per threadSINGLE 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 which could use other cores - multi-thread architectures can run event loops in some of their threads
DATA-DRIVEN • Document Store • Object Store • Key/value Store • Push engineSee also: JSDB, JavaScriptDB
DEMANDWAREMany shops run on SSJS viaDemandware’s commerce platform: London 2012 olympics shop Puma sneaker ...It uses Mozilla Rhino http://jsconf.eu/2010/speaker/server-side_javascript_the_unt.html
NEOLANENeolane, a desktop applicationwritten in C++, is used by clientsbut also by integrators & partnerswho need to be able to add theirown codeJavaScript was chosen because it is awell-known interpreted languageThe JavaScript engine isSpiderMonkey http://www.neolane.com
MTV• Current deployments include • SpikeTV.com • Comedy Central Indecision,• MTV Networks will be rolling out MongoDB on many other major sites http://www.mongodb.org/display/DOCS/Production+Deployments
VOXERVoxer is a next generation application forvoice and text messaging“Node.js dramatically outperformed theprevious solution we had written in Python”Matt Rainey, RebelVox CTO http://voxer.com/
HAPPY MEEPLEUsing APE projectSynchronization between usersReuse JavaScript code on client andserver to have the same intelligencewhen online and offline http://www.happymeeple.com
FINANCIAL DATA REPORTSUsing WakandaDeployed on employees iOS,Android, & Blackberry smartphonesProvides historical sales and invoicesreports in PDF
THANK YOU Come with us at San Jose, CA on October 26th: @jseverywhere http://jseverywhere.orgAlexandre Morgaut - @amorgaut Call to speaker just started!!!
1–2 of 2 previous next