Can you explain in simple terms how the client server model works?
I've been asked by BBC Bitesize to answer some questions before an audio interview that may feature on some new content they're producing. This section focuses on networks and, in particular, the client-server model.
7. Can you explain in simple terms how the client server model works?
The most common example of the client-server model is the World Wide Web. To explain it in the simplest way possible, the client and the server share some of the work in providing a service, such as loading a Web page. In this example the server on which a website is hosted receives a request from a client (usually a Web browser) and, if the client has the necessary permissions, shares the resource (the Web page) with the client.
For this client-server model to work effectively both computers must understand how to interact with one another. In other words, they need to speak a common language and follow certain rules. The language and rules are called protocols: HTTP (Hypertext Transfer Protocol) is commonly used on the Web.
8. Can you explain a bit about the difference between client side or server side rendering?
Rendering is the process of displaying a web page in a way appropriate for the device on which it is being viewed. This is often done through scripting with debates taking place about the merits of client-side versus server-side scripting.
With server-side scripting the load is placed upon the server holding the resources that the client wants to access. This works well when trying to limit access to a database, for example, or other data sources. The downside is that the server becomes a bottleneck and can quickly become overloaded. Examples of server-side scripting languages are Perl, PHP and ASP.NET.
9. I understand more and more is being rendered client side as we get more powerful browsers and connections. Can you tell us how this will improve our experience as users?
There are at least two bottlenecks when it comes to server-side scripting. The first is the processing power of the server (or server farm) that is serving up web pages. If the server becomes overloaded it may shut down - rendering the resource inaccessible. This is sometimes called a Denial of Service attack. By taking some of the load off the server, client-side scripting can potentially help with this.
The other bottleneck comes with bandwidth. With server-side scripting, data has to be exchanged several times (if not continuously) between the client and the server. This can eat up bandwidth. The more client-side scripting that is used the less bandwidth is potentially needed to complete the same operations.
Ultimately, unless we move to solely peer-to-peer connections (e.g. Bittorrent) we may always need some server-side scripting. Increasing connections speeds and browser speed reduces the bottlenecks making for more responsive websites and apps. An example of what may be possible in the future can be glimpsed through the Mozilla Ignite programme.