Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
State of the art: Server Side JavaScript - WebW...
Search
Alexandre Morgaut
October 08, 2011
Technology
160
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
State of the art: Server Side JavaScript - WebWorkersCamp
Alexandre Morgaut
October 08, 2011
More Decks by Alexandre Morgaut
See All by Alexandre Morgaut
State of the art: Server Side JavaScript - @ParisJS #10
alexandremorgaut
1
170
Other Decks in Technology
See All in Technology
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
2
580
インシデント事例と パッケージの全量解析に学ぶ ソフトウェアサプライチェーンの守り方 / supply-chain-attack-defense
flatt_security
0
220
壊して学ぶAWS CDK: そのcdk deployで消えるもの、残るもの
k_adachi_01
1
430
AIレビューはどこまで任せられるのか?自動化と人が背負うレビューの境界
sansantech
PRO
3
1.1k
「顧客の声を聞かなければ何も始まらない」 ── 顧客の声から生まれた『AI返信補助機能』の開発プロセス / AICon2026_shikata_imai
rakus_dev
0
180
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
3
860
「AIに依存している」と 「AIを使いこなしている」の違い
k8yasuma
0
120
マルチアカウント環境でSecurity Hubの運用、その後どうなった? / SRE NEXT 2026 miniLT会
genda
0
110
AIコード生成×サプライチェーン攻撃 — PHPが直面する“二重の信頼問題
shinyasaita
0
240
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
260
伝票作成AIエージェントを支える、LLMOpsとインフラの選択肢 / AICon2026_takeda
rakus_dev
0
180
AI時代のYAGNI:「爆速で無駄になった機能」からの学び / 20260720 Naoki Takahashi
shift_evolve
PRO
3
420
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
380
The Invisible Side of Design
smashingmag
301
52k
BBQ
matthewcrist
89
10k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Marketing to machines
jonoalderson
1
5.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
770
Technical Leadership for Architectural Decision Making
baasie
3
440
So, you think you're a good person
axbom
PRO
2
2.1k
Transcript
STATE OF THE ART SERVER-SIDE JAVASCRIPT @amorgaut 4d.com 2011-09-24
HISTORY
BIRTH • 1995 LiveScript/JavaScript • 1996 Microsoft JScript (IE4) NetScape
Enterprise Server 2 aka LiveWire/iPlanet • 1997 ECMAScript 1 “DHTML” Windows IIS 3
MATURITY • 1998 - DOM, Mozilla Rhino • 1999 -
ES3, XMLHttpRequest, HTML 4 • 2000 - ActionScript, Helma Hop • 2001 - JSON, Apple JavaScript OSA • 2002 - JSLint • 2003 - JavaScript Adobe Press, JScript .NET • 2004 - E4X , “Web 2.0” • 2005 - Prototype, “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 GPSEE ServerJS -> CommonJS Node.js ECMAScript 5 • 2010 Helma NG -> RingoJS Sun Phobos • 2011 Wakanda
SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test
3 • 2009 Narwhal & Jack GPSEE ServerJS -> CommonJS Node.js ECMAScript 5 • 2010 Helma NG -> RingoJS Sun Phobos • 2011 Wakanda
SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test
3 • 2009 Narwhal & Jack GPSEE ServerJS -> CommonJS Node.js ECMAScript 5 • 2010 Helma NG -> RingoJS Sun Phobos • 2011 Wakanda
SSJS: THE COMEBACK • 2008 Aptana Jaxer CouchDB Acid Test
3 • 2009 Narwhal & Jack GPSEE ServerJS -> CommonJS Node.js ECMAScript 5 • 2010 Helma NG -> RingoJS Sun Phobos • 2011 Wakanda
http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions 60+ EXISTING SOLUTIONS
ENGINES
SpiderMonkey TraceMonkey (JIT) JägerMonkey (JIT) IonMonkey (JIT) V8 webkit JavaScriptCore:
JSC SquirrelFish Extreme: SFX (JIT) Nitro Trident Chakra Tamarin Carakan Futhark Rhino C C++ C++ Java C++ C++ C++
CLIENT-SIDE SpiderMonkey V8 JavaScriptCore Trident / Chakra Tamarin Carakan /
Futhark Rhino
SpiderMonkey Narwhal CouchDB, MongoDB APE, GPSEE, SpiderNode . . .
V8 JavaScriptCore Narwhal Wakanda Rhino Narwhal Helma / RingoJS, AppJet Persevere, Phobos, RhiNodeII . . . Narwhal Akshell Node.js Trident / Chakra IronJS Node.NET SERVER-SIDE
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) http://four.livejournal.com/1019177.html 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
RINGOJS VS NODEJS (SEPTEMBER 2010) http://hns.github.com/2010/09/21/benchmark.html
SUNSPIDER 0.9.1 (AUGUST 2011) http://expansive-derivation.ossreleasefeed.com/2011/08/javascript-performance-test-results-with-sunspider/ 7 8 6 5 4
3 2 1
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 • Ubiquity not only for ECMAScript • Server
missing APIs • Web Applications 1.0 • Asynchronous & Synchronous • Working Groups: - CommonJS - WHATWG - W3C - ECMA TC39
ASYNC. EVENT-BASED • 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 vs MULTI THREADING One context per thread SINGLE •
Low memory usage • Potentially handle lot of requests • Cooperative • Shared context • Use mostly one core MULTI • Vertical scalability (multi-core) • Thread-safety for concurrent access • Preemptive: Parallel code execution • Allow Synchronous APIs • Uses easily all available cores
DATABASE-DRIVEN • Document Store - CouchDB, MongoDB • Object Store
- Wakanda • Push Store - APE
APIS
COMMONJS • Modules • Packages • Promises • System •
Unit-Testing • Binary • File • JSGI • Stream http://wiki.commonjs.org/wiki/CommonJS
NODE ASYNC APIS • Buffer • Events • File •
Net • OS • Process • Streams • Timers • . . . http://nodejs.org/docs/v0.5.5/api/
W3C / HTML5 & OTHER STANDARDS • Console • Blob,
Blob URL* • DataView* • File / FileSystem • Modules* • Progress Events • Structured clones • Typed Arrays* • Web Sockets • Web Storage • Web Workers • XHR 2
PACKAGES & MODULES • github: CommonJS modules in forks (Persevere,
Narwhal, RingoJS, ...) • NPM: Node Package Manager (3600+ packages) • CPM: CommonJS Package Manager (new) • PINF: Universal module loader http://wiki.commonjs.org/wiki/CommonJS
STATE OF THE ART SERVER-SIDE JAVASCRIPT The End @amorgaut @thibarg
@wakanday 4d.com Wakanda.org Wakanday.org See us at Wakanday aka JS.everywhere(Boston, October, 15)