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.
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]
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 answerHide 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
| Aspect | SOAP | REST |
|---|---|---|
| Protocol | XML-based protocol | Architectural style using HTTP |
| Message Format | Complex XML envelope | Simple JSON/XML |
| Service Description | WSDL (formal contract) | OpenAPI/Swagger (informal) |
| Complexity | Heavy, complex | Lightweight, simple |
| Performance | Slower (XML parsing overhead) | Faster (minimal overhead) |
| Caching | Limited (POST-based) | Built-in HTTP caching |
| Learning Curve | Steep | Gentle |
| Use Case | Enterprise, mission-critical | Web APIs, mobile apps |
| Error Handling | SOAP Faults (structured) | HTTP status codes |
| Coupling | Tightly 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.
Comparison between SOAP and REST
2080 · 5 marks
How do you choose between SOAP and REST web services? Explain. [5]
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]
Make Unit 5 stick
Practice BIT408 with flashcards & quizzes