You are on page 1of 18

Distributed and Parallel

System 11
Today’s Menu: Distributed System Model &
Architecture
• Client-Server
• Peer-to-peer
• Three-tier
• Microservice
Client-Server
• The client-server architecture is a distributed computing model where
client devices or applications request services or resources from
centralized servers.
• Client: Devices or applications that initiate requests for services or
data from servers.
• Server: Centralized systems that provide requested services or
resources to clients.
• Example: Your PUIS!!
Client-Server Characteristics & Drawbacks

Characteristics Drawbacks
• Centralized Control: Servers control • Single Point of Failure: Dependency
access to resources and handle client on centralized servers can lead to
requests. system-wide outages if servers fail.
• Scalability: Allows for scalable • Performance Bottlenecks: Heavy
deployment by adding or upgrading reliance on servers can create
servers to handle increasing client performance bottlenecks and latency
demand. issues.
• Reliability: Provides a centralized • Scalability Challenges: Scaling servers
point for managing data and ensuring may require significant investment in
consistent service availability. hardware and infrastructure.
Peer-to-Peer
• The peer-to-peer (P2P) architecture is a distributed computing model
where peers (nodes or devices) communicate and collaborate directly
with each other without centralized control.
• Due to lack of central servers, nobody has any authority over anyone
• True democracy in computing!
Characteristics & Drawbacks:

Characteristics Drawbacks
• Decentralization: Peers operate • Security Concerns: Lack of centralized
autonomously and have equal status control makes P2P networks
in the network. susceptible to security threats and
• Resource Sharing: Peers share malicious activities.
resources (such as files or computing • Resource Availability: Dependence on
power) directly with each other. peers for resources may result in
variability in availability and reliability.
• Scalability: P2P networks can scale
horizontally by adding more peers, • Network Overhead: Increased network
distributing the workload across the overhead due to peer discovery,
network. routing, and data synchronization.
Examples:
• File-sharing networks like BitTorrent
• Yes, your beloved sources of exclusive digital contents are decent example of
distributed system
• YARRRanaika
• Also, if you play Steam games, they also use that approach to “conscript” all
available Steam devices to share their game program during updates on any
client
• Blockchain networks like Bitcoin
• Ethereum is also here, we already talked about it last week-ish
Three-tier
• The three-tier architecture is a distributed computing model
consisting of three distinct layers: presentation, application (logic),
and data.
Layers (or Tiers):
• Presentation Tier: Handles user interface interactions and
presentation logic.
• Application Tier: Implements business logic and application
functionality.
• Data Tier: Manages data storage and access to databases or other
data sources.
• Basically, kinda like MVC
Benefits & Drawbacks

Benefits Drawbacks
• Modular Design: Separation of • Complexity: Three-tier architectures
concerns improves can introduce complexity in design,
development, and management.
maintainability and flexibility.
• Communication Overhead: Increased
• Scalability: Allows for communication overhead between
independent scaling of each tier layers may impact performance and
based on demand. latency.
• Resource Utilization: Over-provisioning
• Interoperability: Enables or under-utilization of resources in
integration with diverse certain tiers may occur, leading to
technologies and platforms. inefficiencies.
Microservices
• The microservices architecture is an
architectural style where an application is
composed of small, independently
deployable services that communicate via
lightweight protocols.
• This scheme is best used when your
application is a clobbered-together app
from other API
• Service Modularity: Applications are
decomposed into small, loosely coupled
services that focus on specific business
capabilities.
• Independent Deployment: Services are
deployed and scaled independently, enabling
rapid development and deployment.
• Polyglot Persistence: Each service can use its
own data storage technology based on its
requirements.
Pros and Cons
Pros Cons
• Agility: Enables rapid • Complexity: Distributed nature of
development, deployment, and microservices introduces complexity in
communication, deployment, and
scaling of individual services. monitoring.
• Scalability: Allows for fine- • Operational Overhead: Managing a
grained scaling of services based large number of microservices can
on demand. require significant operational overhead
in terms of monitoring, debugging, and
• Resilience: Fault isolation and coordination.
graceful degradation improve • Consistency Challenges: Ensuring
system resilience. consistency and coherence across
distributed services may be challenging,
especially in data-intensive applications.
Hands-on:
• Now, given that you had deployed your Engine-X, let’s scale it up and
learn a little about clean-up
• Engine-X is the pronunciation of nginx
• You know, by scaling here means you create several instances of your
app (like that Engine-X)
• Next slide is the thing
Peanut Sauce for the day:
• https://www.slideshare.net/tyrantbrian/microservice-architecture-65
505794
(Wijesuriya, Viraj Brian (2016-08-29) Microservice Architecture,
Lecture Notes - University of Colombo School of Computing, Sri
Lanka)
• https://www.geeksforgeeks.org/three-tier-client-server-architecture-i
n-distributed-system/
• https://www.resilio.com/blog/whats-the-difference-between-peer-to-
peer-and-client-server
• As always, CheatGPT saves my ass
• This time, with the Kubernetes exercise
Your Practical Midterm Report
• Simply put: mention what you make and how you make it
• Include some screenshot indicating whether it works
• Performance comparison between non-parallel and parallel (if you have it!)
• Indicate also where did you parallelize it and why there
• Due next week-ish

You might also like