Correspondence in Distributed Systems Part 2

1415 days ago, 617 views
PowerPoint PPT Presentation
Dispersed Computing Systems. 2. Correspondence Paradigms. Utilizing the Network Protocol StackRemote Procedure Call - RPC Remote Object Invocation - Java Remote Method InvocationMessage Queuing Services - SocketsStream-arranged Services. . 3. Remote Object Invocation. Circulated ObjectsRemote Method Invocation .

Presentation Transcript

Slide 1

Correspondence in Distributed Systems –Part 2 REK's adjustment of Tanenbaum's Distributed Systems Chapter 2

Slide 2

Communication Paradigms Using the Network Protocol Stack Remote Procedure Call - RPC Remote Object Invocation - Java Remote Method Invocation Message Queuing Services - Sockets Stream-situated Services Distributed Computing Systems

Slide 3

Remote Object Invocation Distributed Objects Remote Method Invocation

Slide 4

Distributed Objects dispersed items is an augmentation of the idea of remote strategy calls. In a framework for appropriated objects, the unit of dissemination is the protest. That is, a customer imports a "something". "out and out" protest based circulated sysems incorporate Corba and DCOM. Dispersed Computing Systems

Slide 5

Distributed Objects Key component of a question:: it embodies information, the state , and the operations on those information, the techniques . Techniques are made accessible through an interface . The partition amongst interfaces and the articles executing these interfaces is essential for disseminated frameworks. Dispersed Computing Systems

Slide 6

Distributed Objects Common association of a remote question with customer side intermediary. Conveyed Computing Systems

Slide 7

Distributed Objects When a customer ties to an appropriated question, an execution of the protest's interface, an intermediary , is stacked into the customer's address space. The intermediary marshals technique summons into messages and unmarshals answer messages to give back the aftereffect of the strategy conjuring to the customer. Circulated Computing Systems

Slide 8

Distributed Objects The real protest dwells at a server. Approaching summon solicitations are initially passed to a server stub, a skeleton , that unmarshals them to legitimate strategy summons at the protest's interface at the server. The skeleton additionally marshals answers and advances answers to the customer side intermediary. A normal for most circulated items is that their state is not conveyed. Disseminated Computing Systems

Slide 9

Compile-time versus Run-time Objects The most clear type of articles, incorporate time objects , are straightforwardly identified with dialect level items upheld by Java and C++. A class is a depiction of a dynamic sort as far as a module with information components and operations on that information. Conveyed Computing Systems

Slide 10

Compile-time versus Run-time Objects Using gather time questions in appropriated frameworks makes it less demanding to manufacture disseminated applications. A protest can be completely characterized by method for its class and the interfaces that the class executes. Incorporating the class definition brings about code that permits it to instantiate Java objects. The interfaces can be assembled into customer side and server-side stubs that allow Java articles to summoned by a remote machine. Disseminated Computing Systems

Slide 11

Compile-time versus Run-time Objects Compile-time items are subject to specific programming dialect. With run-time protests, the execution is left "open" and this way to deal with question based circulated frameworks permits an application to be built from items written in numerous dialects. This plan may utilize protest connectors that go about as wrappers that give executions a question appearance. Circulated Computing Systems

Slide 12

Binding a Client to an Object Unlike RPC frameworks, frameworks supporting conveyed questions as a rule bolster systemwide protest references that can be passed between procedures on various machines as parameters to technique summons. At the point when a procedure holds a question reference, it should first tie to the referenced protest before conjuring any of its techniques. Restricting outcomes in an intermediary being set in the process' address space, executing an interface containing the strategies. The coupling can be verifiable or express. Dispersed Computing Systems

Slide 13

Binding a Client to an Object (an) A case of verifiable restricting utilizing just worldwide references. Distr_object* obj_ref; //Declare a systemwide protest reference obj_ref = … ; //Initialize the reference to a dispersed question obj_ref-> do_something(); //Implicitly tie and conjure a technique (b) A case of unequivocal restricting utilizing worldwide and nearby references. Distr_object objPref; //Declare a systemwide question reference Local_object* obj_ptr; //Declare a pointer to nearby protests obj_ref = … ; //Initialize the reference to a disseminated protest obj_ptr = bind(obj_ref); //Explicitly tie and acquire a pointer to the neighborhood intermediary obj_ptr - > do_something(); //Invoke a technique on the neighborhood intermediary Distributed Computing Systems

Slide 14

Implementation of Object References A straightforward question reference would include: The system address of the machine where the real protest dwells An endpoint recognizing the server that deals with the question. [This compares to a neighborhood port appointed by the server's OS.] A sign of which protest – a question number doled out by the server. This plan can utilize an area server to monitor the area of a protest's server. Disseminated Computing Systems

Slide 15

Remote Method Invocation After a customer is bound to a question, it can conjure the protest's technique through the intermediary. Such a remote technique summon (RMI) is like a RPC as for marshaling and parameter passing. The distinction is that RMI underpins systemwide protest references. Disseminated Computing Systems

Slide 16

Remote Method Invocation An interface definition dialect is utilized as a part of RMI to determine the protest's interface. Static summon suggests utilizing object-based dialects (e.g., Java) to predefine interface definitions. Dynamic summon licenses making a strategy conjuring at run-time. Disseminated Computing Systems

Slide 17

Parameter Passing The circumstance when passing a protest by reference or by esteem. Circulated Computing Systems

Slide 18

Java RMI Distributed articles have been coordinated in the Java dialect with an objective of a high level of dissemination straightforwardness. Java embraces remote questions as the main type of appropriated articles. [i.e., objects whose state just dwells on a solitary machine] Java permits each protest be developed as a screen by proclaiming a strategy to be synchronized. Appropriated Computing Systems

Slide 19

Java RMI However there are issues with conveyed synchronization. In this manner, Java RMI limits hindering on remote protests just to the intermediaries. This implies remote items can't be shielded against synchronous access from procedures working on various intermediaries by utilizing synchronization strategies. Express disseminated bolting procedures must be utilized. Disseminated Computing Systems

Slide 20

Java Remote Object Invocation Any primitive or question sort can be passed as a parameter to a RMI gave the sort can be marshaled. [i.e, it must be serializable.] Platform subordinate protests, for example, document descriptors and attachments can't be serialized. In Java RMI reference to a remote protest is clarified on slide 14. A remote protest is worked from a server class and a customer class. Appropriated Computing Systems

Slide 21

Java Remote Object Invocation Proxies are serializable in Java. This implies intermediaries can be marshaled. In really a usage handle is created, indicating which classes are expected to develop the intermediary. The usage handle replaces the marshaled code as a major aspect of a remote protest reference. This going of intermediaries as parameters works simply because each procedure is executing a similar Java virtual machine. Circulated Computing Systems