Search This Blog

Wednesday, June 30, 2010

Web Application Performance

Following methods to improve web application performance
  • Using HTTP features 304 not modified, expires header, keep-alive, gzip
  • Reducing HTTP requests
  • Caching images in browser
  • Gzip Compression
  • Proper CSS Placements
  • Proper JavaScript placement
  • Minimizing CSS and JavaScript code
  • Serving images from cookie less domain
  • Avoiding HTTP redirection
  • Optimizing Ajax
  • Use PHP accelerators

JavaScript Placement: JavaScript files have become important part of most of the web. Browsers allow parallel connections to a single hostname. This allows files to download faster in parallel and very helpful for web application performance. When JavaScript file is called browsers halts the parallel connections to all hosts. This is because JavaScript can alter the document dom with document.write(). more

This can badly hurt the front end performance of a web application. To avoid this all calls to JavaScript files should be moved to bottom of the page, just before end to BODY tag.

CSS Placement: A CSS file or style should be placed in HEAD element of the page. It is important because browsers render page progressively if CSS is placed in HEAD. Putting CSS at bottom can block progressive rendering in most of the browsers. more

Reducing HTTP Requests: A web page have multiple objects like images, css, JavaScript and flash etc. Browser have to send one http request to the server for each object. Each request adds a round trip to the server. Server have to receive and process each request and send the response.

For enhancing web application performance the rule is simple, reduce http requests.
  1. Combining Images
  2. Combining CSS files
  3. Combining JS files
  4. Using browser cache for performance
Above are the  techniques to reduce the http request more

Read complete article

Thursday, June 17, 2010

Non-Relational Database Systems

The world of Web is shifting from relational to non-relational data stores. There are many non-relational data stores -

Cassandra - Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store. Read more

MongoDB - MongoDB isn't a key/value store, it's a document store. PHP module is available. Read more

Apache CouchDB - Apache CouchDB is a document-oriented database that can be queried and indexed in a MapReduce fashion using JavaScript. CouchDB also offers incremental replication with bi-directional conflict detection and resolution. Read more

MemcacheDB - combines the proven BerkeleyDB storage system with a network server that speaks the memcached network protocol so you can create memcahed-like nodes that hold more data than would fit in a traditional RAM-based memcached nodes and be assured that the data is not lost after a reboot. In some respects this is similar to the Tokyo Cabinet and Tokyo Tyrant combination. Read more

Redis - it's a lightweight in-memory key/value store that handles strings, sets, and lists and has an excellent core of features for manipulating those stored data types. Redis also has built-in replication support and the ability to periodically persist the data on disk so that can survive a reboot without major data loss. Read more

Riak - An Open Source Internet-Scale Data Store. Riak is a Dynamo-inspired key/value store that scales predictably and easily. Riak also simplifies development by giving developers the ability to quickly prototype, test, and deploy their applications. Read more

Tokyo Cabinet - Tokyo Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. There is neither concept of data tables nor data types. Records are organized in hash table, B+ tree, or fixed-length array. Read more

Hypertable - Hypertable is a high performance distributed data storage system designed to support applications requiring maximum performance, scalability, and reliability. Read more

Project Voldemort - is a fairly mature system that’s in heavy use at LinkedIn and comes with automatic replication and partitioning. Read more

Amazon SimpleDB - Amazon SimpleDB is a highly available, scalable, and flexible non-relational data store that offloads the work of database administration. Developers simply store and query data items via web services requests, and Amazon SimpleDB does the rest. Read more