Cross Platform Plug-in architecture and IPC

P

Paul Tremblay

Hi All,

I am writing an application framework which consists of [the purposes of
this discussion] classes mainApp and childApp (parent, child resp). My
intention is to make childApp a base class to be extended by
applications that want to be plugins of mainApp. *Note*: The plugin
itself is an application. So this is slightly different from the normal
plug-in framework - we now have to contend with IPC (I am enforcing the
restriction that the apps run on the same physical machine - so we can
ignore RPC).

My goal is therefore, to create a mainApp exectable, but then to be able
to create childApp1, childApp2 ... childAppN each of which are seperate
executables but are plug-ins for mainApp. The child applications receive
initializaion data from mainApp. I want to enforce the ff restictions on
the child applications:

1). only mainApp can launch the child Applications (i.e. child
applications can not be started from the command line for example)
2). mainApp can communicate with the childApps (and vice versa) for
example by sending initialization data and other messages (e.g.
heartbeat etc).

Therein lies the rub:

Q1). How do I empose restriction number 1 above (only parent can launch
child)?
Q2). Is there an opensource cross platform C/C++ library that allows
this kind of IPC?

Thanks

PS:- for anyone suggesting spread as answer to Q2, could you please
specify how I can set up spread to use only IPC - i.e. not flood the
network with messages since all group members are on one physical
machine?). I could not find how to do this using spread and this is why
I am now looking for an alternative library.
 
V

Victor Bazarov

Paul said:
I am writing an application framework which consists of [the purposes of
this discussion] classes mainApp and childApp (parent, child resp). My
intention is to make childApp a base class to be extended by
applications that want to be plugins of mainApp. *Note*: The plugin
itself is an application. So this is slightly different from the normal
plug-in framework - we now have to contend with IPC (I am enforcing the
restriction that the apps run on the same physical machine - so we can
ignore RPC).

So far no relevance to C++ language, but OK, let's read on...
My goal is therefore, to create a mainApp exectable, but then to be able
to create childApp1, childApp2 ... childAppN each of which are seperate
executables but are plug-ins for mainApp. The child applications receive
initializaion data from mainApp. I want to enforce the ff restictions on
the child applications:

1). only mainApp can launch the child Applications (i.e. child
applications can not be started from the command line for example)
2). mainApp can communicate with the childApps (and vice versa) for
example by sending initialization data and other messages (e.g.
heartbeat etc).

Again, no relevance to C++ language, still...
Therein lies the rub:

Q1). How do I empose restriction number 1 above (only parent can launch
child)?

There is no mechanism in C++ to do IPC since the object model of C++
assumes a single program running on a single CPU.
Q2). Is there an opensource cross platform C/C++ library that allows
this kind of IPC?

There is a post appearing in this newsgroup every month or so, titled
"Available C++ Libraries FAQ". Google for it in the archives. Then
take a look. If there is such a library, it's likely listed there. If
it's not, you might have better luck asking in a platform-specific NG
(despite the fact that you need a cross-platform one). Also, if you
are interested in C, this is not the right newsgroup either.
Thanks

PS:- for anyone suggesting spread as answer to Q2, could you please
specify how I can set up spread to use only IPC - i.e. not flood the
network with messages since all group members are on one physical
machine?). I could not find how to do this using spread and this is why
I am now looking for an alternative library.

Networking and IPC are not parts of C++ and are OT here. Please limit
your inquiries to C++ _language_.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top