Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!inkwell!ivan!jhc From: jhc@ivan.uucp (James H. Coombs) Newsgroups: comp.lang.c++ Subject: Re: C++ classes for Sun RPC Message-ID: <54465@inkwell.UUCP> Date: 25 Jun 91 15:32:04 GMT References: <1991Jun19.192025.14683@colorado.edu> Sender: news@inkwell.UUCP Reply-To: jhc@ivan.UUCP (James H. Coombs) Organization: IRIS - Brown University Lines: 72 In article <1991Jun19.192025.14683@colorado.edu> jeffm@noisette.colorado.edu (Jeff McWhirter) writes: >We have a need for an O-O rpc mechanism in C++ for >Sun RPC. It would be nice to support blocking and non-blocking calls, >xdr routines for passing data, ...? >It would also be nice if something like this has been done so we won't >have to do it. >Has anyone heard of or built such a mechanism??? I have developed an RPC++ on top of Sun's RPC. RPC++ consists of two major components: 1. A C++ class definition parser generates a full set of XDR routines. This set includes both the pointer and reference xdr routines. It supports multiple inheritance. A keyword can be applied to class fields that should not be transported. Etc. 2. I revised rpcgen to generate C++ classes and method implementations. To implement a server, the developer uses the standard RPC program syntax, compiles the RPC program with the revised rpcgen, and subclasses the generated server/client. The C++ classes then have such methods as ClntInit/SvcInit and ClntTerm/SvcTerm. Given a method such as RegisterQuery, the client simply invokes the method RegisterQuery with the C++ Query object; the server overrides the base class and implements any required functionality. Other features: 1. RPC++ supports both blocking and asynchronous I/O. There is a separate library to implement async. I/O for Motif applications. 2. Built-in error handling. I also developed an error handling package. All RPC++ methods return a subclass of an error object, which contains a code and a message. The RPC++ framework automatically conveys error information from the server back to the client and loads the data into the client's error handler. The application writer need only check the code and invoke the display routine. 3. Flexible program number assignment. The application writer specifies the name of an environment variable that can be set to override the default program number. 4. Easy definition of callbacks. The RPC++ library contains methods for acquiring transient numbers. To register a callback, the user need only use a manifest constant in place of the program number and then initialize the program. This is a quick overview of RPC++. It has been very successful here. I worked at the socket level for three years, and I would not hesitate to take the time to re-implement RPC++ before working at the socket level again. Availability: This is a research institute. We do not create products. We also cannot give things away. We have licensed software in the past and have discussed licensing RPC++ to a couple of companies. In any licensing agreement, we would want to recover our costs for licensing and distribution as well as some of the development costs. We also have research partnership plans for those who want to fund our research in return for access to the ideas, etc. I do not handle the business end, so I do not know how much a reasonable agreement would cost. I am also in the middle of writing a grant proposal, so I am reluctant to encourage people to send me mail for more information. But, if there is a reasonable chance that your organization can make a fair licensing or funding agreement, I would be happy to bring the institute's director into the discussion. Cheers! --Jim