Please enable JavaScript.
Coggle requires JavaScript to display documents.
Networks: Client server and peer-to-peer (Architecture Summary (Client…
Networks: Client server and peer-to-peer
Web forms
Web forms ask you to enter details.
If you don't enter the required information, the form will sometimes display an error message.
Client-server model
A network model consists of two parts: the
client
and the
server
.
The
client
accesses data, services and files from the
server
.
The
client
initiates communication to the server.
The
server
waits for requests from clients.
Client-server architecture
Terminals are known as 'clients' of the central server.
Client-server networking
Features of a client-server network include:
-
A central server is used to manage security.
-
Some files are held on the central server.
-
Some processing tasks are performed by the server.
-
Clients issue requests to the server for services such as email, file storage, backup and printing.
-
Suitable for many different types of organisation, small and large.
-
Can require specialist IT staff to administer the network.
Peer-to-peer architecture
A peer-to-peer network has no central server.
Peer-to-peer networking
Features of a peer-to-peer network:
-
They are suitable for a small company or home network with a few computer.
-
No central server controls files or security.
-
All computers can see files on all other computers.
-
All computers can communicate with each other without going through a server.
-
If a computer is switched off, data cannot be retrieved from it.
Architecture Summary
Client-server
-
User IDs, passwords and access levels centrally controlled.
-
Used in many small,medium-size and large organisations.
-
Can be expensive to set up and to manage.
-
Backup is centralised and usually automated.
-
No access to other users' files.
Peer-to-peer
-
Files and programs stored on individual computers.
-
Suitable for a home computer network.
-
Cheap to set up and maintain.
-
Each computer on the network can act as both client and server.
-
Can be used for sharing of music and streaming coverage of live events.
Client processing
Examples of “clients” include desktop computers, tablets, phones, games consoles or any other device that connects to a service.
-
Data is processed before it is sent to a server by the
client
.
-
On the web, this usually happens in the form of
scripts
and these usually executed by the client browser.
-
The web page
does not communicate with the server at this point
.
Client processing - Javascript
Web pages may feature
JavaScript
to validate data before it gets sent to the server for further validation.
-
The function validate offers client-side processing.
Advantages
-
Allows for more interactivity by immediately responding to a users' action.
-
Quick execution as no communication with the server is required.
-
Removes potentially unnecessary processing from the server.
-
Data cannot be intercepted on the way to the server, increasing security for the user.
Disadvantages
-
Not all browsers support all scripts (although most modern browsers support an overwhelming majority).
-
Because the scripts are processed by the client, they are dependent on the performance of the clients' machine.
-
Different browsers process scripts in slightly different ways, so the web page owner cannot be certain how the end-product will look to the user.
Client side processing
Scripts that handle initial processing
saves
the server valuable processing resources.
Imagine if all of the terminals in this network had to communicate each time they needed to validate information.
-
The server would eventually become overloaded and would crash
Application Programming Interface (API)
An
API
is a set of
tools
that can be
used for building software applications
.
API requests are processed by the client and responded to by the relevant server.
Example: Google Maps
API
This simple line of code allows any web page to make use of the Google Map facility.
-
The process is initialised and defined by the client.
-
Once the API has been initialised, the web page can define how to interact and request data.
<script src= "http://maps.googleapis.com/maps/api/js">
</script>
Server side processing
In certain cases, it is necessary for a server to process information to:
-
Process user input – providing another layer of validation.
-
Display pages.
-
Structure web applications.
-
Interact with permanent storage/databases using SQL.
Server programming languages include:
-
Python
-
PHP
-
ASP
A server may wish to further validate data that has been submitted by the client:
-
This may have already been validated by the client using JavaScript.
-
JavaScript can be easily circumvented.
-
This ,akes additional server-side validation crucial to check accuracy & secure data being transmitted.
Search for an item on the Argos websites:
Client processing
Web page behaviour.
Style.
Form validation.
Server processing
Item stock level lookup.
Loading product information from the database.
Sending the request back to the client.
Client vs server side processing
Client Processing
Initial validation
Web page interactivity
Manipulating interface elements
Applying styles (CSS)
Reduces the load on the server
Reduces the amount of web traffic
Server Processing
Database queries.
Encoding data to readable HTML.
Updating the database.
Calculations.
Provides further validation.
Keeps data owned by organisations secure.