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
Leaving jsps in the dust
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Veena Basavaraj
June 30, 2012
Technology
430
2
Share
Leaving jsps in the dust
LinkedIn moving to client templates for the web
Veena Basavaraj
June 30, 2012
More Decks by Veena Basavaraj
See All by Veena Basavaraj
Dust and web-performance at LinkedIn
vybs
1
210
CuriousCaseOfDust.pdf
vybs
1
300
Other Decks in Technology
See All in Technology
TROCCOで始めるクラウドコストを民主化するためのFinOps
tk3fftk
3
540
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
410
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
370
コードレビューを制するチームがソフトウェアデリバリーのフローを制す / Beyond Code Review: Distributing Its Responsibilities Across the SDLC
mtx2s
3
590
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
170
Dynamic Workersについて
yusukebe
2
560
Javaで学ぶSOLID原則
negima
1
260
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
180
AI Engineering Summit Tokyo 2026 AIの前に、やることがある 〜医療データ企業の4フェーズ〜
dtaniwaki
0
480
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
580
Claude code Orchestra
ozakiomumkj
3
890
long-running-tasks
cipepser
3
460
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
470
A Soul's Torment
seathinner
6
2.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Design in an AI World
tapps
1
220
How to build a perfect <img>
jonoalderson
1
5.5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
810
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Building an army of robots
kneath
306
46k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
Transcript
Leaving jsps in the dust @vybs
We are pi@linkedIn
front-end infrastructure
Goal(s)
In the beginning... Site-Speed Site-Scale +
What is the Problem?
But... Site-Speed Site-Scale Developer Velocity
Simple things should be dead easy
Build Quick, Iterate More
front-end infrastructure now became....
Static Vs Dynamic Jruby Node.js Grails
Anyone notice a bad pattern?
Do once, Do the same twice, Do the same thrice...!
How does this work effectively in mobile?
Still building heavy pages not apps
We created a few more problems indeed!
How did we solve them?
Unification • Javascript Templates, CDN caching • Write once •
JSON for data • One Standard • Event-ed Server as JSON Aggregator + JS V8 engine • Scale once
JavaScript templates • Evaluated tons, handlebars, dust, mustache • Good:
Simple, less logic, 4KB, precompiled to javascript, performance is a feature • Bad: None are mature enough, i18n/ formatters not out of the box
_t = “Hello {name}! You have {count} new messages from
{#people} {name}, {/people} ”; json = { "name": ”James", "count": 2, “people” : [{ “name” : “Jim”, “distance” : “2” },{ “name”: ”Eran” “distance” : “1”} ] } Hello James! You have 2 new messages from Jim, Eran! !dust.render(_t, json, function(error, data) {! $(“mydiv”).html(data);! }!
Dust - *less logic • Simple, DRY • loops, conditionals,
partials, inheritance {#people} {>”/path/degree_icon_{distance}”/} {/people}
Dust • Client Helpers for extensions, reusability • Rendering logic,
math, i18n • @if, @select, @lte, @ceil, @i18n, @form {#people} <li class="card {@select key=“distance”} {@lte value=“1”/} {@i18n text=“first degree”/} {@gt value=“1”/} {@i18n text=“second degree”/} {/select} </li> {/people}
! on client • Server side precompiled to JS •
Rendering times on client snappy
! on client • Server side processed helper tags •
auto-generate template dependencies {#people} {“>degree_icon”/} {/people}
! on client • Dust Preprocessed helper tags • leverage
JVM based i18n, formatting and A/B testing • creates template driven, context based JSON {#people} {@ss.fmt key=”fmt_name” type=“name” value=”{name}”/} {/people} {#people} {fmt_name} {/people} Client template/ js “people” : [{ “name” : “Joe Jada”, “fmt_name” : “Joe J”, “distance” : “2” },{ “name”: ”Jade Pink” “fmt_name” : “Jade P”, “distance” : “1”} ] } Server Source template uses
! on client • No javascript, SEO pages • Seamless
rendering of dust on the server using V8
data layer JSON JSON Browser UI /JSON Aggregator V8 Page
apps Module Module JSON CDN caching content delivery Static Assets static content js, css, templates linkedin.com
linkedin.com/people/pymk
we dust! https://github.com/linkedin/dustjs https://github.com/linkedin/Lu https://github.com/linkedin/inject