[go: up one dir, main page]

0% found this document useful (0 votes)
4 views107 pages

DS Lecture 2 & 3 Notes

The document outlines the structure and functioning of web search engines, detailing the processes of crawling, indexing, and ranking. It also discusses the evolution of web search technologies and their application in various contexts, including massively multiplayer online games (MMOG). Key components such as Google Search Engine's methodology and the implications of web crawling for data privacy are highlighted.

Uploaded by

mosesdeus199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views107 pages

DS Lecture 2 & 3 Notes

The document outlines the structure and functioning of web search engines, detailing the processes of crawling, indexing, and ranking. It also discusses the evolution of web search technologies and their application in various contexts, including massively multiplayer online games (MMOG). Key components such as Google Search Engine's methodology and the implications of web crawling for data privacy are highlighted.

Uploaded by

mosesdeus199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 107

THE UNITED REPUBLIC OF TANZANIA

MINISTRY OF TRANSPORT
NATIONAL INSTITUTE OF TRANSPORT

ITU 08106: Distributed Systems

Department of Computing & Communication Technology


Lecture Outline
 Web Search
 Crawling
 Indexing
 Ranking
 Google Search Engine
 Massively Multiplayer Online Games (MMOG)
 Distributed Systems Models
 Physical Models (Early, Internet-scale, and Contemporary Model)
❏ Mobile Computing
❏ Ubiquitous Computing
 Architectural Models
❏ Client-Server Architecture
❏ Peer-to-peer Architecture
❏ Micro-service Architecture
 Fundamental Models
Department of Computing and Communication
Technology (CCT) slide 2
Web Search
❏ Web search refers to the process of retrieving relevant
information from the vast collection of web pages
available on the internet using search engines
❏ Users submit a query, typically a list of keywords, and
receive a list of Web pages that may be relevant, typically
pages that contain the keywords
❏ It is the primary method used by search engines to help
users
❏ Find specific content
❏ Answers to their questions
❏ or Locate resources related to their search queries
Department of Computing and Communication
Technology (CCT) slide 3
Web Search
❏ A web search engine is a software system designed to
search for information on the World Wide Web
❏ The search results are generally presented in a line of
results often referred to as search engine results pages
❏ The information may be a mix of web pages, images,
and other types of files
❏ There are several search engines available
❏ The top web search engines are Google, Bing, Yahoo,
and Duck Duck Go

Department of Computing and Communication


Technology (CCT) slide 4
Web Search
❏ Web search engines involve several stages
❏ Crawling/web crawling
❏ Indexing
❏ Ranking
❏ Stages are used to provide users with accurate and
useful search results
❏ Web search is a complex and ongoing process that
requires significant computational resources, storage
capacity, and sophisticated algorithms

Department of Computing and Communication


Technology (CCT) slide 5
Web Search
❏ Search engines attempt to deliver the most relevant
and useful information to users while considering
factors like freshness, relevance, and user satisfaction
❏ The web search landscape continues to evolve, with
advancements in machine learning, AI, and personalized
search, they better understand user intent and deliver
personalized results

Department of Computing and Communication


Technology (CCT) slide 6
Web Search
❏ Crawling:
❏ Crawling (in the context of the World Wide Web) is the
process by which search engines discover and collect
information from web pages
❏ It is an automated process carried out by specialized software
programs called web crawlers, web spiders, or spider bots
❏ During the crawling process, web crawlers fetch the content
of web pages including HTML, Images, CSS, JavaScript, and
other resources
❏ They analyze the HTML structure to extract links and other
relevant information, such as headings, and text content

Department of Computing and Communication


Technology (CCT) slide 7
Web Search
❏ Crawling:
❏ The extracted data is then used to update the search engine's
index, which is a vast database of web page information
❏ The frequency and depth of the crawling process can vary
depending on factors such as the web's size, the website’s
popularity, and the freshness of the content
❏ Popular search engines like Google employ many distributed
crawlers to efficiently crawl the web and keep their indexes
up to date
❏ Web crawling is not limited to search engines, other entities
such as content aggregators, and data mining applications,
also use web crawlers to collect data from websites
Department of Computing and Communication
Technology (CCT) slide 8
Web Search
❏ Crawling:

Source https://litslink.com/blog/what-is-a-web-crawler-and-how-does-it-work

Department of Computing and Communication


Technology (CCT) slide 9
Web Search

Source https://litslink.com/blog/what-is-a-web-crawler-and-how-does-it-work

Department of Computing and Communication


Technology (CCT) slide 10
Web Search

❏ Email crawling, also known as email scraping or email harvesting


is the process of extracting email addresses from various sources
on the internet
❏ It involves using automated software or scripts to search
websites, forums, social media platforms, and other online
sources to collect email addresses
❏ Email crawling can be performed for legitimate purposes, such
as building mailing lists for marketing or communication with
customers it can also be used for malicious activities, such as
spamming or phishing
Department of Computing and Communication
Technology (CCT) slide 11
Web Search

❏ Email crawling raises privacy and legal concerns


❏ Harvesting email addresses without the consent of the
individuals or violating the terms and conditions of websites can
lead to legal consequences
❏ Many websites implement measures to protect against email
crawling, such as
❏ Use Contact Forms: Instead of displaying email addresses directly on
websites, organizations can utilize contact forms, which help protect
against email harvesting while still allowing users to send messages
❏ Email Filtering and Security Measures: Employ spam filters to detect and
prevent malicious emails
Department of Computing and Communication
Technology (CCT) slide 12
Web Search

❏ News crawling is the process of automatically gathering news


articles and related information from various news websites
and sources
❏ It involves using crawling software to systematically visit news
sites, extract article content, and store them for further
analysis or dissemination
❏ News from all over the world can be spread rapidly around the
Web, and extracting data from various websites can be quite
unmanageable

Department of Computing and Communication


Technology (CCT) slide 13
Web Search

❏ This type of crawling is applied to images


