HTTP Web Services and the Deep World of APIs-Concepts of Request-Response Cycle.
HTTP Web Services and the Deep World of APIs-Concepts of Request-Response Cycle.
Have you ever thought about what happens behind the scenes when you browse the web? Or what happens when you click the go button after typing your URL? All these are made possible under the Request-Response Cycle.
Let us consider some important concepts.
HTML(Hypertext Markup Language): This is a set of commands use to create World Wide Web documents, allowing the document creator to create parts of the documents. It the language Web Pages are written.
HTTP(Hypertext Transfer Protocol): This is a protocol used to transfer hypertext or hypermedia files. It also passes other forms of data like JSON.
· It oversees data exchange between client & server.
§ It is stateless, i.e.-treats each request as an independent transaction unrelated to any previous request.
§ Much simpler, as you can send the entire transaction at one request.
· HTTP relies on two lower order layers to achieve this:
- TCP [Transmission Control Protocol]: Transports HTTP. It is responsible for breaking down any associated data into small ‘packets’ before these are sent over a network, & for assembling these again when they arrive. Its is just like a car that carries moves its passengers(HTTP Request) to it’s destination(URL)
- IP [Internet Protocol]: Allows TCP to move between networks.
Clients and Servers: If your computer has a web browser installed. It is known as a Client. A host computer capable of providing information to others is called a Server . A server needs a special software in order to carry out its task.
Step by step approach to request/response handling:
- A URL is typed into the address bar of a web browser
- URL is a human readable alias for an IP [Internet Protocol] address. Its matching IP address is a unique number sequence identifying a target server called Host.
- The browser checks for the IP in its browser cache. If not found, it send a request to DNS.
- DNS [Domain Name System/Service/ Servers]: It is a comprehensive directory network translating domain names into its unique IP sequence.
Request-Response cycle is like an a drive-less car(TCP),carrying a passenger(Client request) set to go through a path(Port number e.g 443-https) to go search for a book(Resource) at a given address(IP address).
If resource is available or not the Housekeeper(Server) replies Clients Request with Response Codes.
That would be discussed in the subsequent posts.