Introduction to Web Services

Jul 19, 2024

Lecture: Introduction to Web Services

Key Concepts

What is a Web Service?

  • Definition: A service available over the web.
  • Analogy:
    • Similar to a waiter in a restaurant who communicates orders between the customer (client) and kitchen (server).
    • The waiter ensures both parties communicate effectively.

Importance of Web Services

  • Language Barrier: Similar to a waiter translating between a customer who speaks English and a chef who speaks German.
  • Communication Role: Facilitates communication between different applications.

Practical Example: MakeMyTrip

  • Scenario: Booking a flight from New Delhi to Mumbai on MakeMyTrip website.
  • Process:
    • MakeMyTrip queries multiple airlines (Air India, Go Air, Indigo, Jet Airways, etc.) in real-time.
    • Receives flight data and displays it to the user within seconds.
    • Impossibility: Direct access to airlines’ databases is not allowed due to security.
    • Timing Issue: Data cannot be dumped and updated hourly due to real-time changes.
    • Solution: Airlines expose Web Services through an API which MakeMyTrip uses.

How Web Services Work in This Context

  • Communication: MakeMyTrip sends requests and receives responses from various airlines in a common format.
  • Real-time Data: Ensures up-to-date flight information.

Advantages of Web Services

  • Standard Protocol: Provides a standard protocol/format for communication.
  • Platform Independence: Enables applications on different platforms to communicate. For example:
    • C++ application on Windows 10 can communicate with a Java application on Linux using Web Services.

Future Learning

  • Next Sessions:
    • Detailed architecture of Web Services
    • Different types of Web Services

Thanks for watching!