❏ The Internet is full of visual representations, the bots help
people find relevant pictures across the Web
❏ It involves using software or scripts to search websites, online
galleries, social media platforms, or other image repositories
to collect images
❏ These crawlers gather images from different sources and
aggregate them into a single platform or database, creating a
repository of images for users to access and browse
Department of Computing and Communication
Technology (CCT) slide 14
Web Search

❏ Social media crawling is the process of automatically collecting


data from social media platforms
❏ It involves using spider software to extract information from
social media sites, such as user profiles, posts, comments, likes,
followers, or other relevant data
❏ Not all social media platforms allow to be crawled as it can be
illegal if it violates data privacy compliance
❏ Pinterest and Twitter allow spider bots to scan their pages if
they are not user-sensitive and do not disclose any personal
information. Facebook and LinkedIn are strict about crawling
Department of Computing and Communication
Technology (CCT) slide 15
Web Search

❏ Video crawling is the process of automatically extracting


videos from various sources on the internet
❏ If you decide to embed YouTube, Soundcloud, Vimeo, or any
other video content into the website, it can be indexed by
some web crawlers
❏ After these videos have been crawled from different sources,
they are gathered into a single platform or database, creating
a centralized repository of videos for users to access and
browse

Department of Computing and Communication


Technology (CCT) slide 16
Web Search
❏ Indexing:
❏ Indexing (in the context of search engines) is the process of
organizing and storing web page information retrieved by
web crawlers into a structured and searchable format
❏ The purpose of indexing is to create a database of web pages
that can be quickly searched and retrieved in response to
user queries
❏ After the crawler extracts data from the web it sends them to
the search engine's indexing system
❏ The indexing system then processes and stores the
information in its index database of web page data

Department of Computing and Communication


Technology (CCT) slide 17
Web Search
❏ Indexing:
❏ During the indexing process, the search engine applies
various algorithms and techniques to analyze and interpret
the content of web pages
❏ The technique includes identifying keywords, understanding
the relevance and context of the content, and determining
the relationship between different web pages
❏ The indexing process is ongoing and dynamic
❏ When new web pages are discovered by crawlers, their
contents are indexed and added to the database
❏ Similarly, updates to existing web pages are reflected in the
index to ensure that search results remain up to date
Department of Computing and Communication
Technology (CCT) slide 18
Web Search
❏ Ranking:
❏ Ranking is the process of determining the order in which
search results are displayed to users in response to their
search query
❏ When a user enters a search query, the search engine's
ranking algorithms analyze various factors to determine the
importance and quality of web pages and assign them a
ranking position
❏ Search engine ranking algorithms are complex and they
continuously evolve to provide the most accurate and useful
search results

Department of Computing and Communication


Technology (CCT) slide 19
Web Search
❏ Ranking:
❏ While the exact details of these algorithms are secrets,
several known factors play a role in determining search
rankings which include
❏ Relevance: The search engine assesses the relevance of web pages to
the user's query by analyzing factors such as keyword usage, content
quality, and topical focus (Pages that are more relevant to the query
are assigned higher rankings)
❏ Content Freshness: The freshness and recency of content can impact
rankings, particularly for queries that require up-to-date information
❏ Search engines may prioritize pages with recent content
depending on the query intent

Department of Computing and Communication


Technology (CCT) slide 20
Web Search
❏ Ranking:
❏ While the exact details of these algorithms are secrets,
several known factors play a role in determining search
rankings which include
❏ Mobile Friendliness: With the increasing use of mobile devices,
search engines place importance on the mobile-friendliness of web
pages
❏ Pages that are optimized for mobile devices may receive a
ranking boost in mobile search results
❏ Search engine ranking is a dynamic process and regularly
updating their algorithms to adjust rankings based on
changing factors
Department of Computing and Communication
Technology (CCT) slide 21
Web Search: Google Search Engine
❏ Google search engine goes through the world wide web to
gather information from across hundreds of billions of
web pages to find, understand, and present results to
users
❏ The process of how the Google search engine works can
be summarized in the following steps
❏ Crawling: Google uses crawling to discover new information and add
to its catalog
❏ Usually, the way Google finds a new website is by following links from
one website to another
❏ Let’s say you have a website where you sell cupcakes, Once your
website has been crawled, Google knows this website exists
Department of Computing and Communication
Technology (CCT) slide 22
Web Search: Google Search Engine
❏ The process of how the Google search engine works can
be summarized in the following steps
❏ Indexing: Once Google has found your website, it analyzes the
content on your page and organizes it in Google’s library of
information (This is called indexing)
❏ Let’s go back to the example of your cupcake website - Once your
website has been indexed, Google not only knows the website
exists, but it has looked through the product pages on your site and
understands that you sell 10 different kinds of cupcakes, including
gluten-free cupcakes

Department of Computing and Communication


Technology (CCT) slide 23
Web Search: Google Search Engine
❏ The process of how the Google search engine works can
be summarized in the following steps
❏ Ranking: When a user types something into a search box, Google looks
through its massive library of content to figure out which web pages
would be most relevant to the user
❏ To present the most useful results first, Google may consider factors
like user’s location and language, for example, in addition to the words
they searched (This process is called ranking)
❏ This means that when someone types “gluten-free cupcakes” into a
search box and they are based in your hometown, they’re more likely
to see your website in the results, whereas someone typing the same
search from a different country probably wouldn’t see your business

Department of Computing and Communication


Technology (CCT) slide 24
Web Search: Google Search Engine

Source https://neilpatel.com/blog/how-google-search-engine-really-works/

Department of Computing and Communication


Technology (CCT) slide 25
Web Search: Google Search Engine

Source https://neilpatel.com/blog/deindex-your-pages/

Department of Computing and Communication


Technology (CCT) slide 26
Web Search: Google Search Engine

https://youtu.be/_0QOePCkyK4

Department of Computing and Communication


Technology (CCT) slide 27
Web Search: Google Search Engine

https://www.youtube.com/watch?v=0eKVizvYSUQ

Department of Computing and Communication


Technology (CCT) slide 28
Massively Multiplayers Online Games(MMOG)

❏ Massively multiplayer online games (MMOs) are video


