Velocity Conference 2013: The Challenges of Internationalization and Localization on Page Performance
Upcoming SlideShare
Loading in...5
×
 

Velocity Conference 2013: The Challenges of Internationalization and Localization on Page Performance

on

  • 821 views

In this talk, Akamai's Colin Bendell, will explore numerous performance and operational complexities of internationalization (i18n) and localization (l10n). ...

In this talk, Akamai's Colin Bendell, will explore numerous performance and operational complexities of internationalization (i18n) and localization (l10n).

Click here to listen to the talk: http://www.youtube.com/watch?v=oyhirGHrQ4Q

Statistics

Views

Total Views
821
Views on SlideShare
811
Embed Views
10

Actions

Likes
0
Downloads
3
Comments
0

1 Embed 10

https://twitter.com 10

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

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

Velocity Conference 2013: The Challenges of Internationalization and Localization on Page Performance Velocity Conference 2013: The Challenges of Internationalization and Localization on Page Performance Presentation Transcript

  • Performance* and*[i18n,*l10n] @ColinBendell ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Colin*Bendell Akamai ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • He*who*cannot*draw* on*three*thousand* years*is*living*hand*to* mouth. Wer*nicht*von*dreitausend*Jahren Sich*weiß*Rechenscha@*zu*geben, Bleib*im*Dunkeln*unerfahren, Mag*von*Tag*zu*Tage*leben. -- Goethe Buch des Unmuts, West-östlicher Divan ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Tuesday, November 5, 13 http://www.flickr.com/photos/joshlty/2618266556/ Earth is a pretty big place
  • Tuesday, November 5, 13
  • Languages*on*the*Internet www.languageconnect.net/blog/2012/07/top-languages-on-the-internet-infographic/ % of total speakers on the internet English Chinese English 536 million Korean 39 million Russian 59 million French 59 million Arabic 66 million Spanish 164 million German Japanese 75 million Portuguese 99 million 82 million Spanish Japanese Portuguese Chinese 509 million German Arabic French Russian Korean ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Market*Opportunity = If I had 30% of US Market That’s 2% of Global Market ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • internaLonali[sz]aLon*=*more*$$$ ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • web*performance*is*a* balancing*act*of*concerns Tuesday, November 5, 13
  • 500*randomly*selected*urls*from* HTTP*Archive*(where*Rank*<10k)* Speed Index i18n no-i18n 0ms 1,000ms 2,000ms 3,000ms 4,000ms 5,000ms ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Sample*Set*Breakdown Rank Page Speed 80 7100 60 5325 40 3550 20 1775 0 0 i18n no-i18n i18n no-i18n ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • ∝ Does*LocalizaLon* *Slower*Sites? ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Housekeeping:*for*the*pedanLc • i18n*=*architecture*supporLng*localizaLon • l10n*=*implementaLon*for*a*locale • g11n*=*i18n*∪*l10n • m17n*⊆*l10n ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • government regulations multiple languages culture / social date formats input and output workflows i18n paper sizes price hiding weights & measures branding currency timezones number formats related languages geography finance / legal obligations ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Yours Tuesday, November 5, 13
  • Yours 3rd Parties Tuesday, November 5, 13
  • 6,900*languages* x**206*Countries x**182*currencies x**39*Date*formats* ... =*high*fragmentaLon ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Where*does*i18n*belong? (RAR!) Request Assemble Respond (Adapt) Render ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Distributed*Caching*will*follow* Geo*PoliLcal*Lines ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • My*recommended*balance*of* cacheability*and*performance Request Assemble Respond geo rules branding language branding workflows pricing geo rules caching transform (Adapt) Render currency number formats date formats weights / measures ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Why*not*use*the*browser*for*l10n? ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Core*Javascript*limited*to*date*l10n ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Many,*many*js*libs*to*fill*the*gaps • • • • • • • • • i18next.js*(i18next.com) jsperanto.js*(github.com/jpjoyal/jsperanto) jed.js*(slexaxton.github.io/Jed/) messageformat.js*(github.com/SlexAxton/messageformat.js) jquery.i18n*(github.com/recurser/jquerygi18n) globalize*(github.com/rxaviers/globalize) TwiherCLDR*(github.com/twiher/twihergcldrgjs) Closure*(developers.google.com/closure/library/) etc,*etc ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • i18n*means*more*code ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Beware*of*the*template*tax ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Takeaways • Use*Javascript*for*date/Lme/number/currency*formajng • Resource*bundles*cost*network*Lme • Don’t*do*mulLglanguage*failover • Most*users*don’t*override*the*locale*so*don’t*worry*about*it ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Server*Side*i18n*is*Just*as*Hard • control*the*memory,*cpu*and*runLme • same*i18n*uses*the*same*techniques • can*fragment*your*own*local*cache • best*combinaLon*is*to*let*the*browser*handle*formajng,*server* handle*m17n ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • m17n*is*the*hardest*part*of*i18n • plurals*(goose*v.*geese) • gender,*noun*declension,*verb*conjugaLon,*tense • colloquialisms*(holegingthegwall*v.*ATM) • page*layout*(speed*limit*v.*Geschwindigkeitsbegrenzung) ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • m17n*is*really*text*subsLtuLon <!DOCTYPE*html> <% **ResourceBundle*msgs*= ResourceBundle.getBundle("messages"); %> <html> **<head> ***<Ltle><%=msgs.getString("HELLO_WORLD")%></Ltle> **</head> **<body> ****<h1><%=msgs.getString("WELCOME")%></h1> ****<%=msgs.getString("BODY_TEXT")%> **</body> </html> gggggg*messages.res*gggggg WELCOME=Welcome*to*my*homepage HELLO_WORLD=Hello*World*Example! BODY_TEXT=This*is*just*a*sample*page*to* compare*the*various*localizaLon*methods. #*Errors*Messages ERR_IE_VISTA=Java*1.6.0_10*or*above*is*required* when*using*IE*undernWindows*Vista ERR_ACCESS01=No*access*allowed ERR_ACCESS02=No*access*g*system*error ERR_ACCESS03=No*access*g*password*failed ERR_ACCESS04=No*access*g*userID*{0}*not*found ERR_ACCESS05=No*access*g*userID*{0}*not*allowed ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • gehext*is*nicer,*but*sLll*the*same <!DOCTYPE*html> <% ****I18n*i18n*=*I18nFactory.getI18n(getClass()); %> <html> **<head> ***<Ltle><%=i18n.tr("Hello*World*Example!")%></Ltle> **</head> **<body> ****<h1><%=i18n.tr("Welcome*to*my*homepage!")%></h1> ****<%=i18n.tr("This*is*just*a*sample*page*to*compare*the* various*localizaLon*methods. ")%> **</body> </html> ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • php gettext default (en) translated (de) String ID 0 200 400 600 800 Requests / second ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13 http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/ gehext*vs.*in*stringgid
  • developer.tizen.org/documentation/articles/plural-and-gender-rules-internationalized-applications Does*m17n*make*sense? ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • TranslaLon*Proxies ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Mindful*of*the*gap ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • m17n*takeaways • It’s*hard;*There*aren’t*any*silver*bullets • It*will*require*hand*tuning • Precompute*the*language*output • TranslaLon*proxies*are*only*as*good*as*what*they*can*“see” ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Language*DetecLon ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Locale*detecLon*and*tracking Connected*to*82.150.226.198* from*50.58.99.162 GET*/engus/index.html?lang=engus*HTTP/1.1 Host:*en.example.com Accept:**/* AcceptgLanguage:engUS,en;q=0.8,frgCA;q=0.6,fr;q=0.4 Cookie:*lang=engus ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Locale*DetecLon SEO/Bot Shareable Crawlable Links Cache Aware Ops Friendly AcceptLanguage N ? ? ? IP Geo N ? ? N Cookie N ? ? Y URL Y Y Y Y ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • i18n*is*not*just*for*users ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Other*usegcases*for*i18n Operations Early geo detection (DNS) Late geo detection Business Performance Capacity Financial*&* Legal IP*Deny*/* security EnLtlement Contract Price*arbitrage ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Don’t*overlook*UX*when* implemenLng*i18n ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Takeaways • Use*browser*l10n*for*formajng*(currency,*Lmezones,*numbers,*date) • Translate*server*side*and*cache*output • Detect*with*AcceptgLanguage*header,*but*embed*the*locale*in*the*url • Leverage*dns*for*localizaLon*business*rules • Adding*i18n*early*is*cheaper*than*later ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • My*recommended*balance*of* cacheability*and*performance Request Assemble Respond geo rules branding language branding workflows pricing geo rules caching transform (Adapt) Render currency number formats date formats weights / measures ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13
  • Thanks! ©2013 AKAMAI | FASTER FORWARDTM Tuesday, November 5, 13