Client-server Technologies Flashcards
What is the client-server model
Paradigm where providers of resources are designated as servers and resource requesters are designated as clients
What is client-side processing
Refers to any operations carried out on the ‘client’ side of relationship.
Almost always some processing carried out by client
Role of web browser
Typical example of client-side processing
Formats a web page according to the HTML tags and CSS styling sent to it by server
HTML pages can include scripts, can carry out tasks such as validating form data and creating dynamic page features
Scripts interpreted by web browser
Why are operations carried out client-side
Offloads processing to client, reducing load on server and reduces communications bandwidth
Risks of client-side processing
security risk as malicious content can be easily distributed as code that creates a stunning slide show
What is API
Set of functions and protocols that clients use
What is a server-side web API
Set of web services or web resources to enable programmers to build web applications
What can server-side APIs be used for
Multiple can be used to create combined web applications called mashups
What is server-side processing
Operations carried out on server
Role of web server
Web browser sends a HTTP request
Sends and retrieves data to/from database via a server-side script
Server-side script provides a HTTP response, sending web page to web browser
Why is server-side processing preferred by system developers
- more control over environment where scripts are executed. Developers know which version of interpreter will be used
- scripts hidden on server, helps protect intellectual copyright & prevents tampering
- servers can be optimised to cope with heavy processing demands
What does the Websocket protocol do
Provides persistent full duplex connection between client & server.
Means both client and server can use connection to start sending data any time
Benefits of Websocket protocol
Data can be pushed from server without having to be initiated by HTTP request from client.
Reduces latency as once connection is made messages are automatically received without need for security checks
How is data transferred during Websocket Protocol
As messages, each consist of one or more frames that are reconstructed when received
What are the possible frames of the Websocket protocol
Text frames
Binary frames e.g. image data
‘Ping/pong’ frames (used to check connection)
Control frames e.g. to close connection