logoff/shutdown philosophy with out-of-process servers

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have an out-of-process server that handles datalogging automatically
(it does spawn threads to manage new data on a periodic basis as long
as the COM object that spawned the thread is alive) & am trying to
figure out some lifecycle issues for the objects it creates.

This is not a question about how to handle WM_QUERYENDSESSION and
WM_ENDSESSION (I found most of the threads on this newsgroup) in the
server's _Module object. If I have to go there, I will have
questions...

....but my question first is whether to go there, e.g. whether there is
any reason to make the server autonomous with one or more COM objects
keeping themselves alive until explicitly asked to quit or until the
server detects WM_QUERYENDSESSION. (vs. the usual lifecycle approach
which is to be subservient to the client via refcounts and die when the
refcount reaches 0.)

are there any good real-world examples of doing this?

I have almost convinced myself that it's not necessary; if I have a
datalogging COM object doing its thing, then there should be some kind
of client program that "cares" about the COM object by holding onto an
interface pointer; if there are no client programs that care about the
COM object then there's no reason for the object to stay around. From a
user's interactive point of view, it means that in order for the
datalogging object to be around, the user either has to run a script or
other program that programmatically creates & then releases the object,
or the user has to keep open some kind of interactive control panel
thingy that holds onto interface pointers.

if there are obvious holes in this argument, I would appreciate hearing
them.

.



Relevant Pages

  • Problem with writing to sockets - not robust
    ... I want to make it more robust so that it can handle network or server ... It works well when the WAN connections are good ... The socket is opened in a subroutine... ... signla to close the socket on the server side), the client program does ...
    (comp.lang.perl.misc)
  • secure multiplayer using python?
    ... -many client program instances connect to a central file+db server ... -over time intervals the client program checks to see if claimed files ... Currently I am handing out ftp user/pass to each client program (hidden ...
    (comp.lang.python)
  • Re: VB6 compatible Dll created with VC++6 problems using afxsock functions
    ... VB6 compatible DLL that I've made. ... Sockets declarations and recv& sendfunction are defined in ... More over I had already written the Client program in VC++6 using ... send to the server aren't received altough the code is hardly the same ...
    (microsoft.public.win32.programmer.networks)
  • Re: Sending to Socket
    ... "FilexBB" wrote in message ... > I compose a client program that capture System.in and send it to ... > work on server that can't recieve anything. ... Sun Certified Developer for the Java 2 Platform ...
    (comp.lang.java.programmer)