Thursday, September 10, 2009

Sharding

The best discussions I have come across is here (http://www.startuplessonslearned.com/2009/01/sharding-for-startups.html) and
here
http://blog.maxindelicato.com/2008/12/scalability-strategies-primer-database-sharding.html

Wednesday, September 2, 2009

MVC in the browser

Web applications should be architected with a RESTful API on the server side (using frameworks like Jersey or Restlet talking with a Javascript client UI. Libraries like JQuery and associated plugins make it easy to build sophisticated UIs and allow you to implement MVC concepts in Javascript. I see this approach becoming more common over the "traditional" web application, where the MVC framework is server-side and generated HTML UI (with javascript mixed in) is rendered in a browser client.
Pros of writing web apps this way:
1. RESTful service api is accessible to multiple clients - not just the browser, any desktop client (e.g. Java Swing app) or even external third-party consumers.
2. The size of "data" exchanged between client/server is less - compare to entire HTML page generated by traditional web app which is sent over the wire from server to client.
3. There is a clean separation between the client UI and the server which makes testing the UI in Javascript that much easier (you can stub out the RESTful services).