[omniORB] Servant Forking

Visscher, Bruce VISSCHB at RJRT.com
Fri Jul 29 15:49:59 BST 2005


> I've developed a servant that provides an interface to a legacy
> FORTRAN simulation library to provide the capability of having
> multiple "instantiations" of the FORTRAN model.
> 
> I would like to be able to have some sort of daemon process similar to
> a Servant Activator that simply forks off a new process that runs a
> reference of my servant to be used by another client.  I need the
> servant to run as a new process because the legacy fortran model uses
> all global variables, retains its state, and cannot be re-initialized

Smells like OpenVMS.

> if a new client were to connect to it.  Once the client is finished
> with the servant, I want the servant to exit.
> 
> Does anyone have any experience

Yes.

> or suggestions doing anything 
> like this?

Don't.

;-)

Seriously, you might want to consider something like the CosEvents push/pull
model.  Either literally or as a model of how to solve this kind of problem.

I.e., the CosEvents/CosNotification servant becomes an agent that allows both end
points to be clients.  Even if you could change the memory model of the
legacy fortran code it might be committing other sins that cause it not to
play well as a multithreaded app.  Also, if you opt for the POA single threade
policy, I believe there will still be multiple threads in a process that has
omniORB servants (right Duncan?).

Again, it doesn't have to be CosEvents or CosNotification per se.  You could implement
something more application specific that follows the same basic idea as the push/pull
model.  I.e., a queuer/dequeuer.

I will leave it to up to you whether it is a good idea to fork a FORTRAN process
from a multithreaded C++ program in whatever environment you are in.

HTH,

Bruce Visscher

-----------------------------------------
CONFIDENTIALITY NOTE:  This e-mail message, including any  attachment(s),
contains information that may be confidential,  protected by the attorney-
client or other legal privileges, and/or  proprietary non-public
information.  If you are not an intended  recipient of this message or an
authorized assistant to an intended  recipient, please notify the sender by
replying to this message and  then delete it from your system.  Use,
dissemination, distribution,  or reproduction of this message and/or any of
its attachments (if  any) by unintended recipients is not authorized and
may be unlawful.




More information about the omniORB-list mailing list