Sample Paper Flashcards

1
Q

What is the function of an IP address?

A

host or network interface identification and location addressing

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

What is the function of a port number?

A

is to identify a specific process to which an internet or other network message is to be forwarded when it arrives at server

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

What is the scope of an IP address?

A

range of IP addresses that DHCP is configured to distribute

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

What is the size of an IP address?

A

32-bit

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

what is the size of a port number?

A

16 bits

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

3 key differences in service offered to a user between TCP and UDP protocols?

A
  1. TCP is reliable so data sent is always guaranteed to be received, UDP does not provide guaranteed delivery
  2. TCP uses flow control that ensures receiver is not overwhelmed by too many packets, with UDP packets arrive in a continuous stream
  3. TCP uses ordering to ensure packets are recieved in order they are sent, UDP sends packets in any order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does the ‘cat’ linux function do?

A

concatenate the file to the screen

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

what does the ‘nc’ linux function do?

A

allows us to serve the file to the host/portnumber given

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

3 HTTP methods?

A

GET, POST, HEAD

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

what does the GET method do?

A

requests a specific page or object

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

what does the HEAD method do?

A

requests only the header, not the object itself, can check timestamp against local cache

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

what does the POST method do?

A

sends form data to server

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

Describe the promises mechanism?

A

an object that is used as a placeholder for the eventual result of a deferred computation

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

What problems with callbacks does promises resolve?

A

escape callback hell, as promise chaining allows us to get rid of the nasty nesting callback pattern and flatten our JavaScript code into more readable format

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

name one client side framework?

A

Node.js

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

Describe key features of Node.js

A
  • single threaded
  • has event loop which handles events queue which contains events with their callbacks
  • non blocking, all long running tasks are always executed asynchronously on top of worker threads which return results via callback
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How does Node.js make life easier?

A

We can use built in libraries. Both the client and server can initiate communication, allowing them to exchange data freely

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

What are the key properties of a hash algorithm?

A
  • unable to derive message from hash
  • no other hash should be same
  • deterministic > same message goes to same hash code
  • small change in message creates a new hash
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does MAC stand for?

A

message authentication code

20
Q

How does MAC work?

A

Sender encrypts message with hash code to become MAC, and sends message and MAC over to the reciever. The reciever then encrypts the same message with the keyy and compares both MACs to ensure the data has not been tampered with

21
Q

What is a proxy server?

A

is a server that acts as an intermediary for requests from clients seeking resources from other servers.

22
Q

Where is a proxy placed?

A

Between the server and client

23
Q

Explain operation of proxy server?

A
  • acts as a gateway between client and internet
  • forwards web requests
  • can provide high level of privacy
  • cache data to speed up common requests
24
Q

How is performance improved by using a proxy?

A

better network performance as caches, see if it has the page saved, and if so serves it much faster as it just has to retrieve from its own cache. Saves bandwidth too.

25
Q

Advantages security wise for using a proxy?

A
  • can configure proxy server to encrypt web requests
  • IP address is hidden/ Website will never see real IP, will only see the proxy’s IP address
  • malicious websites can be filtered out, admin can block user from certain sites
26
Q

Disadvantages privacy wise for using a proxy?

A
  • data or identity theft, cache can remember sensitive info such as passwords
  • can hack proxy and therefore hack data as it will flow through the proxy.
27
Q

Advantages of using packet formats

A
  • divides data into easier to manage chunks, which move data more efficiently
  • stable and manageable
  • easy to mechanically parse
28
Q

disadvantages of using packet formats

A
  • requires large amounts of RAM to handle large amounts of data communication in packets
  • packet only contains part of message as split into chunks
29
Q

advantages of using text based protocol

A

dont need an analyser like you do for TCP

- easier to debug as we understand

30
Q

disadvantages of text based protocol

A
  • hard to mechanically parse

- not good with bandwidth utilisation

31
Q

Why move from text-based to packet?

A
  • packet format makes pages load faster
  • enhanced coding mechanism between socket and HTTP API
  • binary protocols are more efficient to parse
  • more compact, more efficient over network
  • more secure, security concerns over text are no longer relevant
32
Q

What is a stateless application layer protocol?

A

Does not require the server to retain the server info or session details

33
Q

How does stateless impact the way HTTP operates?

A

each request is executed independently, without any knowledge of the requests that were executed before it, which means once the transaction ends the connection between the browser and the server is also lost

34
Q

How is stateless HTTP beneficial?

A
  • it simplifies server design as there is no need to dynamically allocate storage
  • maintains robustness and efficiency
  • easily identify each request and each one is independent
35
Q

How is security established for a session when using HTTP?

A

Using TLS

36
Q

what is TLS

A

Transport Layer Security, formerly known as SSL, Secure sockets layer

37
Q

What does TLS allows?

A
  • client to authenticate server
  • server to authenticate client
  • client and server to select cypto protocol for use over a communication session
  • client and server to exchange session keys securely
  • confidential sessions between client and server
38
Q

How does the TLS handshake work?

A
  • server exchanges public key
  • client sends session key encrypted with servers public key
  • client activates new session state and secure session is established
  • server activates new session state and secure session is established
  • encrypted communication session begins
39
Q

What is Node.js

A

an open-source cross platform javascript runtime environment that executes javascript code outside of a browser

40
Q

What is Node.js used for?

A

building fast and scalable network applications

41
Q

Benefits of using Node.js

A
  • companies can build backend and frontend applications with only 1 scripting language
  • no trouble processing hundreds of thousands of requests simultaneously as it uses asynchronous blocking
42
Q

Why does data be validated both client and server side?

A
  • validate on client so you can give better feedback to the average user, correct field before they submit
  • validate on server so can protect against malicious user who can input dangerous characters
  • server side validation insures compatibility
43
Q

Disadvantages of using cookies?

A
  • store private info
  • browsing history becomes public knowledge
  • stored on server
44
Q

What is the HTML5 mechanism similar to cookies?

A

Web storage / local storage

45
Q

Advantages of using web storage?

A
  • more secure
  • large amounts of data can be stored locally without affecting performance
  • info is never transferred to server
  • only viewed on client side
46
Q

What is a first order class?

A

something which acts in the language as a state manipulation sort or type of object

47
Q

How are first order classes used by developers?

A
  • functions can be passed to other functions as arguments
  • functions can be assigned as a value to a variable
  • function can be returned by another function