`
tmrp
  • 浏览: 43780 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Introduction to RPC

阅读更多
Chapter 2: Introduction to RPC

This chapter provides an overview of the Remote Procedure Call (RPC) model. For more information refer to your DCE publications.

2.1 Overview

A Remote Procedure Call is a mechanism which enables you to set up communication between the client and the server in a distributed application without involving you in the details of network communication. An essential part of the RPC mechanism is the definition of the interface between the client and the server. This is contained in an interface definition file . A remote procedure call in client source code is similar to a local procedure call, the difference being that the communication with the remote procedure is through DCE over the network.
2.2 Operation

An RPC distributed application is basically divided into two parts, the client side and the server side. The client side runs on one node and makes requests for services on behalf of the user. The server side runs on another node and services the client's requests. It can offer many remote procedures to an application.
2.2.1 RPC Interfaces and Stubs

The DCE RPC requires an interface definition which is used to generate the RPC stub files. These provide the actual DCE RPC support, as shown in Figure 2-1.

*
Figure 2-1: RPC Interface Structure

The interface definition describes the interface procedures and their associated parameters. Each version of an interface must be exactly the same for all implementations of that interface. As such, various clients from separate applications can call the same interface from remote locations.

Generated RPC stub files perform basic communication functions for remote procedure calls. They use RPC facilities to find servers for clients and send and receive remote procedure calls. They also perform data conversions if necessary and handle the transfer of data between clients and servers.

When a remote procedure call is made from the client application code the call is actually made to the client stub. The client stub converts the call information into internal RPC format and passes the call, with the necessary information to find a server, to the client RPC run-time library which transmits it to the server system across the network. The server RPC run-time library receives the call and passes it to the server stub which converts the information from RPC format to application format.

Then the server stub passes the call to the server where it is executed, and the whole conversion process is reversed as the call response is returned to the client. Figure 2-2 shows the sequence of a remote procedure call.

*
Figure 2-2: Sequence of a Remote Procedure Call
2.2.2 Binding Methods

The relationship between a client process and a server process during a remote procedure call is called binding. Binding information tells a client how to find a particular server. It includes the following:

    * A protocol sequence

    * The server host

    * The endpoint

A binding handle refers to the binding information for one binding process.

Binding information for DCE applications is usually stored on a name service database. The Cell Directory Service (CDS) is a name service particular to DCE. The RPC run-time library holds name service routines which are used to access the CDS.

There are three different possible binding methods:

    * Automatic

    * Implicit

    * Explicit

These are described in the following sections.
2.2.2.1 Automatic Binding

When automatic binding is selected the client stub automatically manages bindings when a remote procedure call is made from an application. The client stub gets the binding handle from the name service database and passes it to the RPC run-time library. This is the most transparent form of binding and requires minimal changes to a client application.
2.2.2.2 Implicit Binding

When implicit binding is selected a binding handle is held in a global area of the client stub. When a remote procedure call is made from an application the stub passes the binding handle to the RPC run-time library. You must write application code to obtain the binding information and set the global binding handle with RPC run-time routine calls.
2.2.2.3 Explicit Binding

When explicit binding is selected a binding handle is passed explicitly as the first parameter when a remote procedure call is made from an application. You must write application code to obtain the binding information and set the binding handle with RPC run-time routine calls.
2.2.3 Micro Focus COBOL Support for DCE RPC

To define a DCE RPC interface an interface definition must be written using the IDL (Interface Definition Language). Currently the DCE IDL definition can only be used to define an RPC interface for C applications. To enable a DCE RPC interface to be defined for COBOL applications Micro Focus DCE support for COBOL applications provides COBOL IDL.

Once a DCE RPC interface has been defined the next step is the generation of stubs and files that provide the actual support for the defined RPC calls. For DCE C applications this is done by using the DCE IDL compiler which uses the DCE IDL definition as input. To provide similar support for COBOL IDL Micro Focus provides the COBIDL utility. This utility takes the COBOL IDL definition as input and generates COBOL copyfiles (instead of C header files) and stubs that provide the actual support for the defined RPC calls. These stubs can be linked to the COBOL application code.

For more information on the COBOL IDL utility COBIDL see the chapters, Introduction to COBOL IDL and COBOL DCE Application Development Using COBIDL.

Micro Focus also provides a utility, COBDAG, that enables the automatic generation of DCE RPC support for native COBOL applications. The only input required is the actual source code of the COBOL application. It generates an executable COBOL/DCE server and client as its output.

For more information on the COBDAG utility see the chapters, Introduction to COBDAG and COBOL DCE Application Development Using COBDAG.

Copyright © 1996 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.


link:http://www.docs.hp.com/en/64/ll/llrpci.htm
分享到:
评论

相关推荐

    Microsoft Windows RPC Security Vulnerabilities-计算机科学

    Poland Introduction to Microsoft RPC Reverse engineering of Microsoft RPC services dmidl (reverse midl) fa (reverse c) Exploitation techniques for RPC vulnerabilities RPC DCOM ...

    SOAP Protocol

    1. Introduction 1.1 Design Goals 1.2 Notational Conventions 1.3 Examples of SOAP Messages 2. The SOAP Message Exchange Model 3. Relation to XML 4. SOAP Envelope 4.1.1 SOAP encodingStyle ...

    Automating Junos Administration - Jonathan_. Looney.pdf

    Introduction 1. Benefits of Automation 1. Automation Saves Time 2. Automation Prevents Human Error 3. Automation Saves Memory 4. Automation Prevents Copy/Paste Errors 5. Automation Enables New ...

    Automating.Junos.Administration.Doing.More.with.Less.1491928883.epub

    Introduction Chapter 2. RPC Mechanisms Chapter 3. The RESTful API Service Chapter 4. Junos PyEZ Chapter 5. Commit Scripts Chapter 6. Op Scripts Chapter 7. Event Scripts and Event Policies Chapter 8. ...

    SignalR Programming in Microsoft ASP.NET

    Topics include: Introduction to async development; HTTP and real-time communications; SignalR technology fundamentals; persistent connections and hubs; multiplatform real-time applications; advanced ...

    Odoo 11 Development Cookbook-Second Edition

    server-side debugging and provides an introduction to the Python debugger. It also explains how to write and run automated tests using YAML or Python for your addon modules. Client-side testing is ...

    Foundations of Python Network Programming(3rd) 英文版pdf

    Chapter 1: Introduction to Client-Server Networking Chapter 2: UDP Chapter 3: TCP Chapter 4: Socket Names and DNS Chapter 5: Network Data and Network Errors Chapter 6: TLS/SSL Chapter 7: ...

    XML Processing with Perl, Python, and PHP (2002).pdf

    lmost ten years ago, my introduction to the commercial world was handling and dealing with the databases of a UK government body. We used a free text-retrieval system to store information about ...

    BlazeDS开发者指南

    Chapter 1: Introduction to BlazeDS BlazeDS overview 2 BlazeDS features 3 Example BlazeDS applications 5 Chapter 2: Building and deploying BlazeDS applications Setting up your development environment ...

    PHP Web 2.0 Mashup Projects.pdf

    The chapter starts with an introduction to SOAP, the most complex of the web service protocols. SOAP relies heavily on other standards like WSDL and XSD, which are also covered in readable detail. ...

    Foundations of Python Network Programming(3rd).pdf 0分

    Chapter 1: Introduction to Client-Server Networking Chapter 2: UDP Chapter 3: TCP Chapter 4: Socket Names and DNS Chapter 5: Network Data and Network Errors Chapter 6: TLS/SSL Chapter 7: Server ...

    RemObjects SDK Documents mht

    RO00 - Article ROadmap for the... ...RO42 - Introduction to Free Pascal... RO45 - How to Write a RemObjects SDK... RO46 - How to Write a RemObjects SDK... WP02 - Cross Platform Development with...

    UNIX Network Programming Volume 2(Unix网络编程卷2英文版)

    1.1 introduction 3 1.2 processes, threads, and the sharing of information 5 1.3 persistence of ipc objects 6 1.4 name spaces 7 1.5 effect of fork, exec, and exit on ipc objects 9 1.6 error ...

    Python Cookbook, 2nd Edition

    How to Contact Us Safari® Enabled Acknowledgments Chapter 1. Text Introduction Recipe 1.1. Processing a String One Character at a Time Recipe 1.2. Converting Between Characters and ...

    [Go语言入门(含源码)] The Way to Go (with source code)

    The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................

    Advanced.Java.Programming.0199455503

    Advanced Java Programming is a textbook specially designed for undergraduate and postgraduate students of Computer Science, ... Introduction to J2EE Chapter 27. Java and CORBA 28. Java Server Faces

    Beginning Python (2005).pdf

    Introduction to Sockets 332 Try It Out: Connecting to the SuperSimpleSocketServer with Telnet 333 02_596543 ftoc.qxd 6/29/05 10:55 PM Page xxi xxii Contents Binding to an External Hostname 334 The ...

    word自动转化为chm

    Q: Error while loading Word document: “Call was rejected by callee”, “Command failed”, “The RPC server is unavailable”, etc. A: Connection to Microsoft Word may be blocked by the anti-virus ...

    The way to go

    go程序设计语言 Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING ...

Global site tag (gtag.js) - Google Analytics