Security Challenges of DS?: 2.what Do You Mean by Scalability of A System?
Security Challenges of DS?: 2.what Do You Mean by Scalability of A System?
Security Challenges of DS?: 2.what Do You Mean by Scalability of A System?
UNIT 1
UNIT 2
1.Explain marshalling in detail.
Marshalling in Distributed System
A Distributed system consists of numerous components located on different machines that
communicate and coordinate operations to seem like a single system to the end-user.
There should be a means to convert all of this data to a standard format so that it can be sent
successfully between computers. If the two computers are known to be of the same type, the
external format conversion can be skipped otherwise before transmission, the values are
converted to an agreed-upon external format, which is then converted to the local format on
receiving. For that, values are sent in the sender’s format, along with a description of the format,
and the recipient converts them if necessary. It’s worth noting, though, that bytes are never
changed during transmission.
Marshalling: Marshalling is the process of transferring and formatting a collection of data
structures into an external data representation type appropriate for transmission in a message.
Approaches:
There are three ways to successfully communicate between various sorts of data between
computers.
1. Common Object Request Broker Architecture (CORBA):
CORBA is a specification defined by the Object Management Group (OMG) that is currently
the most widely used middleware in most distributed systems. It allows systems with diverse
architectures, operating systems, programming languages, and computer hardware to work
together.
Marshalling CORBA:
From the specification of the categories of data items to be transmitted in a message, Marshalling
CORBA operations can be produced automatically.
2. Java’s Object Serialization:
Java Remote Method Invocation (RMI) allows you to pass both objects and primitive data
values as arguments and method calls. In Java, the term serialization refers to the activity of
putting an object (an instance of a class) or a set of related objects into a serial format suitable
for saving to disk or sending in a message.
3. Extensible Markup Language (XML):
Clients communicate with web services using XML, which is also used to define the interfaces
and other aspects of web services. However, XML is utilized in a variety of different
applications, including archiving and retrieval systems; while an XML archive is larger than a
binary archive, it has the advantage of being readable on any machine. Other XML applications
include the design of user interfaces and the encoding of operating system configuration files.
2.Explain multicast transmission in DS?
Multicast is a method of group communication where the sender sends data to multiple receivers
or nodes present in the network simultaneously. Multicasting is a type of one-to-many and many-
to-many communication as it allows sender or senders to send data packets to multiple receivers
at once across LANs or WANs. This process helps in minimizing the data frame of the network.
Multicasting works in similar to Broadcasting, but in Multicasting, the information is sent to the
targeted or specific members of the network. This task can be accomplished by transmitting
individual copies to each user or node present in the network, but sending individual copies to
each user is inefficient and might increase the network latency. To overcome these shortcomings,
multicasting allows a single transmission that can be split up among the multiple users,
consequently, this reduces the bandwidth of the signal.
Applications :
Multicasting is used in many areas like:
1. Internet protocol (IP)
2. Streaming Media
It also supports video conferencing applications and webcasts.
3. Methods in Inter process Communication .
Inter-process communication (IPC) is set of interfaces, which is usually programmed in order
for the programs to communicate between series of processes. This allows running programs
concurrently in an Operating System. These are the methods in IPC:
Message size: The receiving process needs to specify an array of bytes of a particular size in
which to receive a message.
Blocking: Sockets normally provide non-blocking sends and blocking receives for datagram
communication
Timeouts: A process that has invoked a receive operation should wait indefinitely in situations
where the sending process may have crashed or the expected message may have been lost. To
allow for such requirements, timeouts can be set on sockets.
Receive from any: The receive method does not specify an origin for messages. Instead, an
invocation of receive gets a message addressed to its socket from any origin
UNIT 3
1.Implementation of remote method invocation.
The widely used approach on how to implement the communication channel is realized by
using stubs and skeletons. They are generated objects whose structure and behavior depends on
chosen communication protocol, but in general provide additional functionality that ensures
reliable communication over the network.
In RMI, a stub (which is the bit on the client) is defined by the programmer as an interface. The
rmic (rmi compiler) uses this to create the class stub. The stub performs type checking. The
skeleton is defined in a class which implements the interface stub.[1]
Synchronous
This is the normal method of operation. The client makes a call and does not continue
until the server returns the reply.
Nonblocking
The client makes a call and continues with its own processing. The server does not
reply.
Batching
This is a facility for sending several client nonblocking calls in one batch.
Broadcast RPC
RPC clients have a broadcast facility, that is, they can send messages to many servers
and then receive all the consequent replies.
Callback RPC
The client makes a nonblocking client/server call, and the server signals completion by
calling a procedure associated with the client.
4.What is the importance of distributed garbage collection and explain its algorithm.
Importance
Distributed systems typically require distributed garbage collection. If a client holds a proxy to
an object in the server, it is important that the server does not garbage-collect that object until the
client releases the proxy (and it can be validly garbage-collected). Most third-party distributed
systems, such as RMI, handle the distributed garbage collection, but that does not necessarily
mean it will be done efficiently. The overhead of distributed garbage collection and remote
reference maintenance in RMI can slow network communications by a significant amount when
many objects are involved.
The RMI subsystem implements reference counting based Distributed Garbage Collection
(DGC) to provide automatic memory management facilities for remote server objects.
When the client creates (unmarshalls) a remote reference, it calls dirty() on the server-side DGC.
After the client has finished with the remote reference, it calls the corresponding clean() method.
A reference to a remote object is leased for a time by the client holding the reference. The lease
period starts when the dirty() call is received. The client must renew the leases by making
additional dirty() calls on the remote references it holds before such leases expire. If the client
does not renew the lease before it expires, the distributed garbage collector assumes that the
remote object is no longer referenced by that client.
DGCClient implements the client side of the RMI distributed garbage collection system. The
external interface to DGCClient is the registerRefs() method. When a LiveRef to a remote object
enters the JVM, it must be registered with the DGCClient to participate in distributed garbage
collection. When the first LiveRef to a particular remote object is registered, a dirty() call is
made to the server-side DGC for the remote object. The call returns a lease guaranteeing that the
server-side DGC will not collect the remote object for a certain time. While LiveRef instances to
remote objects on a particular server exist, the DGCClient periodically sends more dirty calls to
renew its lease. The DGCClient tracks the local availability of registered LiveRef instances using
phantom references. When the LiveRef instance for a particular remote object is garbage
collected locally, a clean() call is made to the server-side DGC. The call indicates that the server
does not need to keep the remote object alive for this client. The RenewCleanThread handles the
asynchronous client-side DGC activity by renewing the leases and making clean calls. So this
thread waits until the next lease renewal or until any phantom reference is queued for generating
clean requests as necessary.