Distributed Computing Paradigms (Distributed Paradigm)
Distributed Computing Paradigms (Distributed Paradigm)
• In turn, the reply may trigger a further request, which leads to a subsequent reply,
and so forth.
• The basic operations required to support the basic message passing paradigm
are send, and receive.
• For connection-oriented communication, the
operations connect and disconnect are also required.
• With the abstraction provided by this model, the interconnected processes
perform input and output to each other, in a manner similar to file I/O. The I/O
operations encapsulate the detail of network communication at the operating-
system level.
• Perhaps the best known paradigm for network applications, the client-server
model assigns asymmetric roles to two collaborating processes. One process,
the server, plays the role of a service provider which waits passively for the
arrival of requests. The other, the client, issues specific requests to the server
and awaits its response.
• Simple in concept, the client-server model provides an efficient abstraction for the
delivery of network services. Operations required include those for a server
process to listen and to accept requests, and for a client process to issue
requests and accept responses.
• By assigning asymmetric roles to the two sides, event synchronization is
simplified: the server process waits for requests, and the client in turn waits for
responses.
Many Internet services are client-server applications. These services are often
known by the protocol that the application implements. Well known Internet
services include HTTP, FTP, DNS, finger, gopher, etc.
Fig 3.4 The Message System Paradigm
• The message system acts as a switch for messages, through which processes
exchange messages asynchronously, in a decoupled manner.
There are two main subtypes of message system models
1) The Point-To-Point Message Model
2) The Publish/Subscribe Message Model
• A remote procedure call involves two independent processes, which may reside
on separate machines. A process, A, wishing to make a request to another
process, B, issues a procedure call to B, passing with the call a list of argument
values. At the completion of the procedure, process B returns a value to
processA.
• Figure 3.6 illustrates the RPC paradigm. A procedure call is made by one process
to another, with data passed as arguments. Upon receiving a call, the actions
encoded in the procedure are executed as a result.
• As a comparison, the message-passing model is data-oriented, with the actions
triggered by the mes
As a comparison, the message-passing model is data-oriented, with the actions
triggered by the message exchanged, while the RPC model is action-oriented,
with the data passed as arguments.
• RPC allows programmers to build network applications using a programming
construct similar to the local procedure call, providing a convenient abstraction for
both interprocess communications and event synchronization
• Implementation of the auctioning system using ORBs is similar to using RMI, with
the exception that each object (auctioneer or participant) must be registered with
the ORB and requested from the ORB. Each participant issues requests to the
auctioneer object to register for the session and to make bids.
• Through the ORB, the auctioneer invokes the methods of each participant to
announce the start of the session, to update the bidding status, and to announce
the end of the session.
• This paradigm is the basis of the Object Management Group's CORBA (Common
Object Request Broker Architecture).
• Toolkits based on the architecture include Inprise's Visibroker, Java Interface
Definition Language (Java IDL), IONA's Orbix etc.
• Component-based technologies, such as Microsoft COM, Microsoft DCOM, Java
Bean, and Enterprise Java Bean, are also based on distributed-object paradigms.
Fig 3.9 The Object Space Paradigm
• For the auctioning system, all participants as well as the service provider
subscribe to a common object space. Each participant deposits an object into the
object space to register for the session and to be notified when the auctioning
session starts.
• At the onset of the session, the auctioneer deposits an object into the object
space. The object contains the item information and the bid history.
• A participant wishing to place a bid retrieves the object from the space and, if
he/she so chooses, places a new bid in the object before returning the object to
the space.
• At the end of the session, the auctioneer retrieves the object from the space and
contacts the highest bidder.
• In this paradigm, service providers register themselves with directory servers on a
network. A process desiring a particular service contacts the directory server at
run time, and, if the service is available, will be provided a reference to the
service. Using the reference, the process interacts with the service.
• This paradigm is essentially an extension of the Remote Method Invocation
paradigm. The difference is that service objects are registered with a global
directory service, allowing them to be looked up and accessed by service
requestors on a federated network.
• Ideally, services may be registered and located using a globally unique identifier,
in which case, the paradigm offers an extra abstraction: location transparency.
Location transparency allows a software developer to access an object or a
service without having to be concerned of the location of the object or service.
• The implementation of our auctioning system is the same as under RMI paradigm,
except that the auctioneer registers itself with the directory service, allowing the
participants to locate it and, once the session has commenced, to make bids.
• The participants provide callback methods to allow the auctioneer to announce the
start and the end of the session, and to update the status of the session.
• Java's Jini technology is based on this paradigm.
3.8 Trade-offs
We have already looked at the communication paradigms and their relative levels
of abstraction. At the lowest levels are the most basic paradigms: message
passing and client server. At the highest levels are object spaces and
collaborative computing, which provide the most abstraction. The development of
a highly complex application may be greatly aided by a tool that offers a high
level of abstraction.
But abstraction comes at a price, which is overhead. Consider the remote method
abstraction, where software modules known as stubs and skeletons need to be
present at run time to handle details of interprocess communications. The run-
time support and additional software modules require additional system
resources and execution time.
An application written using RMI will require modern resources and will have a
longer run time than the one written using socket API. For this reason, the socket
API may be the most appropriate for application that calls for a fast response time
or for a system with minimum resources.
Scalability
• Using message passing, the developer must provide the coding to manage the
addresses and to contact the participants individually. The complexity grows as
the number of participants increases.
• Many of the Java technologies, including Java RMI, API and JavaSpaces, by
choice run on Java virtual machines only. As a result, if these technologies are
employed, all participants in an application must be written in the Java language.