games that include hundreds or thousands of players who
interact simultaneously and in real-time in a persistent
virtual world (played online)
❏ They utilize the Internet, although they may be played on a
computer or game console such as an Xbox or PlayStation
❏ There are many types of MMOs including role-playing
games (e.g. Ever-quest, EVE online), first-person shooter
and survival games (Fortnite), racing games, etc
❏ They may take place in fantasy worlds or virtual worlds that
correspond with specific locations like battlefields or cities
Department of Computing and Communication
Technology (CCT) slide 29
Massively Multiplayers Online Games(MMOG)

❏ Massively multiplayer online games (MMOG) involve many


technologies (3D graphics, networking, AI) and a large
amount of data that is generated by the interactions of
many individuals in a distributed system
❏ In the game, the player starts at a low level or rank and
progresses until he or she has achieved the maximum level
or rank
❏ During a player's journey, they gain new abilities, skills,
better gear, and access advanced areas in the game that
often require a party or raid of people to complete

Department of Computing and Communication


Technology (CCT) slide 30
Massively Multiplayers Online Games(MMOG)

❏ EVE Online: is a popular and highly admired massively


multiplayer online game (MMOG) developed and published
by CCP Games
❏ It is set in a vast science fiction universe where players take
on the role of spaceship pilots, known as "capsuleers," and
engage in various activities such as exploration, combat,
trade, and industry
❏ The game does not tell you what to do
❏ There are no ‘main quests’, classes, or any plot

Department of Computing and Communication


Technology (CCT) slide 31
Massively Multiplayers Online Games(MMOG)

❏ The game has a tutorial (in the form of a university), guidelines,


suggestions, and small quests to get you started, but you are
ultimately responsible for finding your entertainment and your
interaction with the rest of the 50,000 other players will
determine your place in the world of EVE Online
❏ Flying through the system you will realize that the patrolling
police ships are also players in the game
❏ Their job is to defend you from the pirates, who are also
players, robbing the trade routes and looking for an easy kill
and steal (how much danger you’re in depends on the security
status of the system from -1 [Very Unsafe] to +1 [Very Safe])
Department of Computing and Communication
Technology (CCT) slide 32
Massively Multiplayers Online Games(MMOG)

❏ Stealing and scamming are a part of the game, called


‘griefing’, as it is a part of real life
❏ And just like real life, EVE Online practices a sort of perma-
death (permanent death) where you lose your ship,
everything in your cargo, and all implants in your character
at the moment of death
❏ In other words, dying in EVE Online has very serious
consequences
❏ So serious that EVE Online has one of the highest incidences
of ‘raging’ players who sometimes rage quit the whole game
after a terrible defeat
Department of Computing and Communication
Technology (CCT) slide 33
Massively Multiplayers Online Games(MMOG)

❏ There are corporations and factories in the game, almost all


of them owned and controlled by players
❏ This means that players almost completely handle the
economy and politics of the game
❏ EVE Online practices an open economy, stocks and prices
for items rise and fall depending on supply and demand
❏ ‘Supply’ in this case, is again almost solely controlled by the
players, who manufacture and provide goods and services

Department of Computing and Communication


Technology (CCT) slide 34
Massively Multiplayers Online Games(MMOG)

EVE Online Official GamePlay Trailer. Source https://www.youtube.com/watch?v=sPFII3ozSHI

Department of Computing and Communication


Technology (CCT) slide 35
Distributed System Models
 Distributed system models are conceptual frameworks
that help to describe and understand the structure and
behavior of distributed systems
 A distributed system is a collection of interconnected
computers or nodes that work together to achieve a
common goal
 These interconnected computers/nodes are intended for
use in real-world environments
 They should be designed to function correctly in the
widest possible range of circumstances and handle many
possible difficulties and threats
Department of Computing and Communication
Technology (CCT) slide 36
Distributed System Models
 Three Distributed System Models
 Physical Models
 Architectural Model
 Fundamental Model
 Physical Model
 A physical model of distributed systems refers to the
hardware and network configurations that comprise a
distributed computing environment
 Focuses on the arrangement and organization of the
hardware infrastructure, including servers, networking
equipment, and storage, that supports a distributed system
Department of Computing and Communication
Technology (CCT) slide 37
Distributed System Models
 Physical Model
 Baseline physical model: A distributed system is defined as
one in which hardware or software components located at
networked computers communicate and coordinate their
actions only by using messages passing
 Under this baseline model, three generations of distributed
systems are identified
 Early distributed systems
 Internet-scale distributed systems
 Contemporary distributed systems

Department of Computing and Communication


Technology (CCT) slide 38
DS Models – Physical Model
 Physical Model
 Baseline physical model:
 Early distributed systems: Such systems emerged in the late 1970s
and early 1980s in response to the emergence of local area
networking technology, usually Ethernet
 These systems typically consisted of between 10 and 100 nodes
interconnected by a local area network, with limited Internet
connectivity, and supported a small range of services such as shared
local printers and file servers as well as email and file transfer
 Individual systems were largely homogeneous, and openness was not
a primary concern
 Providing quality service was still very much in its infancy and was a
focal point for much of the research around such early systems

Department of Computing and Communication


Technology (CCT) slide 39
DS Models – Physical Model
 Physical Model
 Baseline physical model:
 Internet-Scale Distributed System: larger-scale distributed systems
started to emerge in the 1990s in response to the growth of the Internet
during this time (for example, the Google search engine was first
launched in 1996)
 In such systems, the underlying physical infrastructure consists of an
extensible set of nodes interconnected by a network of networks (the
Internet)
 They incorporate large numbers of nodes and provide distributed system
services for global organizations and across organizational boundaries
 The level of heterogeneity in such systems is significant in terms of
networks, computer architecture, operating systems, languages, and the
development teams involved
Department of Computing and Communication
Technology (CCT) slide 40
DS Models – Physical Model
 Physical Model
 Baseline physical model:
 Contemporary Distributed System: In the systems mentioned above,
nodes were typically desktop computers and therefore relatively static
(they remain in one physical location for extended periods), discrete (not
embedded within other physical entities), and autonomous (to a large
extent independent of other computers in terms of their physical
infrastructure)
 The emergence of mobile computing has led nodes such as laptops
