What is the difference between REST and RPC?
REST - Representational state transfer
RPC - Remote Procedure Call
What is statelessness in REST?
What are some of the basic error responses from a web application
What are the typical fields for a error response with REST APIs
type – a URI identifier that categorizes the error
title – a brief, human-readable message about the error
status – the HTTP response code (optional)
detail – a human-readable explanation of the error
instance – a URI that identifies the specific occurrence of the error
What is the difference between a GET and POST method?
The GET method is the method used by the browser to ask the server to send back a given resource: “Hey server, I want to get this resource.” In this case, the browser sends an empty body. Because the body is empty, if a form is sent using this method the data sent to the server is appended to the URL.
Since the GET method has been used, you’ll see the URL www.foo.com/?say=Hi&to=Mom appear in the browser address bar when you submit the form.
The data is appended to the URL as a series of name/value pairs. After the URL web address has ended, we include a question mark (?) followed by the name/value pairs, each one separated by an ampersand (&). In this case, we are passing two pieces of data to the server:
GET /?say=Hi&to=Mom HTTP/2.0 Host: foo.com
The POST method is a little different. It’s the method the browser uses to talk to the server when asking for a response that takes into account the data provided in the body of the HTTP request: “Hey server, take a look at this data and send me back an appropriate result.” If a form is sent using this method, the data is appended to the body of the HTTP request.
Let’s look at an example — this is the same form we looked at in the GET section above, but with the method attribute set to POST.
When the form is submitted using the POST method, you get no data appended to the URL, and the HTTP request looks like so, with the data included in the request body instead:
POST / HTTP/2.0 Host: foo.com Content-Type: application/x-www-form-urlencoded Content-Length: 13 say=Hi&to=Mom
What is meant by protocal?
A protocal is a set of rules that defines communication between to points.
*A protocol is a system of rules that define how data is exchanged within or between computers. Communications between devices require that the devices agree on the format of the data that is being exchanged. The set of rules that defines a format is called a protocol.
*
https://developer.mozilla.org/en-US/docs/Glossary/Protocol
What is TPC?
TCP (Transmission Control Protocol) is a network protocol that lets two hosts connect and exchange data streams.
TCP guarantees the delivery of data and packets in the same order as they were sent.
What is HTTP?
Why is HTTP extensible?
HTTP headers make this protocol easy to extend and experiment with. New functionality can even be introduced by a simple agreement between a client and a server about a new header’s semantics.
What is meant by the statelessness of HTTP?
How does HTTP interact with connections and different versions of HTTP?
What is the difference and uses of UDP and TCP?
Both TCP and UDP are protocols used for sending bits of data—known as packets—over the Internet. Both protocols build on top of the IP protocol. In other words, whether you’re sending a packet via TCP or UDP, that packet is sent to an IP address. These packets are treated similarly, as they’re forwarded from your computer to intermediary routers and on to the destination.
UDP is similar to TCP but does away with error checking and retries. UDP is used for streaming and online gaming where latency is more important than having all the data.
TCP is the most commonly used protocol on the Internet.
Whether an application uses TCP or UDP is up to its developer, and the choice depends on what an application needs. Most apps need the error-correction and robustness of TCP, but some applications need the speed and reduced overhead of UDP. If you fire up a network analysis tool like Wireshark, you can see the different types of packets traveling back and forth.
What are the steps in the HTTP flow?
What does an HTTP request typically contain?
What does the HTTP response typically contain?
How does TCP work?
How does UDP work?
What is the Internet?
A global network of interconnected computers consisting of physical infrastructure like wires and fiber optic cables
It includes hardware such as routers and switches that facilitate communication through standardized protocols.
What is the primary function of a server?
To serve data and files to other computers (clients) upon request
Servers host websites, applications, files, and databases.
What do we call the computers used by people to access the Internet?
Clients
Clients can be devices like laptops, smartphones, or tablets.
Why is the DNS server compared to a phone book?
It translates human-readable domain names into numerical IP addresses
This allows browsers to find the IP address of the website being visited.
What is the purpose of an IP address on the Internet?
To serve as a unique identifier for every device connected to the Internet
It ensures that data sent over the network reaches the correct destination.
What role does your Internet Service Provider (ISP) play when you type in a web address?
It forwards your request to a DNS server to resolve the domain name into an IP address
ISPs route your browser’s request to the correct server hosting the website.
What website can you use to look up the IP address of google.com?
https://nslookup.io
This tool performs a DNS lookup for any domain.