Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSIT 220 (Blum)1 Remote Procedure Calls Based on Chapter 38 in Computer Networks and Internets, Comer.

Similar presentations


Presentation on theme: "CSIT 220 (Blum)1 Remote Procedure Calls Based on Chapter 38 in Computer Networks and Internets, Comer."— Presentation transcript:

1 CSIT 220 (Blum)1 Remote Procedure Calls Based on Chapter 38 in Computer Networks and Internets, Comer

2 CSIT 220 (Blum)2 Procedure A procedure (a.k.a. a method, a subroutine or a function) is a part of a program that performs a well-defined task. Procedures are used to break a complex problem down into more manageable pieces (divide and conquer). Also a well-chosen procedure may be used repeatedly (re-use).

3 CSIT 220 (Blum)3 Procedural Control Flow When the action defined by a procedure is required, it is called. The “control” of the program is passed to the procedure. Typically, while the procedure is performing its task, the program waits. When the procedure is done, control is passed back to whatever portion of the program called it.

4 CSIT 220 (Blum)4 Procedural call tree (Fig. 38.1)

5 CSIT 220 (Blum)5 Remote Procedural Call The idea of a remote procedural call (RPC) is that 1.If an application is “distributed” then the procedure called may be executed on another machine. 2.To whatever extent possible, the details of connecting to the other machine should be “hidden” from the programmer.

6 CSIT 220 (Blum)6 Distributed procedural call tree (Fig. 38.2)

7 CSIT 220 (Blum)7 Synchronous When the procedure is local, control is passed to it. When the procedure is remote something similar must happen. The calling of the remote procedure starts a communication session. The response (return value) is returned in the same session. The interaction between the two programs is said to be synchronous when the calling routine is suspended or blocked until it receives an answer. If the calling procedure does not have to wait, it’s called asynchronous.

8 CSIT 220 (Blum)8 RPC By using RPC, an application programmer could avoid the tedious programming details required to make a connection between the calling program (client) and the remotely executed subroutine (server) and could focus on the application almost as if it were executed entirely locally.

9 CSIT 220 (Blum)9 Stub The connection in a RPC is facilitated by using stubs. Suppose one had a purely local version of the program, one replaces the local procedure with a stub, which serves as its substitute. When the stub receives the control, it turns control over to another program (client runtime program) that takes responsibility for connecting to the remote procedure. When completed, any return values and control are passed back to the stub and ultimately the program that called the stub.

10 CSIT 220 (Blum)10 Stubs (Fig 38.3)

11 CSIT 220 (Blum)11 Server Stubs and Communication Proxy The remote procedure also has a stub that stands in for the calling program. Like the client, the server has a runtime program that manages its side of the stub-to-stub interaction. The calls to handle the pass and the response are developed by using a communication proxy. –A proxy is the set of instructions needed to handle the communication requirements.

12 CSIT 220 (Blum)12 Middleware Middleware is the code that allows two applications to communicate. It can be used to extend an application to a distributed system. Middleware programming has shifted from the procedural paradigm to the object-oriented paradigm. The design uses objects and the set of operations which are performed on the objects (called the methods).

13 CSIT 220 (Blum)13.NET The latest Microsoft platform The ambition of.NET is to seamlessly mesh applications and the internet –“The network is the computer”.NET depends on four Internet standards: –HTTP –XML –SOAP –UDDI

14 CSIT 220 (Blum)14.NET There are four main principles of.NET from the perspective of the user: –It erases the boundaries between applications and the Internet. –Software will be rented as a hosted service over the Internet instead of purchased on a store shelf. –Users will have access to their information on the Internet from any device, anytime, anywhere. –There will be new ways to interact with application data, such as speech and handwriting recognition.

15 CSIT 220 (Blum)15 SOAP Simple Object Access Protocol (SOAP) is a way for a program running in one kind of operating system (such as Windows 2000) to communicate with a program in the same or another kind of an operating system (such as Linux) by using the World Wide Web's Hypertext Transfer Protocol (HTTP) and its Extensible Markup Language (XML) as the mechanisms for information exchange.

16 CSIT 220 (Blum)16 SOAP SOAP specifies how to encode an HTTP header and an XML file so that a program in one computer can call a program in another computer and pass it information. It also specifies how the called program can respond. An advantage of SOAP is that program calls are much more likely to get through firewall servers that screen out requests other than those for known applications (through the designated port mechanism). –HTTP requests are usually allowed through firewalls.

17 CSIT 220 (Blum)17 UDDI Universal Description, Discovery, and Integration is an XML-based registry for businesses worldwide to list themselves on the Internet. Its ultimate goal is to make for efficient online transactions by enabling companies to find one another on the Web and make their systems interoperable for e-commerce. UDDI is often compared to a telephone book's white, yellow, and green pages. –A resource for brokers

18 CSIT 220 (Blum)18 UDDI Listings White pages are for when you know the name of what you want. Yellow pages are for when you know the type of service you want but don’t know the name. Green pages provide details about code: its purpose, its interface, its cost, etc.

19 CSIT 220 (Blum)19 Other References http://www.webopedia.com http://www.whatis.com


Download ppt "CSIT 220 (Blum)1 Remote Procedure Calls Based on Chapter 38 in Computer Networks and Internets, Comer."

Similar presentations


Ads by Google