2/13 - Web App Architecture Flashcards

1
Q

What does HTTP (Web Transport Protocol) do?

A

It specifies requests from clients and responses from a server.

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

What is HTTP built on?

A

TCP

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

Which port does HTTP use on the server by default?

A

Port 80

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

What does HTTPS do?

A

HTTPS ensures authenticity

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

What does HTTPS require?

A

HTTPS requires a paid certificate

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

Who can initiate communication in HTTP?

A

Only the client can initiate communication.
• The server can only send data in response
• The client must poll server periodically to support server notification

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

URI Format

A

Uniform Resource Identifier/Locator

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

What is the PROTOCOL in the following URI?

http://server.com:8888/path/file?p1=v1&p2=v2#x

A

http

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

What is the HOST in the following URI?

http://server.com:8888/path/file?p1=v1&p2=v2#x

A

server.com

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

What is the PORT in the following URI?

http://server.com:8888/path/file?p1=v1&p2=v2#x

A

8888

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

What is the PATH in the following URI?

http://server.com:8888/path/file?p1=v1&p2=v2#x

A

/path/file

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

What is the QUERY in the following URI?

http://server.com:8888/path/file?p1=v1&p2=v2#x

A

p1=v1&p2=v2

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

What is the ANCHOR in the following URI?

http://server.com:8888/path/file?p1=v1&p2=v2#x

A

x

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

Is the anchor in the URI REQUIRED or OPTIONAL?

A

optional

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

What does GET do?

A

used to retrieve a resource names by URI

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

What does POST do?

A

Used for client to send data

17
Q

What is a HTML form for, and what does it do?

A
  • Used as UI element to collect input

* Plays a role in communication (sending parameters)

18
Q

What if we want to keep state?

A

Server should recognize the client and show the same client ID

19
Q

What happens if you store the client ID in the server?

A

The problem is that the request and handlers are re-created fresh for each request. It seems that the server does not want to keep state.

The server cannot keep the connection open to all clients who are thinking what to buy next, and it cannot reliably distinguish different clients in different requests (they all appear alike).

We need failure tolerance and to enable load balancing.

20
Q

Failure tolerance

A

What if the server crashes?

Failure tolerance is is the property that enables a system to continue operating properly in the event of the failure of (or one or more faults within) some of its components. If its operating quality decreases at all, the decrease is proportional to the severity of the failure, as compared to a naively designed system in which even a small failure can cause total breakdown.

21
Q

Load balancing

A

Allowing other server instances to deal with subsequent requests is required to enable load balancing.

Load balancing aims to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource.

22
Q

How do we store client ID in the client?

A

We do this by using cookies

23
Q

Cookies

A
  • Key value pairs associated with a website stored at the browser for a specified time
  • Most cookies are available to Javascript code
  • Many security and privacy issues are possible, if used incorrectly