APIs and client server - paper 2 Flashcards

1
Q

what are APIs

A
  • a set of protocols that governs how two applications should interact with one another.
  • An API sets out the format of requests and responses between a client and a server and enables one application
    to make use of the services of another.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

limits of HTTP communication

A
  • client has to request data from the server
  • if too much time passes between between establishing a socket connection between client and web server, the server drops the connection to conserve its resources, and returns an error message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

web CRUD applications

A

NAME → HTTP request method → SQL command

Create → POST → INSERT
Retrieve → GET → SELECT
Update → PUT → UPDATE
Delete → DELETE → DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is REST

A

Representational State Transfer is a style of systems design that prescribes the use of HTTP request methods to interact with
online databases via a web server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

examples of APIs

A

JSON - similar to python dictionary
XML - similar format to html files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

advantages of JSON

A
  • more compact so requires less storage, so quicker to transmit and process
  • easier to read, write, and maintain
  • data clearly defined as objects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

disadvantages of JSON

A
  • only works with a limited range of data types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

advantages of XML

A
  • any data type allowed, so more flexible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

disadvantages of XML

A

expensive use of tags makes it hard to follow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

describe what thin- client computing is

A
  • processing is carried out on a server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how does the client - server model work

A
  • a client will send a request message to a server
  • which should respond with the data requested or a suitable message otherwise.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

example of a client - server model

A
  • commonly seen when a client browser sends a
    HTTP request to a web server for web page data or a web resource.
  • The page data is sent back from the
    HTTP server by way of response
  • the browser renders the web page on the client’s computer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

examples of server types

A

File server
Email server
FTP server
Proxy server
DHCP server
Print server
Database server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

example of an API

A

WebSocket is a modern application layer
protocol that facilitates a persistent bi-directional communication channel between the client and the
server over a single line. This is known as full-duplex communication.

Persistent connection until the communication is terminated;
Reduced header information, increasing data transfer speed; and reducing load on server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Connecting a database to a browser with HTTP request methods

A
  1. A browser makes a client server request from a web server to load a standard web page and all of its
    resources.
  2. The web page HTML file contains some JavaScript which is executed on the client-side.
  3. The browser JavaScript calls the RESTful API which enables communication with the server-side
    database using HTTP requests.
  4. The database server responds to the client’s HTTP requests with the data in JSON or XML format.
  5. The browser renders the JSON or XML data in its own user interface.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

advantages of thin client

A
  • Easy to set up, maintain and add
    terminals to a network with little installation required locally
  • Software and updates can be installed
    on the server and automatically distributed to each client terminal
  • More secure since data is all kept centrally in one place
17
Q

disadvantages of thin client

A
  • Reliant on the server, so if the server
    goes down, the terminals lose functionality
  • Requires a very powerful, and reliable
    server which is expensive
  • Server demand and bandwidth increased
  • Maintaining network connections for
    portable devices consumes more battery power than local data processing
18
Q

advantages of thick client

A
  • Robust and reliable, providing greater
    up-time
  • Can operate without a continuous
    connection to the server
  • Generally better for running more
    powerful software applications
19
Q

disadvantages of thick client

A
  • More expensive, higher specification
    client computers required
  • Installation of software required on
    each terminal separately and network administration time is increased
  • Integrity issues with distributed data
20
Q

how does thin client computing work

A
  • Client terminals load operating system from server at start up;
  • Applications installed on server and accessed remotely by terminals;
  • Client (dumb) terminals act as interfaces only;
  • All processing is done by the server