Client-Server
暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。
卡片预览 (24 张)
What is the client-server model
A paradigm where providers of resources are designated as servers, and the resource requesters are the client.
What will a server do in the client-server model
Servers are passive and listen (wait) for incoming requests. When a request is received the server will respond with the resources needed
What is the client in the client-server context
Service that makes the request. Client process makes a request and will wait for a response
What is Client-side processing
Refers to any operations that happens on the client side
Why do operations use Client-side processing
It offloads processing to the client Reduces load on server and reduces the communication bandwidth
Negatives of Client-side processing
Can pose a security risk
What is server-side processing
Refers to operations that happens on the server
Why is server-side processing used
As it gives more control over the environment in which the scripts are executed. Scripts are hidden on the server Server can be optimised to cope with heavy processing demands
What is API
A set of functions and protocols the client can use
What is a web socket protocol
An API for establishing a persistent TCP socket connection
What is CRUD
Create Retrieve Update Delete
What does each element of CRUD do
Create - writes a record to a database Retrieve - Gets a record from a database Update - amends a record Delete - removes a record from the database
What is a DBMS
A database management system As multiple clients can update a database with only one copy of the database existing the DBMS will handle the requests.
What are the 4 ways the DBMS handles if different users want to update the same record
Record Locks Serialisation Timestamp ordering Commitment ordering
What is record locks
When a user wants to update a record, the record is locked for the duration of the update
What is serialisation
Transactions can only happen one at a time and the DBMS handles the order
What is Timestamp ordering
When a record is read its read timestamp is updated Before record is written back, the DBMS will check the timestamp If the timestamp has been changed then it will be cancelled
What is Commitment ordering
Transactions from multiple clients, and the timestamps are all sent to the server. The server creates a queue, using timestamps, and processes them in a FIFO manner
What is HTTP communication
It is the application-layer protocol used to communicate between web servers and browsers
HTTP communication using CRUD
POST GET PUT DELETE
What is REST
Representational State Transfer An architectural style that determines how systems communicate
Why is REST important
Allow client and server to be programmed independently while still able to interact with each other
Difference between JSON and XML
JSON: {“name”} XML: <name> </name>
Advantages and disadvantages of JSON
Advantages: Easier for humans to read More compact Can be directly manipulated by JavaScript Disadvantages: Limited data types