BCA 6th Sem Distributed System
BCA 6th Sem Distributed System
High availability : If a node in a cluster fails, the services running on this node can be
A Distributed System is a Network of Machines that can exchange information with taken over by other service nodes, thus enhancing the high availability of the cluster.
each other through Message-passing. It can be very useful as it helps in resource
sharing. Centralized systems and decentralized systems
1.Client/Server Systems: Client requests to the server for resources or a task to do, the CENTRALIZED SYSTEMS:
server allocates the resource or performs the task and sends the result in the form of We start with centralized systems because they are the
response to the request of the client. most intuitive and easy to understand and define.
2.Peer to Peer Systems: As nodes are an important part of a system. In this, each node Centralized systems are systems that use client/server
performs their own task on their local memory and share data through the supporting architecture where one or more client nodes are directly
medium, this node can work as a server or as a client for a system. connected to a central server. This is the most used type
3.Middleware: It works as a base for different interoperability applications running on of system in many organizations where a client sends a
different operating systems. Data can be transferred to other between others by using request to a company server and receives the response.
this service. Example –
4.Three-tier: In this data of the client is stored in the middle tire rather than sorting Wikipedia. Consider a massive server to which we send our requests and the server
into the client system or on their server through which development can be done responds with the article that we requested. Suppose we enter the search term ‘junk
easily. This is mostly used in web or online applications. food’ in the Wikipedia search bar. This search term is sent as a request to the Wikipedia
5.N-tier: When interoperability sends the request to another application to perform a servers (mostly located in Virginia, U.S.A) which then responds back with the articles
task or to provide a service. based on relevance. In this situation, we are the client node, Wikipedia servers are the
=========================================================== central server.
What is Code Migration
What is distributed transparency ? Explain types of transparency. Characteristics of Centralized System –
Code migration is the movement of programming code from one system to another.
Distribution transparency is the property of distributed databases by the virtue of which ->Presence of a global clock: As the entire system consists of a central node(a server/ a
There are three distinct levels of code migration with increasing complexity, cost and
the internal details of the distribution are hidden from the users. master) and many client nodes(a computer/ a slave), all client nodes sync up with the
risk. Simple migration involves the movement from language to a newer version. A
The three dimensions of distribution transparency are − global clock(the clock of the central node).
second, more complicated level of migration involves moving to a different
1. Location transparency ->One single central unit: One single central unit which serves/coordinates all the other
programming language. Migrating to an entirely new platform or operating system is the
2. Fragmentation transparency nodes in the system.
most complex type of migration.
3. Replication transparency ->Dependent failure of components: Central node failure causes the entire system to
Location Transparency fail. This makes sense because when the server is down, no other entity is there to
Location transparency ensures that the user can query on any table(s) or fragment(s) of send/receive responses/requests.
a table as if they were stored locally in the user’s site. The fact that the table or its
fragments are stored at remote site in the distributed database system, should be DECENTRALIZED SYSTEMS:
completely oblivious to the end user. The address of the remote site(s) and the access These are other types of systems that have been gaining a lot of popularity, primarily
mechanisms are completely hidden. because of the massive hype of Bitcoin. Now many organizations are trying to find the
application of such systems.
Fragmentation Transparency In decentralized systems, every node makes its own decision. The final behavior of the
Fragmentation transparency enables users to query upon any table as if it were system is the aggregate of the decisions of the individual nodes. Note that there is no
unfragmented. Thus, it hides the fact that the table the user is querying on is actually a single entity that receives and responds to the request.
fragment or union of some fragments. It also conceals the fact that the fragments are
located at diverse sites. Example –
Bitcoin. Let’s take Bitcoin for example because it is the most popular use case of Multithreaded Server Architecture
Replication Transparency decentralized systems. No single entity/organization owns the bitcoin network. The A server having more than one thread is known as Multithreaded Server. When a client
Replication transparency ensures that replication of databases are hidden from the network is a sum of all the nodes who talk to each other for maintaining the amount of sends the request, a thread is generated through which a user can communicate with
users. It enables users to query upon a table as if only a single copy of the table bitcoin every account holder has. the server. We need to generate multiple threads to accept multiple requests from
exists.Whenever a user updates a data item, the update is reflected in all the copies of Characteristics of Decentralized System – multiple clients at the same time.
the table. ->Lack of a global clock: Every node is independent of each other and hence, has
============================================================= different clocks that they run and follow.
What is three-tier architecture? ->Multiple central units (Computers/Nodes/Servers): More than one central unit which
Three-tier architecture is a well-established software application architecture that can listen for connections from other nodes
organizes applications into three logical and physical computing tiers: the presentation ->Dependent failure of components: one central node failure causes a part of the
tier, or user interface; the application tier, where data is processed; and the data tier, system to fail; not the whole system
where the data associated with the application is stored and managed.
Virtualization in Cloud Computing and Types
The 3-tier architecture consists of the three layers as follows −
Virtualization is a technique of how to separate a service from the underlying physical
1.Presentation layer − This layer is also called the client layer. The front-end layer
delivery of that service. It is the process of creating a virtual version of something like
consists of a user interface. The main purpose is to communicate with the application
computer hardware. It was initially developed during the mainframe era. It involves
layer.
using specialized software to create a virtual or software-created version of a computing
2.Application layer − This layer is also called the business logic layer. It acts as a middle
resource rather than the actual version of the same resource. With the help of
layer between the client and the database server which are used to exchange partially Advantages of Multithreaded Server:
Virtualization, multiple operating systems and applications can run on same machine
processed data. ->Quick and Efficient: Multithreaded server could respond efficiently and quickly to the
and its same hardware at the same time, increasing the utilization and flexibility of
3.Database layer − In this layer the data or information is stored. This layer performs increasing client queries quickly.
hardware.
operations like insert, update and delete to connect with the database. ->Waiting time for users decreases: In a single-threaded server, other users had to wait
until the running process gets completed but in multithreaded servers, all users can get
a response at a single time so no user has to wait for other processes to finish.
Disadvantages of Multithreaded Server:
->Complicated Code: It is difficult to write the code of the multithreaded server. These
programs can not be created easily
->Debugging is difficult: Analyzing the main reason and origin of the error is difficult.
Process and thread
Processes are basically the programs that are dispatched from the ready state and are
scheduled in the CPU for execution. PCB(Process Control Block) holds the concept of
process. A process can create other processes which are
known as Child Processes. The process takes more time to
============================================================= terminate and it is isolated means it does not share the
Content-Addressable-Network (CAN) memory with any other process. The process can have
CAN: Internet Scale Hash table the following states new, ready, running, waiting,
Interface terminated, and suspended.
The machine on which the virtual machine is going to be built is known as Host Machine
insert(key,value) and that virtual machine is referred as a Guest Machine.
value = retrieve(key) Thread:
BENEFITS OF VIRTUALIZATION Thread is the segment of a process means a process can
Idea: associate to each node and item a unique 1. More flexible and efficient allocation of resources.
coordinate in an d-dimensional Cartesian space. have multiple threads and these multiple threads are
2. Enhance development productivity. contained within a process. A thread has three states:
3. It lowers the cost of IT infrastructure. Running, Ready, and Blocked. The thread takes less time
Properties 4. Remote access and rapid scalability.
–scalable to terminate as compared to the process but unlike the
Types of Virtualization: process, threads do not isolate.
–operationally simple 1.Application Virtualization.
–good performance Process Thread
2.Network Virtualization. 3.Desktop Virtualization.
Difference between Centralized Database and Distributed Database Process means any program is in Thread means a segment of a
4.Storage Virtualization. 5.Server Virtualization
1. Centralized Database execution. process.
A centralized database is basically a type of database that is stored, located as well as Explains X Window System
maintained at a single location only. This type The process takes more time to The thread takes less time to
The client/server model in X system works in reverse to typical client/server terminate terminate
of database is modified and managed from
model, where the client runs on the local machine and asks for services from the It takes more time for creation It takes less time for creation
that location itself. This location is thus
mainly any database system or a centralized server. In X system, the server runs on the local machine and provides its display It also takes more time for context It takes less time for context
computer system. The centralized location is and services to the client programs. The client programs may be local or Switching switching
accessed via an internet connection (LAN, remotely exist over different networks, but appear transparently. The process has its own Process Thread has Parents’ PCB, its own
WAN, etc). This centralized database is X is used in networks of interconnected mainframes, minicomputers, Control Block, Stack, and Address Thread Control Block, and Stack
mainly used by institutions or organizations. workstations, and X Terminals. X window system consists of a number of Space. and common Address space.
Advantages – interacting components, including:
->Since all data is stored at a single location only thus it is easier to access and coordinate Process switching uses an interface Thread switching does not require
data. X server: Manages the display and input hardware. It captures command-based in an operating system. calling an operating system and
->The centralized database has very minimal data redundancy since all data is stored in causes an interrupt to the kernel.
and graphics-based inputs from input hardware and passes it to the client
a single place.
application that requested it. It also receives inputs from the client applications
Disadvantages – REMOTE PROCEDURE CALL(RPC)
->The data traffic in the case of centralized database is more. and displays the output under guidance from windows manager. The only
A remote procedure call is an interposes communication technique that is used for
->If any kind of system failure occurs at the centralized system then the entire data will component that interacts with hardware is X server. This makes it easier to
client-server-based applications. It is also known as a subroutine call or a function call.
be destroyed. recode it as per the requirements of different hardware architectures. A client has a request message that the RPC translates and sends to the server. This
request may be a procedure or a function call to a remote server. When the server
2. Distributed Database : Windows manager: Is the client application that manages client windows. It receives the request, it sends the required response back to the client. The client is
A distributed database is basically a type of database which consists of controls the general operations of the window system like geometry, blocked while the server is processing the call and only resumed execution after the
multiple databases that are connected with appearance, coordinates, and graphical properties of X display. Window server is finished.
each other and are spread across different manager can change the size and position of windows on the display and The sequence of events in a remote procedure call are given as follows −
physical locations. The data that is stored on 1.The client stub is called by the client.
reshuffle windows in a window stack.
various physical locations can thus be 2.The client stub makes a system call to send the message to the server and puts the
managed independently of other physical parameters in the message.
locations. The communication between X client: Is an application program that communicates with X server using X
3.The message is sent from the client to the server by the client’s operating system.
databases at different physical locations is protocol. Xterm, Xclock, and Xcalc are examples of X clients. X manages its
4.The message is passed to the server stub by the server operating system.
thus done by a computer network. windows in a hierarchal structure. The shaded area that fills the entire screen is 5.The parameters are removed from the message by the server stub.
the root window. X client application windows are displayed on top of the root 6.Then the server procedure is called by server stub
Advantages – window and are often called the children of the root.
->This database can be easily expanded as data is already spread across different
physical locations.
->The distributed database can easily be accessed from different networks. Cluster System
Disadvantages – Cluster : It means that multiple servers are grouped together to achieve the same
->This database is very costly and it is difficult to maintain because of its complexity. business and can be regarded as one computer.
->In this database, it is difficult to provide a uniform view to user since it is spread across A group of computers consisting of multiple servers, as a whole, provides users with a
different physical locations. set of network resources, which are the nodes of the cluster.
Two features
Scalability : A service node in a cluster that dynamically adds machines to increase the
processing power of the cluster.
• An identifier of the remote object to be used
• Method name which is to be invoked
• Parameters to the remote JVM
Skeleton Object: The skeleton object passes the request from the stub object to the
remote object. It performs the following tasks
• It calls the desired method on the real object present on the server.
• It forwards the parameters received from the stub object to the
method.
Comparison Table Between Absolute and Relative Path S.N. User-Level Threads Kernel-Level Thread
specifies the location related to the location 2 Implementation is by a thread Operating system
By definition
from the root directory from current directory library at the user level. supports creation of
Kernel threads.
Function of
Begins with a Never begins with a
delimiting 3 User-level thread is generic and Kernel-level thread is
delimiting character delimiting character
character can run on any operating specific to the operating Vector Clocks in Distributed Systems
system. system.
Vector Clock is an algorithm that generates partial ordering of events and detects
causality violations in a distributed system. These clocks expand on Scalar time to
Content from other Content from the same
Navigates to facilitate a causally consistent view of the distributed system, they detect whether a
domains domain 4 Multi-threaded applications Kernel routines contributed event has caused another event in the distributed system. It essentially
cannot take advantage of themselves can be captures all the causal relationships. This algorithm helps us label every process with a
multiprocessing. multithreaded. vector(a list of integers) with an integer for each local clock of every process within the
URL used Uses absolute URL Used relative URL
system. So for N given processes, there will be vector/ array of size N.
How does the vector clock algorithm work :
1.Initially, all the clocks are set to zero.
Other names Full-path or File path Non-absolute path
2.Every time, an Internal event occurs in a process, the value of the processes’s logical
clock in the vector is incremented by 1
3.Also, every time a process sends a message, the value of the processes’s logical clock
Global Name Service (GNS) in the vector is incremented by 1.
Computer Network Architecture
Designed and implemented by Lampson and colleagues at the DEC Systems Research
Computer Network Architecture is defined as the physical and logical design of the Every time, a process receives a message, the value of the processes’s logical clock in the
Center (1986)Provide facilities for resource location, addressing and
software, hardware, protocols, and media of the transmission of data. Simply we can say vector is incremented by 1, and moreover, each element is updated by taking the
authenticationWhen the naming database grows from small to large scale, the
that how computers are organized and how tasks are allocated to the computer. maximum of the value in its own vector clock and the value in the vector in the received
structure of name space may changethe service should accommodate itCache
consistency ? message (for every element).
The two types of network architectures are used: Example :
GNS Structure
Computer Network Architecture Consider a process (P) with a vector size N for each process: the above set of rules
->Tree of directories holding names and values
Peer-To-Peer network mentioned are to be executed by the vector clock:
->Muti-part pathnames refer to the root or relative working directory (like Unix file
• Client/Server network
system)
->Unique Directory Identifier (DI)
Peer-To-Peer network
->A directory contains list of names and references
Peer-To-Peer network is a network in which all the
->Leaves of tree contain value trees (structured values)
computers are linked together with equal privilege
and responsibilities for processing the data.
Peer-To-Peer network is useful for small
environments, usually up to 10 computers.
Peer-To-Peer network has no dedicated server.
Special permissions are assigned to each computer
for sharing the resources, but this can lead to a
problem if the computer with the resource is down.
Advantages Of Peer-To-Peer Network:
1.It is less costly as it does not contain any dedicated server.
2.If one computer stops working but, other computers will not stop working.
3.It is easy to set up and maintain as each computer manages itself.
Disadvantages Of Peer-To-Peer Network:
In the case of Peer-To-Peer network, it does not contain the centralized system . The above example depicts the vector clocks mechanism in which the vector clocks are
Therefore, it cannot back up the data as the data is different in different locations. updated after execution of internal events, the arrows indicate how the values of vectors
It has a security issue as the device is managed itself. are sent in between the processes (P1, P2, P3).
To sum up, Vector clocks algorithms are used in distributed systems to provide a causally
Client/Server Network consistent ordering of events but the entire Vector is sent to each process for every
message sent, in order to keep the vector clocks in sync.
Name Spaces
A name space is a collection of all valid names recognized by a particular serviceAllow
simple but meaningful names to be usedPotentially infinite number of
Explain the middleware with its importance in distributed system with suitable 3.Pipes are a form of IPC: grep foo file | sort
diagram.
Distributed computing problems are simplified by many vendors as they are offering
distributed system services that have standard programing interfaces and protocols.
RPC RMI
These distributed system services are called middleware. As they sit in the middle,
layering above the operating system and networking software below industry specific
applications. Middleware may have multiple roles, but the most common one is usually
handling communication between components of the system. At a high level, it's RPC is a website for libraries and
It is a forum for java.
analogous to the postal system - you can send [almost] anything through the mail by OS.
packaging and addressing it in a standard manner. The carrier makes no assumptions
about the contents, on the assumption that the receiver knows what they represent.
Importance: RPC facilitates the programming of RMI supports programming oriented
the procedures. to the object.
i. Focus on end-to-end support and integration, not just individual Authentication exchange:
This security mechanism deals with identity to be known in communication. This is
S.NO Authentication Authorization achieved at the TCP/IP layer where two-way handshaking mechanism is used to ensure
RPC is less powerful. RMI is more powerful.
data is sent or not
Bit stuffing:
In authentication process, the While in authorization process, It offers protection at the customer This security mechanism is used to add some extra bits into data which is being
There is no protection for RPC.
identity of users are checked for person’s or user’s authorities level. transmitted. It helps data to be checked at the receiving end and is achieved by Even
providing the access to the are checked for accessing the
1. system. resources.
parity or Odd Parity.
For basic RPC applications, several Multiple codes for basic RMI Digital Signature:
codes are required. applications are not necessary. This security mechanism is achieved by adding digital data that is not visible to eyes. It
is form of electronic signature which is added by sender which is checked by receiver
In authentication process, users While in this process, users or electronically. This mechanism is used to preserve data which is not more confidential
2. or persons are verified. persons are validated.
but sender’s identity is to be notified.
Describe Lamport’s algorithm with its benefits and drawbacks.
Conclusion: Ans: Lamport’s Distributed Mutual Exclusion Algorithm is a permission-based algorithm
RPC and RMI are frameworks that permit a client to invoke server processing or method proposed by Lamport’s as an illustration of his synchronization scheme for distributed
It is done before the While this process is done after by communicating with the client-server. The common distinction between RPC and RMI systems.
3. authorization process. the authentication process.
is that RPC only supports proceedings, while the other big difference between RMI and In permission-based timestamp is used to order critical section requests and to resolve
RPC is the fact that the parameters transferred to remote operations have regular data any conflict between requests.
structures. In Lamport’s Algorithm critical section requests are executed in the increasing order of
timestamps i.e. a request with smaller timestamp will be given permission to execute
It needs usually user’s login While it needs user’s privilege critical section first than a request with larger timestamp.
4. details. or security levels.
Explain transient Asynchronous communication with suitable example. Algorithm:
Ans: A sends the message and continues execution (nonblocking). B has to be running, To enter Critical section:
components: There is now widespread recognition that effective because if it is not running the message will be discarded. Even if any router along the • When a site Si wants to enter the critical section, it sends a
development of large-scale distributed systems requires the use of way is down, the message will be discarded. UDP communication is an example of request message Request (tsi, i) to all other sites and places
COTS infrastructure and service components. Moreover, the usability transient asynchronous communication. The function MP I b send() is an the request on request_queuei. Here, Tsi denotes the
of the resulting products depends heavily on the weaving of the implementation of this. timestamp of Site Si
properties of the whole as derived from its parts. In its most useful Example: • When a site Sj receives the request message REQUEST (tsi, i)
forms, middleware provides the end-to-end perspective extending from site Si, it returns a timestamped REPLY message to site
across elements applicable to the network substrate, the platform Si and places the request of site Si on request_queuei
operating systems and system services, the programming system in .
which they are developed, the applications themselves, and the To execute the critical section:
middleware that integrates all these elements together. • A site Si can enter the critical section if it has received the
message with timestamp larger than (tsi, i) from all other sites
ii. The increased viability of open systems architectures and open-source and its own request is at the top of request_queuei
availability: By their very nature, distributed systems developed by To release the critical section:
composing separate components are more open than systems • When a site Si exits the critical section, it removes its own
conceived and developed as monolithic entities. The focus on Why it is difficult to synchronous physical clock? Explain how synchronous can be request from the top of its request queue and sends a
interfaces for integrating and controlling the component parts leads solved using logical clock. timestamped RELEASE message to all other sites
naturally to standard interfaces. In turn, this yields the potential for Ans: Communication between processes in a distributed system can have unpredictable • When a site Sj receives the timestamped RELEASE message
multiple choices for component implementations, and open delays, processes can fail, messages may be lost ▪ Synchronization in distributed systems from site Si, it removes the request of Si from its request
engineering concepts. is harder than in centralized systems because the need for distributed algorithms. queue
Properties of distributed algorithms: Drawbacks of Lamport’s Algorithm:
iii. Advanced common infrastructure sustaining continuous innovation: 1 The relevant information is scattered among multiple machines. • •Unreliable approach: failure of any one of the processes will
Middleware: supporting component integration and reuse is a key 2 Processes make decisions based only on locally available information. halt the progress of entire system.
technology to help amortize software life-cycle costs by leveraging 3 A single point of failure in the system should be avoided. • High message complexity: Algorithm requires 3(N-1)
previous development expertise, e.g., component middleware helps 4 No common clock or other precise global time source exists. messages per critical section invocation.
to abstract commonly reused low-level OS concurrency and Performance:
networking details away into higher level, more easily used artifacts. Logical Clocks refer to implementing a protocol on all machines within your distributed • Synchronization delay is equal to maximum message
Likewise, middleware also focuses efforts to improve software quality system, so that the machines are able to maintain consistent ordering of events within transmission time
and performance by combining aspects of a larger solution together, some virtual timespan. A logical clock is a mechanism for capturing chronological and • It requires 3(N – 1) messages per CS execution.
e.g., component middleware combines fault tolerance for domain- causal relationships in a distributed system. Distributed systems may have no physically • Algorithm can be optimized to 2(N – 1) messages by omitting
specific elements with real-time QoS properties. synchronous global clock, so a logical clock allows global ordering on events from the REPLY message in some situations.
different processes in such systems. If we go outside then we have made a full plan that
Client-Server Network Peer-to-Peer Network at which place we have to go first, second and so on. We don’t go to second place at first What is
and then the first place. We always maintain the procedure or an organization that is vector
In Client-Server Network, Clients and In Peer-to-Peer Network, Clients and planned before. In a similar way, we should do the operations on our PCs one by one in clock? Why
server are differentiated, Specific server are not differentiated. an organized way. Suppose, we have more than 10 PCs in a distributed system and every it is
server and clients are present. PC is doing it’s own work but then how we make them work together. There comes a important?
Client-Server Network focuses on While Peer-to-Peer Network focuses solution to this i.e. LOGICAL CLOCK.
information sharing. on connectivity. What do you understand by Caching and Replication in web? Explain.
A cache is a temporary storage location for copied information. There are over a billion
In Client-Server Network, Centralized While in Peer-to-Peer Network, Each
pages (or objects) on the internet. Many users request the same popular objects. An
server is used to store the data. peer has its own data.
example of that would be the top logo image of Yahoo.com which appears in almost all
In Client-Server Network, Server While in Peer-to-Peer Network, Each
Yahoo pages. The image must be delivered to the browser each time the browser
respond the services which is and every node can do both request
accesses any of Yahoo's pages these pages are requested a number of times each day by
request by Client. and respond for the services.
different users. A Web cache is a dedicated computer system which will monitor the
Client-Server Network are costlier While Peer-to-Peer Network are less object requests and stores objects as it retrieves them from the server. On subsequent
than Peer-to-Peer Network. costly than Client-Server Network. requests the cache will deliver objects from its storage rather than passing the request
Client-Server Network are more While Peer-to-Peer Network are less to the origin server. Every Web object changes over time and therefore has a useful life
stable than Peer-to-Peer Network. stable if number of peers is increase. or "freshness”. If the freshness of an object expires it is the responsibility of the Web
Client-Server Network is used for While Peer-to-Peer Network is cache to get the new version of the object. The more the number of requests for the
both small and large networks. generally suited for small networks same object the more effective will the Web cache be in reducing upstream traffic and
with fewer than 10 computers. will also help reducing server load, resulting in less latency.
Replication is a technique similar to caching but is generally considered to be more
active. The process of replication copies cache content and pushes it on to one or more
cache servers across the network. Replication is required to distribute objects among
the servers to maintain the freshness of content across servers, which results in reduced Explain vector clock algorithm by its example.
upstream network traffic. Typically, the same content is pushed across several machines Ans: Vector Clock is an algorithm that generates partial ordering of events and detects
making it more efficient to use Multicast. Replication is critical in global operations, causality violations in a distributed system. These clocks expand on Scalar time to
where cost of international traffic is high and ways have to be found to mirror data facilitate a causally consistent view of the distributed system, they detect whether a
without using too much bandwidth. contributed event has caused another event in the distributed system. It essentially
============================================================ captures all the causal relationships. This algorithm helps us label every process with a
Describe different types of security mechanisms to protect against security threats in vector (a list of integers) with an integer for each local clock of every process within the
distributed systems. system. So for N given processes, there will be vector/ array of size N.
Ans: Network Security is field in computer technology that deals with ensuring security How does the vector clock algorithm work?
of computer network infrastructure. As the network is very necessary for sharing of • Initially, all the clocks are set to zero.
information whether it is at hardware level such as printer, scanner, or at software level. • Every time, an Internal event occurs in a process, the value of
Therefore, security mechanism can also be termed as is set of processes that deal with the processes’ logical clock in the vector is incremented by 1
recovery from security attack. Various mechanisms are designed to recover from these • Also, every time a process sends a message, the value of the
specific attacks at various protocol layers. processes’ logical clock in the vector is incremented by 1.
Types of Security Mechanism are Every time, a process receives a message, the value of the processes’ logical clock in the
Encipherment: vector is incremented by 1, and moreover, each element is updated by taking the
This security mechanism deals with hiding and covering of data which helps data to maximum of the value in its own vector clock and the value in the vector in the received
become confidential. It is achieved by applying mathematical calculations or algorithms message (for every element).
which reconstruct information into not readable form. Example:
Consider a process (P) with a vector size N for each process: the above set of rules
Access Control: mentioned are to be executed by the vector clock:
This mechanism is used to stop unattended access to data which you are sending. It can ===========================================================
be achieved by various techniques such as applying passwords, using firewall, or just by
adding PIN to data. Explain different types of architecture styles in distributed system.
1. Layered Architecture:
Notarization: In Layered architecture, different components are organized in layers. Each layer
What is interposes communication in distributed system? Explain. Between RPC and communicates with its adjacent layer by sending requests and getting responses. The
This security mechanism involves use of trusted third party in communication. It acts as
RMI which one is better in terms of communication with suitable example. layered architecture separates components into units. It is an efficient way of
mediator between sender and receiver so that if any chance of conflict is reduced. This
Inter process Communication is a process of exchanging the data between two or more communication. Any layer cannot directly communicate with another layer. A layer can
mediator keeps record of requests made by sender to receiver for later denied.
independent process in a distributed environment is called as Inter process only communicate with its neighboring layer and then the next layer transfers
communication. Inter process communication on the internet provides both Datagram information to another layer and so on the process goes on.
Data Integrity:
and stream communication. In some cases, layered architecture is in cross-layer coordination. In a cross-layer, any
This security mechanism is used by appending value to data to which is created by data
Examples Of Inter Process Communication: adjacent layer can be skipped until it fulfils the request and provides better
itself. It is similar to sending packet of information known to both sending and receiving
1.N number of applications can communicate with the X server through network performance results. Request flow from top to bottom(downwards) and response flow
parties and checked before and after data is received.
protocols. from bottom to top(upwards). The advantage of layered architecture is that each layer
2.Servers like Apache spawn child processes to handle requests.
can be modified independently without affecting the whole system. This type of confidentiality, integrity and availability. Each component represents a fundamental Cryptography and its Types and features!
architecture is used in Open System Interconnection (OSI) model. objective of information security. Cryptography is technique of securing information and communications through use of
The three components of the CIA triad are discussed below: codes so that only those person for whom the information is intended can understand
it and process it. Thus preventing unauthorized access to information. The prefix
Confidentiality: “crypt” means “hidden” and suffix graphy means “writing”.
This component is often associated with secrecy and the use of encryption.
Confidentiality in this context means that the data is only available to authorized In general there are three types Of cryptography:
parties. When information has been kept confidential it means that it has not been
compromised by other parties; confidential data are not disclosed to people who do Symmetric Key Cryptography:
not require them or who should not have access to them. Ensuring confidentiality It is an encryption system where the sender and receiver of message use a single
means that information is organized in terms of who needs to have access, as well as common key to encrypt and decrypt messages. Symmetric Key Systems are faster and
the sensitivity of the data. A breach of confidentiality may take place through different simpler but the problem is that sender and receiver have to somehow exchange key in
means, for instance hacking or social engineering. a secure manner. The most popular symmetric key cryptography system is Data
2. Object-Oriented Architecture: Encryption System(DES).
In this type of architecture, components are treated as objects which convey Integrity:
information to each other. Object-Oriented Architecture contains an arrangement of Data integrity refers to the certainty that the data is not tampered with or degraded Hash Functions:
loosely coupled objects. Objects can interact with each other through method calls. during or after submission. It is the certainty that the data has not been subject to There is no usage of any key in this algorithm. A hash value with fixed length is
Objects are connected to each other through the Remote Procedure Call (RPC) unauthorized modification, either intentional or unintentional. There are two points calculated as per the plain text which makes it impossible for contents of plain text to
mechanism or Remote Method Invocation (RMI) mechanism. Web Services and REST during the transmission process during which the integrity could be compromised: be recovered. Many operating systems use hash functions to encrypt passwords.
API are examples of object-oriented architecture. during the upload or transmission of data or during the storage of the document in the
database or collection. Asymmetric Key Cryptography:
Under this system a pair of keys is used to encrypt and decrypt information. A public
3. Data Centered Architecture: Availability: This means that the information is available to authorized users when it is key is used for encryption and a private key is used for decryption. Public key and
Data Centered Architecture is a type of architecture in which a common data space is needed. For a system to demonstrate availability, it must have properly functioning Private Key are different. Even if the public key is known by everyone the intended
present at the center. It contains all the required data in one place a shared data computing systems, security controls and communication channels. Systems defined as receiver can only decode it because he alone knows the private key.
space. All the components are connected to this data space and they follow critical (power generation, medical equipment, safety systems) often have extreme
publish/subscribe type of communication. It has a central data repository at the requirements related to availability. These systems must be resilient against cyber Features Of Cryptography are as follows:
center. Required data is then delivered to the components. threats, and have safeguards against power outages, hardware failures and other Confidentiality:
For example, Producer-Consumer system. The producer produces data in common events that might impact the system availability. Information can only be accessed by the person for whom it is intended and no other
data space and consumers request data. person except him can access it.
Integrity:
Information cannot be modified in storage or transition between sender and intended
receiver without any addition to information being detected.
Non-repudiation:
The creator/sender of information cannot deny his intention to send information at
later stage.
What is data- centric consistency model? Explain its type in details. Authentication:
Ans: Traditionally consistency has been discussed in the context of read and write The identities of sender and receiver are confirmed. As well as destination/origin of
operations on shared data, available by means of shared memory. A shared database, information is confirmed.
or a file system. Here, we use the broader term data store. A data store may be
4. Event-Based Architecture: physically distributed across multiple machines. ===========================================================
Event-Based Architecture is almost similar to Data centered architecture just the Types: -
difference is that in this architecture events are present instead of data. Events are i. Consistency model: a contract between a (distributed) data store and
present at the center in the Event bus and delivered to the required component processes, in which the data store specifies precisely what the results of read and write
whenever needed. In this architecture, the entire communication is done through operations are in the presence of concurrency.
events. When an event occurs, the system, as well as the receiver, get notified. Data,
URLs etc. are transmitted through events. The components of this system are loosely ii. Continuous Consistency:
coupled that’s why it is easy to add, remove and modify them. Heterogeneous Observation: We can actually talk a about a degree of consistency:
components can communicate through the bus. · Replicas may differ in their numerical value
· Replicas may differ in their relative staleness
· There may differences with respect to (number and order) of performed update
operations
Conit: consistency unit) specifies the data unit over which consistency is to be
measured.
· e.g., stock record, weather report, etc.
Conit example: numerical and ordering deviations
v. Causal Consistency
· Writes that are potentially causally related must be seen by all processes in the
same order.
· Concurrent writes (i.e., writes that are NOT causally related) may be seen in a
different order by different processes.
vi. FIFO Consistency
Writes done by a single process are seen by all other processes in the order in which
they were issued, but writes from different processes may be seen in a different order
by different processes.
· Also called “PRAM Consistency” – Pipelined RAM.
· Easy to implement -There are no guarantees about the order in which different
processes see writes – except those two or more writes from a single process must be
seen in order.
When we discuss data and information, we must consider the CIA triad. The CIA triad
refers to an information security model made up of the three main components: