|You can spend hundreds of hours writing code, or, you can have powerRPC .
the most powerful ONC RPC development tool that exists today. Given
an interface description, PowerRPC generates client/server stub code
for generic multi-argument C functions and makes them callable over
a TCP/IP network. Data structures of arbitrary complexity, such as structs,
arrays, linked list, unions, can be transferred between different machines
running UNIX or Windows NT/95/88/NT/ME/XP/Server 2003/Vista/7/Server 2008. PowerRPC takes
care of all the complicated data encoding /decoding and networking.
PowerRPC also generates C++ client code. You only need to provide a
high level interface description.
PowerRPC is efficient.
It is easy to understand, easy to code, and the resulting programs are
small and highly efficient.
PowerRPC Quick Reference Guide (PDF)
PowerRPC is about programming by interface
The central idea of PowerRPC programming is the INTERFACE.
A PowerRPC server is a remote object that exposes an interface API to clients on the network. A programmer codes an RPC server according to a well defined interface.
With PowerRPC, you can
- Turn existing local API into RPC server object by grouping related functions in a PowerRPC interface definition. Suddenly, your local functions are callable across network.
- Create new RPC interfaces, and then provide their implementation.
For instance, the stdio file access API can be made into RPCes by define the interface:
int fread(...); //args ommitted
int fwrite(...) ;//args ommitted
} = 0x13232222; // interface ID
with an IDL file like this one, PowerRPC can create a FILE server in minutes. (see tutorial). Furthermore, the client code (which calls fread(..) looks almost the same. Needless to say, we have needs to create many new network applications today. And PowerRPC can make that very easy.
PowerRPC is about C/C++ programming
There is zero learning curve doing PowerRPC.
Since the design goal
of PowerRPC is to bring the power of RPC programming to the general
the powerRPC IDL was made to be as close to C as possible, so there
is no steep learning curve. Forget about sockets, forget about
the mysteries about ONC or DCE RPC, forget about their portability problems,
with powerRPC you don't need to worry about them anymore. You can become
a productive powerRPC programmer in almost no time.
For example, to make the fread(char*buf, int n,int m,FILE*) function an RPC. We write the following interface description:
int fread (out char [size = return, maxsize =n*m ]buffer, //line (1)
int n,int m, //line (2)
in FILE *fp //line (3)
Line (1) states that the argument buffer is for output of data from the server to the client, the buffer space is n*m, and the size of data to be sent back is the return value of this function. Line (2) and (3) are obvious. You tell exactly the meaning of a C function prototype, and powerRPC makes it an RPC;
Because powerRPC can handle arbitrary C functions, you can easily move your existing code to a distributed architecture. Suppose you have an existing C function that performs a specific task, such as query and update an RDBMS using embedded SQL, to make this function available to a client over a network, the only thing you need to do is to put the function in an IDL file and run the powerRPC compiler, as done for the fread() function shown above.
PowerRPC runtime library extends ONC RPC by offering multitasking/multithreading server, asynchronous RPC, and much more. These features can be enabled by setting properties in the IDL. For example, by adding a line
property THREAD_ON_CALL = true;
to an existing IDL file, you make an existing NT server multi-threading, and this change is transparent to an RPC client.
PowerRPC is based on industry standard
PowerRPC is based on the de facto industry standard--ONC RPC, which is a standard part of all UNIX installations. Therefore, PowerRPC runs on all platforms where ONC RPC is present.
We have also ported
ONC RPC to Windows NT/95/98/2000/ME/XP, so that
PowerRPC is also available on Win32 platforms. In fact, we have added
additional features such as multithreaded server and client. For those
who need to port existing ONC RPC server/client to WIN32, we have RPCGEN
for WIN32, Portmapper(Portmap servive for NT) for WIN32, and RPCINFO
The PowerRPC advantage
PowerRPC is a well designed quality product. It is designed to be a superior tool in the RPC field with a reasonable price. It is not something hacked out using macros and simple code substitution, but an intelligent compiler which understands the semantics of your IDL, when it compiles, you know the code will work.
At runtime, PowerRPC code is very efficient. If you need high performance, PowerRPC is the better choice. Also, the size of PowerRPC library is small, only 50K.
The best way to evaluate powerRPC is to try out examples by yourself, experiment with it, look at the generated code, and run your benchmark tests.
You can download PowerRPC for Win32 and UNIX from this site
PowerRPC is available for UNIX and Win32 (NT/95/98/2K/ME). The demo version of the IDL compiler, the powerRPC runtime library for several UNIX platforms and Windows NT, portmapper for NT, RPCINFO for Win32, online documentation and sample programs can be found at this WWW site.