or smartphones to move from location to location in a distributed
system leading to the need for added capabilities such as service
discovery and support for interoperation

Department of Computing and Communication


Technology (CCT) slide 41
DS Models – Physical Model
 Physical Model
 Baseline physical model:
 Contemporary Distributed System:
 The emergence of ubiquitous computing has led to a move from
discrete nodes to architectures where computers are embedded in
everyday objects and the surrounding environment (for example, in
washing machines or smart homes more generally)
 The emergence of cloud computing, in particular, cluster
architectures has led to a move from autonomous nodes performing
a given role to pools of nodes that together provide a given service
(for example, a search service as offered by Google)

Department of Computing and Communication


Technology (CCT) slide 42
DS Models – Physical Model
 Mobile Computing
 The term “mobile computing” is a distributed system that
refers to a group of devices, services, and operational
methods that allow users to access computing, data, and
related resources and capabilities while on the go
 In mobile computing, a computer is expected to be carried
around while being used, allowing for data, voice, and video
transmission
 Mobile hardware, mobile software, and mobile
communication are all components of mobile computing

Department of Computing and Communication


Technology (CCT) slide 43
DS Models – Physical Model
 Mobile Computing
 Mobile Computing Devices: Any device built utilizing mobile
parts such as mobile hardware and software is called a mobile
computing device
 Portable devices that can function like a standard computer
device in terms of operation, execution, and provision of
services and applications are known as mobile computing
devices
 Mobile Computing Characteristics:
 User mobility (portability): The simplicity with which a gadget can be
moved between multiple environments or within a learning environment
 The same service should be usable while the user moves from one
physical place to another
Department of Computing and Communication
Technology (CCT) slide 44
DS Models – Physical Model
 Mobile Computing
 Mobile Computing Characteristics:
 Network mobility: The same service should be accessible to users as
they switch between networks
 Device Mobility: The user should be able to switch between devices
and continue using the same service
 Mobile Computing Involve:
 Mobile infrastructure: The technical components that allow devices
to communicate are called infrastructure
 The wireless networks, protocols, and data formats are all parts
of the mobile infrastructure

Department of Computing and Communication


Technology (CCT) slide 45
DS Models – Physical Model
 Mobile Computing
 Mobile Computing Involve:
 Mobile hardware: The mobile hardware consists of the user-
interactive hardware and the actual mobile device
 Cell phones, laptops, tablets, and wearable computers, together
with the corresponding chargers and peripherals, fall under this
category
 Mobile software: Mobile software includes user-facing programs like
mobile browsers and e-commerce programs as well as mobile
operating systems (OSes), which are programs that operate on
mobile devices

Department of Computing and Communication


Technology (CCT) slide 46
DS Models – Physical Model
 Mobile Computing

Source
https://www.researchgate.net/profile/Aa
kash-Ahmad-
2/publication/322347133_Classification_a
nd_Mapping_of_Adaptive_Security_for_
Mobile_Computing/links/5d680a8ca6fdcc
adeae42573/Classification-and-Mapping-
of-Adaptive-Security-for-Mobile-
Computing.pdf?origin=publication_detail

Department of Computing and Communication


Technology (CCT) slide 47
DS Models – Physical Model
 Ubiquitous Computing
 Ubiquitous computing also known as pervasive computing or
ubicomp is the concept of integrating computing technology
(smart products) into the everyday environment making it
widespread and invisible in our daily lives
 Or is it a new concept that involves embedding
microprocessors in ordinary things that are interconnected so
that they can share/provide information and services to users
 The goal of ubiquitous computing is to create an environment
where computers and computational capabilities are
integrated into the physical world and become part of our
surroundings
Department of Computing and Communication
Technology (CCT) slide 48
DS Models – Physical Model
 Ubiquitous Computing
 Ubicomp systems aim for a heterogeneous set of devices including
 Invisible computers embedded in objects such as cars and furniture
 Mobile devices such as personal digital assistants (PDAs) and
smartphones
 Personal devices such as laptops and
 Very large devices such as wall-sized displays and tabletop computers
situated in the environments and buildings
 All these devices have different operating systems, networking
interfaces, input capabilities, and displays
 Some are designed for end-user interaction such as a public display
whereas other devices such as sensors are not used directly by end
users
Department of Computing and Communication
Technology (CCT) slide 49
DS Models – Physical Model
 Ubiquitous Computing
 The interaction mode goes beyond the one-to-one model common
for PCs
 It may involve a many-to-many model where the same person uses
multiple devices, and several persons may use the same device
 The interaction may be invisible or through sensing natural
interactions such as speech, gesture, or presence: a wide range of
sensors is required, both sensors built into the devices as well as
sensors embedded in the environment
 Location tracking devices and cameras can be used to detect who is
in a place and deduce what they are doing

Department of Computing and Communication


Technology (CCT) slide 50
DS Models – Physical Model
 Ubiquitous Computing
 Networking is wireless and ad-hoc in the sense that many
devices come in contact with each other naturally and
communicate to establish services
 When they depart, the network setup changes for both the device and
the environment
 Real-life Examples of Ubiquitous Computing
 Location-based services: Applications that use location-based services
(e.g., GPS) are a practical example of ubiquitous computing
 They provide personalized information, directions, and
recommendations based on the user’s location, whether it’s finding
nearby restaurants, navigating through maps, or tracking fitness
activities
Department of Computing and Communication
Technology (CCT) slide 51
DS Models – Physical Model
 Ubiquitous Computing
 Real-life Examples of Ubiquitous Computing
 Smart homes: Ubiquitous computing is seen in smart homes where
various devices like lighting systems, security cameras, and appliances
are interconnected
 They can be controlled and monitored remotely through smartphones or
voice assistants
 These smart appliances offer convenience, energy efficiency, and
security
 Wearable devices: Smartwatches, fitness trackers, and augmented
reality glasses are examples of ubiquitous computing
 They collect and exchange data, monitor health metrics, provide
