In many server configurations, a user sends an HTTP request, the server crunches data, often sending requests of its own to an SQL server, then it sends the data over the wire. Slashdot encourages users, “Optimize PHP and Accelerate Apache.” Some of the advice in this article is meant to be humorous, but one nugget is quite powerful. Move the business logic and the database client-side. This has an amazing effect on server resources.
Gmail Leverages JavaScript
JavaScript, a scripting language which runs in the browser, has been leveraged in powerful ways. Google’s gmail service, which relies heavily on JavaScript, serves more than 425 Million users, is one powerful example of what can be done with this expressive language. Calculating client-side saves resources and looks greatBecause java script runs in the browser, any computations made in it require no resources from the server. What’s more, results from these computations can be sent back to the server. For example, one common task servers perform is data formatting, sizing columns on a table, calculating how many columns are needed, etc. A faster approach is to send the data along with the page, and let java script calculate this information. In this example, the scripting language can calculate the dimensions of the table and columns on the client computer. This allows such calculations to take into consideration resolution and window size, ensuring the page looks great, no matter what it’s displayed on.
Ajax Minimizes Traffic
Thanks to Ajax, a method of exchanging data using JavaScript, servers can provide information without sending a whole page. For example, when a user clicks a link, servers traditionally send a whole new page with the information requested. With Ajax, the server can send only the requested information, which can be displayed in several ways, and the user has a seamless experience because the screen never changes.
Maintaining a Live Connection Serves Data Faster
Many servers today maintain a connection to the browser, even after the page has been served. This saves resources. First, the HTTP protocol requires several bytes when first established, so keeping a live connection minimizes network traffic. Second, building up and tearing down connections also takes resources. Keeping the connection open until the user session ends preserves these resources.
Uploading Data Keeps Things Moving
One powerful feature Google has implemented with its Google Reader service is the ability to download up to 2000 articles for later viewing. This is an excellent approach because: The user can view the information offline (while commuting), but even when online, the user experience is incredibly fast because the data is local. Of course, this service is based on information, so users have to come back for updates.
Work Smarter, Not Harder
Users are running fast systems, even iPads and iPhones are fast enough. Letting the user computer do the work turns servers into distributed systems, which are well known for their performance. This being said, ensuring that servers have enough resources to begin with is crucial. One big requirement is ram. If you’re interested in getting the most from your PowerEdge or ProLiant server, check us out!
Leave a Reply