RPC 0

RPC 0

  What's This?

This package implements a custom protocol for performing remote procedure calls (RPCs). It is designed towards achieving fast RPC's on the TINI platform, but is suitable for any micro Java platform. Rough benchmarks on simple calls have achieved 4-5 calls per second ( a significant improvement over the 1 call per second you might get with XML-RPC ). A TINI RPC server is less than 8k in size.

Why another RPC mechanism?

I could have called this YARPC (yet another RPC ). There are many RPC mechanism's, e.g. RMI, CORBA, and SOAP, that are designed for desktop class computers. This package is designed to provide for the other end of the computer spectrum, small embedded systems. XML-RPC is a simple RPC mechanism, but its protocol uses XML that is heavy to parse and requires recursion. This package extends the direction XML-RPC is headed and attempts to be yet simpler ( hopefully all the way to dirt simple ). The package was implemented with the following goals:

  • fast execution on small systems - This requires reducing all the computation burden of marshalling and parsing calls. The base protocol does not support the arbitrarily complex argument lists that a protocol such as XML-RPC supports. For a large number of applications, a few simple arguments are sufficient. But, the protocol does not prevent complex types. If your application needs to pass a vector of hashtables of structures, you have to write a custom marshaller.
  • able to extend with custom types - A standard set of data types is provided for, but it is intended that applications that require other types can add marshallers. This is the same amount of work as coercing the custom type into primitives but is type safe. Also, the user can best determine how to marshall complex types.
  • easy to port to other platforms and languages - To this end, this package depends on no other libraries. If you port this code, you have a complete package and should be able to interoperate with other applications. Also, the package only attempts to provide a minimal feature set to limit the amount of code to port. The goal is not to reinvent Java RMI, CORBA or SOAP -- the goal is in the opposite direction. The protocol is simple enough to be implemented by most scripting languages. The protocol requires no recursion.

This distribution includes a library that can be used to build clients, and servers. An example standalone server is included. Several test clients are included to get you started. Complete source code, built binaries and ANT build files are included. A C++ version of the package is in the works.

  License

This software is subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.

The Original Code is "Hangar5 RPC 0 Library".

The Initial Developer of the Original Code is James D. Rudnicki.  
Portions created by James D. Rudnicki are
Copyright (C) 2003.  All Rights Reserved.

A full copy of the Mozilla Public License was included in this distribution. The original is available at www.mozilla.org .


Page created 03 May 04

Copyright 2004