Module 1 Ppt
Module 1 Ppt
Distributed
Systems
MODULE 1
Topics to be covered
CHARACTERIZATION OF
DISTRIBUTED SYSTEMS
1.1 Introduction
∙ Networks of computers are everywhere.
∙ The Internet is one, as are the many networks of which it is composed.
∙ Mobile phone networks, corporate networks, factory networks, campus networks,
home networks, in-car networks – all of these, both separately and in
combination, share the essential characteristics that make them relevant subjects
for study under the heading distributed systems.
∙ The term mobile code is used to refer to program code that can be
transferred from one computer to another and run at the destination –
Java applets are an example
• Encryption
• Authentication
• Authorization
Security
Security Challenges
∙ This can be achieved by standard techniques such as semaphores, which are used
in most operating systems.
Transparency
∙ Transparency is defined as the concealment from the user and the application
programmer of the separation of components in a distributed system, so that the
system is perceived as a whole rather than as a collection of independent
components
REMOTE INVOCATION
Figure 5.1: Middleware layers
Applications
This chapter
Remote invocation, indirect communication
(and Chapter 6)
Middleware
Underlying interprocess communication primitives: layers
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Remote Invocation
∙ request-reply communication: most primitive; minor improvement over underlying
IPC primitives
• 2 way exchange of messages as in client-server computing
∙ RPC, RMI: mechanisms enabling a client to invoke a procedure/method from the
server via communication between client and server
∙ Remote Procedure Call (RPC): extension of conventional procedural
programming model
• allow client programs to transparently call procedures in server programs
running in separate processes, and in separate machines from the client
• i.e. to the caller, the procedures appear to be in local address space
• RPC system hides encoding/decoding of parameters and results, message
passing, and preserves required invocation semantics
Remote Invocation
∙ Remote Method Invocation (RMI): extension of conventional object oriented
programming model
• allows objects in different processes to communicate i.e. an object in one JVM
is able to invoke methods in an object in another JVM
• extension of local method invocation allows object in one process to invoke
methods of an object living in another process
Pros and Cons of RPC, RMI
∙ pros:
• high transparency: caller works with remote procedure/object as if it were
local
• general purpose, flexible
∙ cons:
• high overhead for communication, marshalling/unmarshalling: latency
Figure 5.2 : Request-reply communication
Client Server
Request
doOperation
message getRequest
select object
(wait) execute
Reply method
message sendReply
(continuation)
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Request-reply Communication
Operations
• doOperation(): send request to remote object, and returns the reply received
∙ Design decisions
∙ retry policy
• how many times to retry?
• e.g. sensor producing large amounts of data: may be acceptable for some loss
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.4
Request-reply message structure
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.5
RPC exchange protocols
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.6
HTTP request message
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.7
HTTP Reply message
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Design Issues in RPC
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.10
Role of client and server stub procedures in RPC
Request
Reply
client stub server stub
procedure procedure
client service
program Communication Communication procedure
module module dispatcher
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Design Issues in MI
RMI shares the same design issues as RPC in terms of programming interfaces, call
semantics and level of transparency.
2. Distributed object
remote local C
invocation invocation local E
remote
invocation invocation F
B local
A
invocation D
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.13
A remote object and its remote interface
remoteobject
Data
remote
interface
m1 implementation m4
{ m2
m3 of methods
m5
m6
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.14
Instantiation of remote objects
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 5.15
The role of proxy and skeleton in remote method invocation
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012