notifications, and enable interaction with other devices — all seamlessly
integrated into our personal lives
Department of Computing and Communication
Technology (CCT) slide 52
DS Models – Physical Model
 Ubiquitous Computing
 Real-life Examples of Ubiquitous Computing
 Digital assistants: Virtual assistants like Google Assistant, or Apple Siri
are examples of ubiquitous computing in action
 They use advanced technologies (like natural language processing and
voice recognition) to respond to a user’s voice commands
 Users can get helpful information, control smart devices, and get
assistance with tasks

Department of Computing and Communication


Technology (CCT) slide 53
DS Models – Physical Model
 Three Distributed System Models
 Physical Models: describe a system in a way that captures
the hardware composition of a system in terms of the
computers (and other devices, such as mobile phones) and
their interconnecting networks
 It is primarily used to design, manage, implement, and determine the
performance of a distributed system
 A physical model majorly consists of the following components
 Nodes: Nodes are the end devices that can process data, execute
tasks, and communicate with the other nodes
 These end devices are generally the computers at the user end
or can be servers, workstations, etc.

Department of Computing and Communication


Technology (CCT) slide 54
DS Models – Physical Model
 Three Distributed System Models
 Physical Models: A physical model majorly consists of the
following components
 Links: Links are the communication channels between different
nodes and intermediate devices
 These may be wired or wireless
 Wired links or physical media are implemented using copper
wires, fibre optic cables, etc
 The choice of the medium depends on the environmental
conditions and the requirements
 Physical links are required for high-performance and real-time
computing

Department of Computing and Communication


Technology (CCT) slide 55
DS Models – Physical Model
 Three Distributed System Models
 Physical Models: A physical model majorly consists of the
following components
 Links:
 Different connection types can be implemented:
 Point-to-point links – They establish a connection and allow data
transfer between only two nodes
 Broadcast links – These enable a single node to transmit data to
multiple nodes simultaneously
 Multi-Access links – Multiple nodes share the same
communication channel to transfer data (Requires protocols to
avoid interference while transmission)

Department of Computing and Communication


Technology (CCT) slide 56
DS Models – Physical Model
 Three Distributed System Models
 Physical Models: A physical model majorly consists of the
following components
 Middleware: These are the software installed and executed on the
nodes
 By running middleware on each node, the distributed
system achieves decentralized control and decision-making
 It handles various tasks like communication with other nodes,
resource management, fault tolerance, synchronization of
different nodes, and security to prevent malicious and
unauthorized access

Department of Computing and Communication


Technology (CCT) slide 57
DS Models – Physical Model
 Three Distributed System Models
 Physical Models: A physical model majorly consists of the
following components
 Network Topology: This defines the arrangement of nodes and links
in the distributed computing system
 The most common topologies that are implemented are bus,
star, mesh, ring, or hybrid
 The choice of topology depends on the requirements
 Communication Protocols: – are the set rules and procedures for
transmitting data from the links
 Examples of these protocols include TCP, UDP, HTTPS, etc
 These allow the nodes to communicate and interpret the data

Department of Computing and Communication


Technology (CCT) slide 58
DS Models – Physical Model
 Three Distributed System Models - Physical Models

Source https://www.geeksforgeeks.org/distributed-computing-system-models/

Department of Computing and Communication


Technology (CCT) slide 59
DS Models – Architectural Models
 Three Distributed System Models
 Architectural models: The architectural model is the overall
design and structure of the system and how different
components are organized to interact with each other and
provide the desired functionalities
 It is an overview of the system on how well the development,
deployment, and operations take place
 It describes a system in terms of the computational and
communication tasks performed by its computational elements
 The computational elements are individual computers or aggregates
of them supported by appropriate network interconnections

Department of Computing and Communication


Technology (CCT) slide 60
DS Models – Architectural Models
 Three Distributed System Models
 Architectural models: the main architectural models
employed in distributed systems or the architectural styles of
distributed systems
 Client-server Architectural Model
 Peer-to-peer Architectural Model
 “Micro-service Architectural Model”

Department of Computing and Communication


Technology (CCT) slide 61
DS Models – Architectural Models
 Three Distributed System Models
 Communicating entities:
 The entities that communicate in a distributed system are processes,
leading to the view of a distributed system as processes attached to
the appropriate inter-process communication concepts
 In some environments such as sensor networks, the underlying
operating systems may not support process notions (or indeed any
form of isolation), and hence the entities that communicate in such
systems are nodes
 Also, In most distributed system environments, processes are
accompanied by threads, so, strictly speaking, it is threads that are
the endpoints of communication

Department of Computing and Communication


Technology (CCT) slide 62
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model): Considers how entities
communicate in a distributed system
 Entities in distributed systems are communicating using three
types of communication models
 Interprocess Communication: inter-process communication (IPC) is a
mechanism that allows processes to communicate with each other and
synchronize their actions
 The communication between processes can be seen as a method of
cooperation, data exchange, and coordination to perform a certain task
 The choice of IPC mechanism depends on factors such as the programming
language, the operating system, the complexity of the communication, the
need for synchronization, and the performance requirements of the
application
Department of Computing and Communication
Technology (CCT) slide 63
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model):
 Interprocess Communication:
 Processes can communicate with each other through
 Pipes: A pipe is a unidirectional communication channel that
allows the output of one process to be used as the input of
another process
 Shared Memory: Shared memory allows multiple processes
to access the same memory region
 The processes can read from and write to this shared
memory area, enabling fast and efficient communication (It
requires proper synchronization mechanisms to prevent
data corruption in concurrent access scenarios)

Department of Computing and Communication


Technology (CCT) slide 64
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model):
 Interprocess Communication:
 Processes can communicate with each other through
 Message Passing: Message passing involves processes
sending and receiving messages through a communication
channel provided by the operating system or a middleware
 Messages can be sent in either a synchronous or
asynchronous manner (In the synchronous mode, the
sender execution (blocks) waits until the receiver
acknowledges receipt of the message, while in the
asynchronous mode, the sender continues its execution
without waiting for a response

Department of Computing and Communication


Technology (CCT) slide 65
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model):
 Remote Invocation: represents the most common communication
