.........................................................
Notes taken on my iPod Touch from the Quora talk at Stanford on Decemeber 3. I can barely understand myself after not looking at it for a month.
Requirements for framework to power Quora: (1) real-time, (2) really fast like Google, Amazon and Facebook, (3) make it easy to build the website.
Making in all javascript like GMail has problems- (1) Slow and (2) SEO is a problem.
Alternatives – Rails, Pylons. Decided to use Pylons.
A page is broken down into components. Make the way the page looks how we code.
Singletons no different.
Right CSS and JS, Reuse components.
Share code between comments on answer and comments on question
Python object
- all day
- display
Ruby on Rails review.
HTML tags, use with, only classes to select elements.
DOM, IDs, @ symbol locally scopes ids, prefixes real DOM ID, Unique, avoids collision.
JS components, classical inheritance is nice, JS at the bottom of page makes page faster.
Components are views.
Decorators, Lala (?), cQuery
Reference, Dynamic scoping, components can be subclasses, OO
Component inspector
Updating of page, Real-time-ness
Javascript checking. Generate javascript.
Component data access. Get own data. Need same data. Per-request IO cache.
Hierarchy of components, prime breadth first, composability.
LiveNode, like page refresh, renders all HTML server-side
Implementation – When data changes, Depkey abstraction, register dirty, dependency, dirty. Just like memcached.
Thread variables, Depkey to component. Which components are dirty?
Tornando, Live block, hash, less than twice as much, comparison happens on the server.
LiveList for lists, more button.
id for each browser window
Window close or closing laptop is not possible to differentiate, ask user to refresh page then.
Example of LiveNode in action – when user adds answer, show “loading…”, Ajax RPC to server, Model, Dirty(answers of question), list of browser window, send notification to each one, Get update, Re-render, Mutation_complete
Minimize client state, Track client state and queue updates, recreate client state after transition
MySQL.
Statelessness. Composability. Optional. State is bad.
∞
I’m not sure if these notes are useful to anyone. But if you want to know more, there are a bunch of questions on Quora that are useful (you can only view them if you have an account on Quora) -
Why is Quora so fast?
What languages and frameworks were used to code Quora?
Why is the autocomplete for Quora so fast?
Other questions under the topic Quora Infrastructure.
View Comments