RemoteVariables is a GNU/GPL licensed networking layer on top of regular C/C++ programs using TCP sockets.. With it you can share parts of your address space between processes running on the same or different machines , with no socket coding at all.. Just add the pointers of your shared variables ot the list and they will be synchornized on the background for you providing an easy framework for writing network enabled applications..!
Remote Variable Sharing for C / C++
////////////////////////////////////////////////
Variable Share is a GNU/GPL layer on top of regular C programs using TCP sockets with which you can easily
share portions of your address space ( Variables ) using the network, between programs running on the same or different machines..
Its usage should be straightforward , just including the header and linking the library and adding 2 lines of code
one for initialization and one for closing it. From there on for each variable ( pointer ) shared an aditional line should
be added to add the pointer to the VariableShare temporary pointer database.
It should allow local variables on the scope of a process to be viewed and/or written from a remote process with a very light overhead..
As for security there will only be base line security measures and the whole point is to use it via SSH tunneling or wrap it in an otherwise secured
connection.
For debugging ValGrind is a great tool that will is used during the development
The project is not mature yet so be sure to check updates on this repo..
Simple Practical use case scenario for the library
------------------------------------------------------------------------------------------------------------------
For example lets say an admin has a very complex program on PC#1 and wants to find out the value of the variable "int ServiceNeeded;"
the PC #1 program should have the following structure :
struct VariableShare * vsh = StartVariableSharing("PC1","password");
...
int ServiceNeeded=0;
AddVariableToSharingList(vsh,"ServiceNeeded","R",&ServiceNeeded,sizeof(ServiceNeeded));
...
/*
COMPLEX PROGRAM HERE
*/
...
StopVariableSharing(vsh);
the Admin PC program should have the following structure :
struct VariableShare * vsh = ConnectToVariableSharing("xxx.xxx.xxx.xxx:12345","password");
int RemoteServiceNeeded=0;
AddVariableToSharingList(vsh,"ServiceNeeded","R",&RemoteServiceNeeded,sizeof(RemoteServiceNeeded));
/* Now the RemoteServiceNeeded will change ( from the background thread ) in the event that th PC#1 program changes the ServiceNeeded variable..! */
while ( RemoteServiceNeeded == 0 )
{
Sleep(1000);
}
fprintf("Service needed at machine %s\n",vsh->sharename);
StopVariableSharing(vsh);
------------------------------------------------------------------------------------------------------------------
For more info , check the Documentation directory
or the RemoteVariableClone and RemoteVariableMaster test apps..!
////////////////////////////////////////////////
Ammar Qammaz 2010-2012