Wednesday, October 29, 2008


The current webapp designs use a layered model, like all things in computer science. Each layer has it's primary concerns, the database layer is concerned with persistance, the client layer with presentation, the middle layer with everything else. The problem with this design is that abstractions leak, and constraints of each layer are visible in other layers.

My belief is that the correct way to engineer a webapp is to acknowledge the constraints of each part. The disks can deal with about 100 seeks per second per spindle, give or take. The channel between the web browser and the web app is high latency. And the most important is that any webapp design that requires disk seeks on either queries or updates is inherently DOSable.

This leads me towards a asynchronously updating network design, wherein browsers notify the webapp of changes, the webapp responds with changes it has seen, and the webapp streams updated state to disk. Think of a spider with it's eight legs spread on different strands, listening to it's web. The trick is going to be generating consistent code across the various nodes, the html, the javascript, the concurrent server code, the reporting code.