paradigm in distributed systems
 It covers techniques based on a two-way exchange between
communicating entities in a distributed system and resulting in the
calling of a remote operation, procedure, or method
 Techniques in Remote Invocation include
 Request-Reply Protocols: are patterns imposed on message-
passing services to support client-server computing
 Involve a pairwise exchange of messages from client to server and
then from server back to client

Department of Computing and Communication


Technology (CCT) slide 66
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Remote Invocation:
 Techniques in Remote Invocation include
 Remote Procedure Call: Remote Procedure Call (RPC) is a
mechanism that allows a program running on one computer to
invoke a procedure or function in another computer or process over
a network
 It enables inter-process communication (IPC) between different
systems
 The underlying RPC system hides important aspects of distribution,
including the encoding and decoding of parameters and results, the
passing of messages, and the preserving of the required semantics
for the procedure call
Department of Computing and Communication
Technology (CCT) slide 67
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Remote Invocation:
 Techniques in Remote Invocation include
 Remote Procedure Call: The concept of remote invocation
involves the following components
 The Client: The client is the program or process that initiates
the remote call (It wants to use a procedure or function that
resides in a remote process or machine)
 The Server: The server is the program or process that
provides the procedure, function, or service to be used
remotely (It waits for client requests and executes the
requested procedures)

Department of Computing and Communication


Technology (CCT) slide 68
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Remote Invocation:
 Techniques in Remote Invocation include
 Remote Procedure Call:
 The Stub: is a piece of code that translates parameters sent between
the client and server during RPC
 The client-side stub (also known as a proxy) and the server-side stub
(also known as a skeleton) are responsible for handling the
communication between the client and the server
 The client-side stub encapsulates the remote procedure call, packs the
input parameters, and sends them over the network to the server-side
stub
 The server-side stub receives the request, unpacks the parameters,
executes the procedure, and sends the result back to the client
Department of Computing and Communication
Technology (CCT) slide 69
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Remote Invocation:
 Remote Procedure Call: The steps involved
 Client prepares the remote invocation: The client prepares the
input parameters for the remote procedure call, and it organizes
(marshals/serializes) the parameters into a format suitable for
transmission over the network
 The client sends the remote invocation request: The client-side
stub sends the remote invocation request, including the
marshaled parameters, to the server-side stub (The request is
typically sent using network protocols like TCP/IP or UDP)

Department of Computing and Communication


Technology (CCT) slide 70
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Remote Invocation:
 Remote Procedure Call: The steps involved
 The server receives the remote invocation request: The server-side
stub receives the remote invocation request and unmarshals
(deserializes/unpacks) the parameters
 The server executes the remote procedure: The server executes the
requested procedure using the provided parameters
 The server prepares the response: After executing the procedure,
the server-side stub marshals/packs the result (if any) into a format
suitable for transmission over the network
 The server sends the response to the client: The server-side stub
sends the response back to the client-side stub
Department of Computing and Communication
Technology (CCT) slide 71
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Remote Invocation:
 Remote Procedure Call: The steps involved
 The client receives the response: The client-side stub receives
the response and unmarshals/unpacks the result
 The client continues execution: The client receives the result
and can continue its execution, using the returned value if
necessary

Department of Computing and Communication


Technology (CCT) slide 72
DS Models – Architectural Models
 Communication Paradigm (Model)
 Remote Invocation:
 Remote Procedure Call:

Source https://www.geeksforgeeks.org/distributed-
computing-system-models/

Department of Computing and Communication


Technology (CCT) slide 73
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 The techniques mentioned all have one thing in common
 Communication represents a two-way relationship between a sender and a
receiver with senders explicitly directing messages/invocations to the
associated receivers
 Receivers are also generally aware of the identity of senders, and in most
cases, both parties must exist at the same time
 Indirect Communication Model: Several techniques have emerged
whereby communication is indirect, through a third entity, allowing a strong
degree of decoupling between senders and receivers
 Senders do not need to know who they are sending messages to
 Senders and receivers do not need to exist at the same time

Department of Computing and Communication


Technology (CCT) slide 74
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Indirect Communication: Key techniques for indirect communication
 Group communication: Group communication involves the delivery
of messages to a set of recipients and hence is a multiparty
communication paradigm supporting one-to-many communication
 Group communication relies on the abstraction of a group which is
represented in the system by a group identifier
 Recipients elect to receive messages sent to a group by joining the
group
 Senders then send messages to the group via the group identifier
and do not need to know the recipients of the message
 Groups also maintain group membership and include mechanisms to
deal with the failure of group members
Department of Computing and Communication
Technology (CCT) slide 75
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Indirect Communication: Key techniques for indirect communication
 Publish-subscribe systems: These are systems such that a large
number of producers (or publishers) distribute information items of
interest (events) to a similarly large number of consumers (or
subscribers)
 Publish-subscribe systems all share the crucial feature of providing
an intermediary service that efficiently ensures information
generated by producers is routed to consumers who desire this
information
 Publish-Subscribe enables the movement of messages between
different components of the system without the components being
aware of each other’s identity (they are decoupled)
Department of Computing and Communication
Technology (CCT) slide 76
DS Models – Architectural Models
 Three Distributed System Models
 Communication Paradigm (Model)
 Indirect Communication: Key techniques for indirect communication
 Publish-subscribe systems: provides a framework for exchanging
messages between publishers (components that create and send
messages) and subscribers (components that receive and consume
messages)
 Publishers don’t send messages to specific subscribers in a point-to-
point manner
 Instead, an intermediary is used - a Publish-Subscriber message
broker that groups messages into entities called channels (or topics)

Department of Computing and Communication


Technology (CCT) slide 77
DS Models – Architectural Models
 Indirect Communication:
 Pub/sub

Source https://ably.com/topic/pub-sub

Department of Computing and Communication


Technology (CCT) slide 78
DS Models – Architectural Models
 Client-Server Architectural Model
 It is a centralized approach in which the clients initiate
requests for services and servers respond by providing those
services
 It mainly works on the request-response model where the
