Sample Paper Flashcards
What is the function of an IP address?
host or network interface identification and location addressing
What is the function of a port number?
is to identify a specific process to which an internet or other network message is to be forwarded when it arrives at server
What is the scope of an IP address?
range of IP addresses that DHCP is configured to distribute
What is the size of an IP address?
32-bit
what is the size of a port number?
16 bits
3 key differences in service offered to a user between TCP and UDP protocols?
- TCP is reliable so data sent is always guaranteed to be received, UDP does not provide guaranteed delivery
- TCP uses flow control that ensures receiver is not overwhelmed by too many packets, with UDP packets arrive in a continuous stream
- TCP uses ordering to ensure packets are recieved in order they are sent, UDP sends packets in any order
what does the ‘cat’ linux function do?
concatenate the file to the screen
what does the ‘nc’ linux function do?
allows us to serve the file to the host/portnumber given
3 HTTP methods?
GET, POST, HEAD
what does the GET method do?
requests a specific page or object
what does the HEAD method do?
requests only the header, not the object itself, can check timestamp against local cache
what does the POST method do?
sends form data to server
Describe the promises mechanism?
an object that is used as a placeholder for the eventual result of a deferred computation
What problems with callbacks does promises resolve?
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
name one client side framework?
Node.js
Describe key features of Node.js
- 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 does Node.js make life easier?
We can use built in libraries. Both the client and server can initiate communication, allowing them to exchange data freely
What are the key properties of a hash algorithm?
- 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