RTUComputer ScienceYr 2023 · Sem 62023

Q16Cloud Computing

Question

4 marks

What are Web Services? Differentiate between SOAP and REST.

Answer

Web services are standardized ways of integrating web-based applications. SOAP is protocol-based, while REST is an architectural style.

Web services allow different applications to communicate over the network. SOAP (Simple Object Access Protocol) is a strict, XML-based protocol with built-in security and transaction compliance, often used in enterprise environments. REST (Representational State Transfer) is a more flexible architectural style that uses standard HTTP methods (GET, POST, PUT, DELETE) and can support multiple formats like JSON, XML, and plain text. REST is lightweight and widely used for public APIs and mobile apps.

Detailed Comparison

  • Message Format: SOAP mandates a strict XML envelope with header and body sections; REST has no mandated format and commonly uses lightweight JSON, resulting in smaller payloads.
  • Statefulness: SOAP can support both stateful and stateless operations through WS-* extensions; REST is inherently stateless, meaning each request must contain all information needed to process it, which simplifies horizontal scaling.
  • Transport: SOAP is transport-agnostic and can work over HTTP, SMTP, or TCP; REST works exclusively over HTTP and directly leverages HTTP verbs and status codes.
  • Security and Reliability: SOAP has built-in standards like WS-Security and WS-ReliableMessaging, making it favored for banking and enterprise transactions requiring ACID compliance; REST relies on the underlying transport (HTTPS/TLS) for security.
  • Performance: REST's lightweight payloads and stateless caching make it faster and more scalable for web and mobile clients, while SOAP's verbosity adds parsing overhead.

In cloud computing, most public APIs (AWS, Google Cloud, Azure) expose REST endpoints because of their simplicity and cache-friendliness, while SOAP remains common in legacy enterprise integration scenarios such as payment gateways.

Back to Paper