Sunday, April 26, 2020

What is a Web Service?


Try to understand the below examples:

You are in a restaurant. How your orders are communicated with the Chef? The waiter is responsible for this right. So, here the waiter acts as a web service that makes sure that 2 systems communicate (here you and chef)

Another example, planning for a trip. Want to book tickets? Mostly, we will go to the MakeMyTrip app.
We get a list of all the airlines and we compare the prices. Ever wondered how MMT has all the data.

See, no airline will allow a third party to search in their website.
Another possibility might be that what if the airline is dumping data to MMT, but what if the status changed dynamically. This creates a risk.

All these airlines have exposed their web services through an API.

MMT uses those web services to communicate.


Web Service
- Service available over the web.
- Applications communicate over the web.
- Database independent like in the above example different companies may be using different databases.
- Follows a standard protocol.
- Platform Independent like one maybe Windows other Linux.


Who creates the web service?

A service provider creates them and makes it available on the internet.
The Provider provides & the Consumer consumes it.

Client (Consumer) and Server (Provider)

Client -> Request -> Server
Client -< Response -< Server

The medium of communication is HTTP / INTERNET

Format of communication is XML/JSON



AMOR FATI - LOVE OF FATE


No comments:

Post a Comment