5 Web Services And Data Management

Cloud Computing · Unit 5

Web Services and Data Management

Exam-focused notes for Web Services and Data Management (Cloud Computing, BIT408): what the TU syllabus asks and how it has actually been tested, with 4 solved past questions from this unit.

Web Services and Data Management in short

Cloud applications talk to each other through services. This chapter explains what a service is and how service-oriented design works. It then covers the two main web service styles, SOAP and REST, and how the cloud manages data and resources.

Web Services and Data Management: notes

Service definition and concepts

A service is a self-contained piece of software that does one defined job and can be used by other programs over a network. Examples are a payment service, a weather service and a login service.

Main concepts:

  • Interface: the service publishes what it offers, without showing its inner code.
  • Reuse: many applications can call the same service.
  • Loose coupling: the caller depends only on the interface, so the inside can change freely.
  • Platform independence: a Java client can call a service written in Python.
  • A web service is a service that is reached using web standards such as HTTP and data formats like XML or JSON.

Service-Oriented Architecture (SOA)

SOA is a design style where an application is built from loosely coupled services that communicate through standard interfaces.

Three roles:

  • Service provider: builds the service and publishes its description.
  • Service registry: a directory where services are listed and can be found.
  • Service consumer: looks up the service in the registry and then calls it.

The flow is: publish, find, bind. The provider publishes, the consumer finds the service and then binds to it to make calls.

Principles of SOA:

  • Standard service contracts.
  • Loose coupling.
  • Abstraction (details are hidden).
  • Reusability.
  • Autonomy and statelessness.
  • Discoverability and composability, which means small services can be combined into larger ones.

Benefits: reuse, flexibility, easier integration of old and new systems.

What this unit covers

  • Service definition and concepts
  • Service-Oriented Architecture (SOA)
  • SOAP based web service model
  • REST web services architecture
  • Comparison between SOAP and REST
  • Web services development using SOAP and REST
  • Data and resource management in cloud

Web services development using SOAP and REST

2082 · 5 marks

How web services can be developed using SOAP and REST? [5]

Web services are software systems designed to support interoperable machine-to-machine interaction over a network. Two primary architectural approaches for developing web services are SOAP and REST. --- SOAP (Simple Object Access Protocol) is a protocol-based approach for web service development....

Open this answer on its own page →

SOAP based web service model

2081 · 10 marks

What is service? Explain the SOAP based web service model? How it differs from RESTful architecture?[10]

Show solved answer

Model Answer: Web Services, SOAP, and REST

What is Service?

A service is a self-contained, reusable software component that performs a specific business function and is accessible over a network. Services are designed to be:

  • Independent: Can operate autonomously
  • Loosely coupled: Minimal dependencies on other services
  • Platform and language agnostic: Can be consumed by any client regardless of technology
  • Discoverable: Can be found and understood by potential consumers
  • Interoperable: Uses standard protocols and formats for communication

SOAP-Based Web Service Model

SOAP (Simple Object Access Protocol) is a protocol for exchanging structured information in web services using XML.

Key Characteristics:

1. Protocol Structure:

  • Uses XML for message formatting
  • Built on HTTP, SMTP, or other transport protocols
  • Follows strict message envelope structure

2. Message Format:

<soap:Envelope>
  <soap:Header>
    <!-- Optional header information -->
  </soap:Header>
  <soap:Body>
    <!-- Actual request/response data -->
  </soap:Body>
</soap:Envelope>

3. Service Description:

  • Uses WSDL (Web Services Description Language) for service definition
  • Describes operations, parameters, return types, and endpoints
  • Enables automatic client stub generation

4. Features:

  • Built-in error handling through SOAP Faults
  • Support for complex data types
  • WS-Security for message-level security
  • Formal contract between client and server

RESTful Architecture

REST (Representational State Transfer) is an architectural style using HTTP methods and standard web conventions.

Key Characteristics:

1. Resource-Oriented:

  • Everything is a resource identified by URI
  • Example: /api/users/123, /api/products/456

2. HTTP Methods:

  • GET: Retrieve resource
  • POST: Create resource
  • PUT: Update resource
  • DELETE: Remove resource

3. Stateless Communication:

  • Each request contains all necessary information
  • Server doesn't store client context

4. Lightweight Format:

  • Typically uses JSON (can use XML)
  • Simpler message structure

Key Differences

AspectSOAPREST
ProtocolXML-based protocolArchitectural style using HTTP
Message FormatComplex XML envelopeSimple JSON/XML
Service DescriptionWSDL (formal contract)OpenAPI/Swagger (informal)
ComplexityHeavy, complexLightweight, simple
PerformanceSlower (XML parsing overhead)Faster (minimal overhead)
CachingLimited (POST-based)Built-in HTTP caching
Learning CurveSteepGentle
Use CaseEnterprise, mission-criticalWeb APIs, mobile apps
Error HandlingSOAP Faults (structured)HTTP status codes
CouplingTightly coupled (contract-based)Loosely coupled

Summary

SOAP is a formal, contract-driven protocol suitable for complex enterprise integrations requiring strict specifications and security. REST is a simpler, more flexible architectural approach ideal for web and mobile applications where performance and ease of use are priorities. Modern development increasingly favors REST due to its simplicity, though SOAP remains relevant in legacy and highly regulated systems.

Open this answer on its own page →

Comparison between SOAP and REST

2080 · 5 marks

How do you choose between SOAP and REST web services? Explain. [5]

  • SOAP: Heavy protocol with XML envelope structure, WSDL definitions, and extensive headers. Better for complex enterprise operations requiring strict contracts. - REST: Lightweight, uses standard HTTP methods (GET, POST, PUT, DELETE). Choose REST for simpler, faster implementations. - SOAP: Prot...
Open this answer on its own page →

Data and resource management in cloud

0 · 10 marks

How does data and resources are managed in cloud? Describe SOA and REST as web services.[10]

Cloud computing manages data through the following mechanisms: 1. Data Storage Models - Object Storage: Data stored as objects with metadata and unique identifiers (e.g., Amazon S3) - Block Storage: Data divided into blocks, managed like traditional storage systems - File Storage: Hierarchical fi...

Open this answer on its own page →