client sends a request to the server and the server processes
it and responds to the client accordingly
 It can be achieved by using TCP/IP and HTTP protocols on the
transport layer
 This is mainly used in web services, cloud computing,
database management systems, etc

Department of Computing and Communication


Technology (CCT) slide 79
DS Models – Architectural Models
 Client-Server Architectural Model
 Servers may also be clients of other servers
 For example, a web server is often a client of a local file
server that manages the files in which the web pages are
stored
 Web servers and most other Internet services are clients of
the DNS service which translates Internet domain names to
network addresses
 Search engines are both a server and a client: they respond to
queries from browser clients and at the same time they runs
web crawlers that act as clients of other web servers

Department of Computing and Communication


Technology (CCT) slide 80
DS Models – Architectural Models
 Client-Server Architectural Model

Department of Computing and Communication


Technology (CCT) slide 81
DS Models – Architectural Models
 Client-Server Architectural Model: Key Characteristics &
Components
 Clients: Clients are the end-user applications or processes that
interact with the system by sending requests to servers
 Clients can be desktop applications, web browsers, mobile apps, or any other
software component that requires services or resources provided by servers
 Clients are responsible for initiating communication, composing requests, and
processing responses from servers
 Servers: Servers are the central components of the system that
provide services, resources, or data to clients
 They receive requests from clients, process those requests, and send back
responses
 Servers are designed to handle multiple client connections concurrently and
manage the resources required to provide the requested services
Department of Computing and Communication
Technology (CCT) slide 82
DS Models – Architectural Models
 Client-Server Architectural Model: Key Characteristics &
Components
 Communication: Communication between clients and servers
happens over a network using standard protocols such as HTTP,
TCP/IP, or UDP
 Clients establish connections with servers to send requests and receive
responses
 The communication can be synchronous - where clients wait for a
response before proceeding; or asynchronous - where clients continue
their operation while waiting for a response

Department of Computing and Communication


Technology (CCT) slide 83
DS Models – Architectural Models
 Client-Server Architectural Model: Key Characteristics &
Components
 Request-Response Model: The client-server model follows a
request-response paradigm
 Clients send requests to servers, specifying the desired service or
resource and any required parameters
 Servers receive the requests, process them, and generate responses
containing the requested information or the result of the requested
operation
 The responses are sent back to the clients, completing the request-
response cycle

Department of Computing and Communication


Technology (CCT) slide 84
DS Models – Architectural Models
 Client-Server Architectural A service provided by multiple servers

Model: Key Characteristics &


Components
 Scalability and Load Balancing:
The client-server model allows
for scalability by distributing the
load among multiple servers
 Load balancing techniques can be
employed to distribute client
requests across multiple servers to
ensure efficient resource
utilization and provide better
performance

Department of Computing and Communication


Technology (CCT) slide 85
DS Models – Architectural Models
 Peer-to-peer (P2P) Architectural Model
 It is a decentralized approach in which all the distributed
computing nodes, known as peers play similar roles
 There is no distinction between client and server processes
 In practical terms, all participating processes run the same
program and offer the same set of interfaces to each other
 It is a highly scalable model because the peers can join and
leave the system dynamically which makes it an ad-hoc form of
network
 The resources are distributed and the communication is directly
done amongst the peers without any intermediaries according
to some set rules and procedures defined in the P2P networks
Department of Computing and Communication
Technology (CCT) slide 86
DS Models – Architectural Models
 Peer-to-peer (P2P)
Architectural Model
 A peer-to-peer
applications are
composed of large
numbers of peer
processes running on
separate computers and
the pattern of
communication between
them depends entirely on
application requirements
Department of Computing and Communication
Technology (CCT) slide 87
DS Models – Architectural Models
 Micro-service Architectural Model
 In this system, a complex application or task is decomposed
into multiple independent tasks and these services run on
different servers
 Each service performs only a single function and is focused on
a specific business capability
 This makes the overall system more maintainable, scalable,
and easier to understand
 Services can be independently developed, deployed, and
scaled without affecting the ongoing services, any
communication between individual components happens via
well-defined APIs
Department of Computing and Communication
Technology (CCT) slide 88
DS Models – Architectural Models
 Micro-service Architectural Model

Source https://microservices.io/patterns/microservices.html

Department of Computing and Communication


Technology (CCT) slide 89
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Is a technique to organize the functionality of a given
layer and place this functionality into appropriate servers
 Two-tiered architecture pattern: Two-tier architecture, also known
as client-server architecture, is a software architectural pattern that
divides an application into two tiers or layers
 It consists of a client tier and a server tier - each responsible for
specific functionality and communication
 The client and server tiers are typically connected over a network
such as the internet
 The communication between the client and server tiers can be
achieved through various protocols, such as HTTP, TCP/IP, or RPC
(Remote Procedure Call)
Department of Computing and Communication
Technology (CCT) slide 90
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Is a technique to organize the functionality of a given
layer and place this functionality into appropriate servers
 Two-tiered architecture pattern:
 Client Tier: The client tier is responsible for providing the user
interface and handling the user interaction
 It typically includes user-facing components such as desktop
applications, web browsers, or mobile apps
 The client tier is responsible for presenting information to the
user, collecting user inputs, and sending requests to the server
tier for processing
 It may also include some local processing or caching of data to
enhance performance
Department of Computing and Communication
Technology (CCT) slide 91
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Is a technique to organize the functionality of a given layer
and place this functionality into appropriate servers
 Two-tiered architecture pattern:
 Server Tier: The server tier, also known as the application or
backend tier, handles the core processing and data management
 It receives requests from the client tier, performs the necessary
computations, and returns the results to the client
 The server tier is responsible for implementing the business logic,
accessing data sources (such as databases or external services),
and performing any necessary data manipulation or transformation
 It processes the client's requests and sends back the appropriate
responses
Department of Computing and Communication
Technology (CCT) slide 92
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Two-tiered architecture pattern:
They are suitable for
simpler applications where
the client handles the
presentation logic and the
server focuses on data
processing and storage. It
is often used for small-
scale applications and it
may not scale well for large
and complex systems

