Module 2
Module 2
REST, Web
Services,
Virtualization
Foundations, patterns, and platforms for
modern distributed systems
Dr. Srividhya G
1
Agenda
• Service-Oriented Architecture and REST
• Systems of Systems, Web Services, and Publish-Subscribe
Model
• Basics and Types of Virtualization
• Virtualization Implementation Levels and Structures
• Virtualization of CPU, Memory, and I/O Devices
• Virtualization Support, Disaster Recovery, and Server
Virtualization
2
Service-Oriented
Architecture and REST
3
Fundamentals of Service-
Oriented Architecture (SOA)
Service-Oriented Architecture (SOA) is a
software architectural style that structures
large systems as a collection of discrete,
independent services that communicate over a
network using standard interfaces. Each service
represents a specific business function and can
be reused across different applications.
On Amazon:
Loose Coupling
Services have minimal dependencies on
each other — changes in one service don’t
require changes in others.
Standardized Service Contracts
Every service is defined by a clear contract
that specifies how it can be used (e.g.,
inputs, outputs, protocols).
Service Reusability
Services are designed to be reused across
multiple contexts and applications, reducing
duplication of effort.
.
6
Fundamentals of Service-
Oriented Architecture (SOA)
Service Autonomy
Each service controls its own logic and can
operate independently.
Service Abstraction
The internal implementation is hidden;
consumers interact only through the
service’s interface.
Service Discoverability
Services are registered in a service
directory so developers and systems can
find and reuse them.
Service Composability
Services can be combined (orchestrated)
into larger business processes or workflows
7
Service-Oriented Architecture (SOA) – REST
REST stands for Representational State Transfer.
REST is an architectural style used to build web services that communicate over HTTP using
standard methods like:
RESTful services are widely used in modern SOA and cloud applications.
Earlier SOA systems mainly used SOAP, but modern SOA often uses REST because it is:
Lightweight
Faster
Easy to implement
Scalable for cloud systems
8
Service-Oriented Architecture (SOA) – REST
Key Characteristics of REST
1. Stateless
Everything is treated as a resource (data object). Mobile banking app uses REST APIs:
Example:
/students • Check balance → GET /account/balance
/orders • Transfer money → POST /transfer
/accounts/123 • View transactions → GET /transactions
• Each feature is a separate service.
3. Uses HTTP Protocol
REST works over HTTP, making it suitable for web and cloud.
Supports Multiple Formats
Data can be in:
•JSON (most common)
•XML
•HTML
9
REST vs SOAP in SOA
10
REST vs SOAP in SOA
In Service-Oriented Architecture
using REST, the client sends HTTP Client |
requests to the REST API layer. The | (Web / Mobile App)
API routes the request to
appropriate independent services
such as User Service, Order
Service, or Payment Service. Each REST API Layer |
service processes the request and | (Service Interface)
interacts with its own database.
11
Systems of Systems, Web
Services, and Publish-
Subscribe Model
12
Understanding Systems
of Systems Architecture
A System of Systems (SoS)
Architecture refers to an architectural
approach where multiple
independent systems interact and
cooperate to achieve a larger and
more complex objective.
14
Understanding Systems
of Systems Architecture
Key Characteristics of SoS Architecture
[Link] Independence
Each system can operate independently even
if it is disconnected from the overall system.
[Link] Independence
Each system is developed, managed, and
maintained by different organizations or
teams.
[Link] Distribution
The individual systems are usually distributed
across different locations and communicate
through networks.
[Link] Behavior
When systems interact, new capabilities
emerge that were not present in the
individual systems.
[Link] Development
Systems can evolve independently and be
upgraded without affecting the entire
architecture. 15
Understanding Systems
of Systems Architecture
Types of Systems of Systems
[Link] SoS
A central authority manages the overall
system operations.
[Link] SoS
There is a recognized central authority, but
individual systems retain independence.
[Link] SoS
Systems voluntarily cooperate to achieve
common goals. There is no single central
authority controlling all systems, but they
cooperate because it benefits all
participants.
[Link] SoS
No central authority exists, and systems
interact dynamically.
16
Systems of Systems
Applications of SoS Architecture
Advantages
18
Web Services
Key Characteristics of Web Services
• Interoperability
• A Web Service is a software system
Applications written in different programming languages
designed to support communication
can communicate.
and data exchange between
• Platform Independent
different applications over the Works across different operating systems and hardware
Internet using standard web platforms.
protocols. • Standard Protocols
Uses standard internet protocols like HTTP, XML, SOAP,
• Web services allow different REST.
applications running on different • Loose Coupling
platforms and languages to interact The service provider and service consumer are
with each other. independent.
• Reusable Services
Services can be reused by many applications.
19
Web Services
Components
• Service Provider Working of Web Services
The system that hosts and provides
the web service. [Link] service provider publishes the
service.
• Service Consumer (Client) [Link] service consumer discovers the
service from the registry.
The application that requests and
[Link] consumer binds and sends a request
uses the service. to the provider.
[Link] provider processes the request and
• Service Registry sends a response.
A directory where services are
published and discovered.
21
Types of Web Services
22
Web Services
23
Publish–Subscribe Model
Key Components
• Publisher
• The Publish–Subscribe (Pub/Sub) model is • The system that creates and sends messages.
• It publishes messages to a topic or channel.
a messaging communication pattern in
which publishers send messages to a topic • Subscriber
without knowing who will receive them, • The system that receives messages.
and subscribers receive messages from • It subscribes to specific topics.
topics they are interested in.
• Message Broker / Event Bus
• Middleware that manages message
• The communication is indirect and loosely distribution.
coupled through a message broker or event • Delivers messages from publishers to
bus. subscribers.
• Topic
• A category or channel where messages are
published.
24
Publish–Subscribe Model
The publisher does not know the subscribers, and subscribers do not
know the publisher.
26
Publish–Subscribe Model
Real-Time Examples
Advantages
1. YouTube Notifications
•Channel uploads a video → Publisher • Systems remain independent.
•YouTube system → Broker
•Subscribers to the channel → Subscribers • Supports large-scale distributed systems.
27
Basics and Types of
Virtualization
28
Virtualization: Core
Concepts
29
Basics of Virtualization
Virtualization is the technology that Basic Idea
creates a virtual version of computing
resources such as servers, storage, Traditionally, one physical server
operating systems, or networks, allowing runs one operating system.
multiple virtual machines (VMs) to run
on a single physical machine. With virtualization, one physical
server can run multiple virtual
It helps in efficient utilization of machines, each with its own
hardware resources and is a key operating system and applications.
foundation of cloud computing.
30
31
Virtualization
Key Components Types of Virtualization
32
1. Server Virtualization
A single physical server is divided into multiple virtual servers, each running its own operating system and applications.
Real-world example:
A company uses VMware vSphere to run several virtual machines (web server, database server, and mail server) on one physical
server in a data center.
2. Storage Virtualization
Multiple physical storage devices are combined into a single logical storage pool.
Real-world example:
Cloud storage services like Amazon S3 combine many storage devices in data centers to appear as one large storage system for
users.
3. Network Virtualization
Creates virtual networks that operate independently of the physical network hardware.
Real-world example:
Cloud providers such as Amazon Web Services use Amazon Virtual Private Cloud to create isolated virtual networks for
different customers.
4. Desktop Virtualization
User desktops run on a central server instead of local computers, and users access them remotely.
Real-world example:
Many companies use Citrix Virtual Apps and Desktops to allow employees to access their office desktop from home using
laptops or tablets.
33
Virtualization
35
Benefits and Challenges of Virtualization
36
Virtualization
Implementation Levels
and Structures
37
Implementation Levels of Virtualization
1. Instruction Set Architecture (ISA) Level Virtualization
• Virtualization can be
At this level, virtualization is implemented by emulating the
implemented at different processor’s instruction set so that software written for one
layers of a computing system. hardware architecture can run on another.
38
Implementation Levels of Virtualization
2. Hardware Level Virtualization 3. Operating System Level Virtualization
This is the most common virtualization At this level, a single operating system kernel
technique, where a hypervisor (Virtual Machine supports multiple isolated user environments
Monitor) runs directly on hardware and creates called containers.
multiple virtual machines. Example:
Example: • Docker containers running multiple applications
• Using VMware ESXi to run multiple operating on the same OS.
systems on a single server. Advantage:
Advantage: • Lightweight virtualization with low overhead.
• Efficient resource utilization and strong isolation
between VMs.
39
Implementation Levels of Virtualization
4. Library Support Level Virtualization 5. Application Level Virtualization
In this level, special libraries or APIs intercept At this level, virtualization is implemented within the
system calls and provide virtualized functionality. application environment itself, where applications
run inside a virtual runtime environment.
Example: Example:
• Compatibility libraries that allow applications • Applications running on Java Virtual Machine.
designed for one OS to run on another. Advantage:
Advantage: • Platform independence for applications.
• Helps run legacy applications without
modifying them.
40
Implementation Levels of Virtualization
Level Description Example
41
Virtualization Structures – Tools and Mechanisms
43
Virtualization Structures – Tools and Mechanisms
1. Hypervisor (Virtual Machine Monitor – VMM)
45
Virtualization Structures
Containers
Unikernels
46
Virtualization of CPU,
Memory, and I/O Devices
47
Virtualization of CPU, Memory, and I/O Devices
1. CPU Virtualization
Virtualization is a technique that allows multiple CPU virtualization is the technique of allowing multiple virtual
virtual machines (VMs) to share the same machines to share a single physical processor. Each virtual machine is
physical hardware resources. The hypervisor or given one or more virtual CPUs (vCPUs).
Virtual Machine Monitor (VMM) manages and
allocates system resources such as CPU, memory, Working Mechanism
and I/O devices among different virtual • The hypervisor schedules CPU time among different virtual machines.
• Each VM executes instructions using its virtual CPU.
machines. This improves resource utilization,
• The hypervisor performs context switching between VMs.
scalability, and system efficiency in cloud
• Privileged instructions are intercepted and managed by the
computing environments. hypervisor
48
2. Memory Virtualization
Definition
• Memory virtualization allows multiple virtual machines to share the physical memory of a system while maintaining
isolation between them.
Working Mechanism
• Each VM is given a virtual memory space.
• The hypervisor translates virtual addresses into physical addresses.
• Memory management techniques such as paging and segmentation are used.
Techniques Used
• Shadow Page Tables
• The hypervisor maintains mapping between guest virtual memory and host physical memory.
• Ballooning
• Allows the hypervisor to reclaim unused memory from VMs.
• Memory Overcommitment
• The system allocates more virtual memory than the actual physical memory.
Example
• If a server has 32 GB RAM, the hypervisor may allocate 8 GB RAM to each VM while managing memory dynamically.
Advantages
• Efficient memory utilization
• Isolation between virtual machines
• Flexible memory allocation
49
3. I/O Device Virtualization
Definition
I/O virtualization allows multiple virtual machines to share input/output devices such as network cards,
storage disks, keyboards, and printers.
Working Mechanism
•The hypervisor provides virtual I/O devices to each VM.
•Physical I/O devices are managed by the hypervisor.
•Requests from VMs are translated into physical device operations.
Techniques Used
[Link] Emulation
1. The hypervisor emulates standard hardware devices.
[Link] Drivers
1. Special drivers allow direct communication with the hypervisor, improving performance.
[Link] Device Assignment
1. A VM directly accesses a physical device.
Example
Multiple virtual machines may share the same network interface card (NIC) or storage device in a cloud
data center.
Advantages
•Efficient device sharing
•Improved hardware utilization
•Reduced cost of infrastructure
50
≈95%
Hardware-assisted CPU virtualization reaches near-native speed,
boosting performance for cloud and multi-tenant workloads
52
Memory Virtualization Approaches
Paging Segmentation
Divides memory into fixed-size pages, allowing Splits memory into variable-sized segments,
efficient allocation and isolation between virtual providing flexibility and supporting different
machines. application needs.
53
Virtualization Support,
Disaster Recovery, and
Server Virtualization
54
Virtualization Support for Disaster Recovery
Role of Virtualization in Disaster Recovery
55
Key Mechanisms in Virtualization-based Disaster
Recovery
1. VM Snapshots
• A snapshot captures the complete 2. VM Replication
state of a virtual machine including • Virtual machines can be replicated
memory, disk, and configuration at a to another server or data center.
particular time. • If the main server fails, the replica
Example: VM can start immediately.
If a system crashes, the VM can be • Example tools
restored to the previous snapshot. • VMware vSphere Replication
• Microsoft Hyper-V replication.
Benefit
• Quick rollback to a stable state.
56
Key Mechanisms in Virtualization-based Disaster
Recovery
3. Live Migration 5. Failover Mechanism
• Virtualization allows moving virtual • In case of a system failure, another server
machines from one physical server to automatically starts the replicated
another without stopping them. virtual machine.
Example: Example:
• High Availability clusters in virtualized
• VMware vMotion.
environments.
Benefit
• Maintenance can be done without downtime. Advantages of Virtualization in Disaster
4. Backup and Restore Recovery
• Virtual machines are stored as files, making it • Faster recovery time
easy to back them up and restore them when • Reduced hardware dependency
needed. • Easy data replication
• Improved business continuity
Benefit
• Lower operational cost
• Faster system recovery compared to
traditional physical servers.
57
Virtualization Support for Disaster Recovery
58
Server Virtualization Core Strategies
Strategies Partition physical servers into multiple VMs, balance workloads
Technologies, orchestration, and across hosts, and pool compute, memory, and storage resources
market outlook to maximize utilization and resilience.
Enabling Technologies
Hypervisors provide VM isolation, cluster managers coordinate
hosts, and live migration moves VMs with minimal downtime for
maintenance and load shifting.
Market Outlook
Data centers are forecast to exceed 85% virtualization by 2027,
accelerated by cloud adoption and edge computing growth.
59
Conclusion: Integrating Architectures & Virtualization
60