RCFC |
Remote C Function Call |
by Pierre Mavrikios | rcfc@petros.it | 2010-09-01 |
General Description
What is RCFC.
RCFC is a remote procedure call inter-process communication that allows a computer application program to call a C language function to execute on another address space node (computer) in a TCP/IP network.
RCFC gives the
opportunity to write distributed applications on computers (nodes),
lay-ed on a hierarchical tree in a TCP/IP network.
Lower level node offers its services to the upper level node. Upper level node can grant any offered service upon different types of criteria.
A service is a C function that can be:
called from the lower level and executed by the upper level.
called from the upper level and executed by the lower levels.
Why
RCFC.
Create distributed application in hierarchical tree, from PDAs or embedded to supercomputers.
C functions can be called in both directions. From lower to upper node or from upper to lower node.
Easiness of developing distributed application programs by C/C++ programmers. No special knowledge is needed to make a basic distributed application.
Mainly, develop a distributed application program, running on computers connected in a hierarchical tree, is equivalent to develop a single application running on a single computer.
More you need more you learn.
C language syntax.
Just one processing tool to create whatever is needed for all the nodes of the distributed application.
How to create a distributed application.
Create a directory tree that reflects the hierarchy of the nodes of the distributed application.
In every directory (node), except the top level, create a 'rcfc_functions.def' C compatible header file and declare the remote C function prototypes relative to the higher level node.
Execute the 'rcfcbuild' program, which creates the RCFC static library and C header files in every directory.,fore every node. The RCFC libraries contain whatever is needed by the node application programs.
Compile and link every node with the previously generated respective RCFC library.
How it works
After the offer/grant
process success between two nodes, a TCP/IP socket pair for every
calling and called library module is established. The transport agent
of the calling module packs the arguments and sends them to the
correspondent called library module. The called module unpacks the
arguments, calls and executes the C function. The transport agent of
the called module packs the return value of the function and sends it
to the calling module.