Department of Computing and Communication


Technology (CCT) slide 93
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Three-tiered architecture pattern: Three-tier architecture,
also known as n-tier architecture, is a software architectural
pattern that divides an application into three distinct tiers or
layers
 Each tier has specific responsibilities and communicates with the
other tiers to achieve the overall functionality of the system
 The three tiers typically include the presentation tier, application tier,
and data tier

Department of Computing and Communication


Technology (CCT) slide 94
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Three-tiered architecture pattern:
 Presentation Tier (Client Tier): The presentation tier is responsible
for handling the user interface and user interaction
 It includes components such as web browsers, mobile apps, or
desktop applications that users directly interact with
 The presentation tier is focused on presenting information to the
user, collecting user inputs, and displaying the results obtained from
the application tier
 It may also handle client-side validations, user authentication, and
session management

Department of Computing and Communication


Technology (CCT) slide 95
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Three-tiered architecture pattern:
 Application Tier (Middle Tier or Business Logic Tier): The application
tier contains the core business logic and rules of the system
 It processes user requests from the presentation tier, performs the
necessary computations, and coordinates the interaction between
different components
 The application tier is responsible for implementing business rules,
workflow management, validation, and organization of services
 It may include components such as application servers, web servers,
or microservices that handle the processing and logic of the system

Department of Computing and Communication


Technology (CCT) slide 96
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Three-tiered architecture pattern:
 Data Tier (Backend Tier or Data Persistence Tier): The data tier is
responsible for managing data storage and retrieval
 It includes databases, file systems, or any other mechanisms used to
store and retrieve data
 The data tier provides data persistence and ensures the integrity and
reliability of the stored data
 It handles database operations, data access, and storage
 The application tier interacts with the data tier to retrieve or store
data required for processing user requests

Department of Computing and Communication


Technology (CCT) slide 97
DS Models – Architectural Patterns
 Architectural Patterns: Tiered Architecture
 Three-tiered architecture pattern:
The communication between the tiers is
implemented using well-defined
interfaces and protocols. For example,
the presentation tier may communicate
with the application tier through HTTP
or APIs, while the application tier
interacts with the data tier using SQL

By separating the user interface,


business logic, and data storage, the
three-tier architecture provides
flexibility and easier maintenance. It
allows for the reuse and replacement of
components in each tier without
affecting the others
Department of Computing and Communication
Technology (CCT) slide 98
DS Models – Fundamental Models
 Three Distributed System Models
 Fundamental models: take an abstract perspective to
examine individual aspects of a distributed system
 All of the different models of systems share some
fundamental properties
 All of them are composed of processes that communicate with one
another by sending messages over a network
 All of the models share the design requirements for achieving
 The performance and reliability characteristics of processes and
networks
 Ensuring the security of the resources in the system

Department of Computing and Communication


Technology (CCT) slide 99
DS Models – Fundamental Models
 Fundamental models:
 Fundamental models will examine three important aspects of
distributed systems:
 Interaction: Computation occurs within processes; the processes interact
by passing messages, resulting in communication (information flow) and
coordination (synchronization and ordering of activities) between
processes
 Failure: The correct operation of a distributed system is threatened
whenever a fault occurs in any of the computers on which it runs
(including software faults) or in the network that connects them (this
considers how a system may fail to operate correctly)
 The model should define and classify the faults and provide a basis
for their potential effects and for the design of systems that can
tolerate faults of each type while continuing to run correctly
Department of Computing and Communication
Technology (CCT) slide 100
DS Models – Fundamental Models
 Three Distributed System Models
 Fundamental models:
 Fundamental models will examine three important aspects of
distributed systems:
 Security: The modular nature of distributed systems and their
openness exposes them to attack by both external and internal
agents
 The security model should define and classify the forms that
such attacks may take, providing a basis for the analysis of
threats to a system and for the design of systems that can resist
them
 This considers how the system is protected against attempts to
interfere with its correct operation or to steal its data
Department of Computing and Communication
Technology (CCT) slide 101
DS Models – Fundamental Models
 Three Distributed System Models
 Fundamental models:
 Fundamental models will examine three important aspects of
distributed systems:
 Security: Various aspects that are vital in the security model
are considered which include
 Authentication – It verifies the identity of the users accessing the
system
 It ensures that only the authorized and trusted entities get
access: It involves
 Password-based authentication – Users provide a unique password to
prove their identity
 Public-key cryptography – Entities possess a private key and
corresponding public key, allowing verification of their authenticity
Department of Computing and Communication
Technology (CCT) slide 102
DS Models – Fundamental Models
 Three Distributed System Models
 Fundamental models:
 Fundamental models will examine three important aspects of
distributed systems:
 Security: Various aspects that are vital in the security model
are considered which include
 Encryption – It is the process of transforming data into a format that
is unreadable to unauthorized entities without having a key
 It protects sensitive information from unauthorized access or
disclosure

Department of Computing and Communication


Technology (CCT) slide 103
DS Models – Fundamental Models
 Three Distributed System Models
 Fundamental models:
 Security:
 Encryption process

Source https://www.geeksforgeeks.org/distributed-computing-system-models/

Department of Computing and Communication


Technology (CCT) slide 104
DS Models – Fundamental Models
 Three Distributed System Models
 Fundamental models:
 Security:
 Data Integrity: Data integrity mechanisms protect against
unauthorized modifications or tampering of data
 They ensure that data remains unchanged during storage,
transmission, or processing
 Data integrity mechanisms include
 Hash functions: Generating a hash value or checksum from
data to verify its integrity
 Digital signatures: Using cryptographic techniques to sign
data and verify its authenticity and integrity

Department of Computing and Communication


Technology (CCT) slide 105
DS Models – Fundamental Models
 Fundamental models:
 Security:
 Data Integrity process

Source https://www.geeksforgeeks.org/distributed-computing-system-models/

Department of Computing and Communication


Technology (CCT) slide 106
Questions and Discussions

Department of Computing and Communication


Technology (CCT) slide 107

You might also like