Browse Prior Art Database

Marshalling Database Engine Data Structures with DCE/RPC

IP.com Disclosure Number: IPCOM000110962D
Original Publication Date: 1994-Jan-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 4 page(s) / 112K

Publishing Venue

IBM

Related People

Lin, D: AUTHOR [+3]

Abstract

Remote Data Service is a set of functions for OS/2* Extended Services (ES) that allow users to access databases not only on their local workstations but also on remote workstations. DCE**/RPC is a high-level communication facility with procedure call semantics supporting client-server distributed computing. It is suited for implementing Remote Data Service. The implementation with DCE/RPC will be compact and portable.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 48% of the total text.

Marshalling Database Engine Data Structures with DCE/RPC

      Remote Data Service is a set of functions for OS/2* Extended
Services (ES) that allow users to access databases not only on their
local workstations but also on remote workstations.  DCE**/RPC is a
high-level communication facility with procedure call semantics
supporting client-server distributed computing.  It is suited for
implementing Remote Data Service.  The implementation with DCE/RPC
will be compact and portable.

      However, one of the problems found in a prototype exercise is
how to define in IDL (RPC Interface Definition Language) network
independent data structures as RPC parameters of the Remote Date
Service operations.  The data structures need to be as close to the
data structures used by the database engine as possible so that
minimum data restructuring and conversion is needed on the database
engine (the server) part.  The data structures defined and used must
incur a minimum communication and processing overhead in RPC
processing.

      The precompiler in the OS/2 ES 1.0 Database Manager takes
source language SQL statements and maps those statements into
Database Manager application programming interfaces (APIs).  For each
SQL statement there are one or more procedure calls which create a
series of data structures for the database call.  These data
structures include SQLRA (SQL Request Area) and SQLDA (SQL Data
Area).  The SQLRA is mapped to SQLJRA before being routed to the
remote machine.  The gateway router will route SQLJRA and SQLDA to
host database engine through DRDA-1 protocols or to another database
engine through our DCE/RPC protocol.  The design for the RPC
client-server code can take advantage of the fact that the data
structures used on both client and server may be defined as those
actually used by the database engine application written in the same
high-level language (C) on the server side.  As such, we can use RPC
stubs and runtime routines to marshal and pass these data structures
to the server and unmarshal the engine data structures on the server
side.  SQLJRA is simple and fairly easy to define in IDL.  SQLDA, on
the other hand, is more difficult to define for efficient processing.
The IDL definition will greatly affect performance since most of the
user data is stored in input and output SQLDA structures.

The following shows an efficient IDL definition of SQLDA.

[

uuid(68a8913a-c1ce-11c9-8b67-08002b1110fa),

version(0.0),

pointer_default(ptr)

]

interface alias

{

const short EYE_CATCHER_SIZE = 8;

const short MAX_NAME_SIZE = 30;

typedef unsigned char UCHAR;

typedef struct sqlname_t {

     short       length;

[length_is(length)]   CHAR       data [MAX_NAME_SIZE];

} sqlname_t;

typedef struct triplet_t {

    short       sqltype;      /* sql variable data type identifier */

 short       sqllen;       /* variable data length */

   [size_is(sqllen)] UCHAR       *sql_da...