Giter VIP home page Giter VIP logo

ammarkov / remotevariable Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.48 MB

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..!

Home Page: http://ammar.gr

License: Other

C 82.66% C++ 14.76% Shell 2.32% Objective-C 0.26%

remotevariable's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.