[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference utrop1::linkworks_v3

Title:LinkWorks V3.0 Notes Conference
Notice:LNX_APO = APO issues, LINKWORKS_V3 = V3.0 issues
Moderator:tacklr.apd.dec.com::TACK_Lm::TACK_L
Created:Tue Jun 28 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2269
Total number of notes:8338

2127.0. "/DISCONNECT on MEXT_DLL and service process lifetime" by KETJE::HAENTJENS (Beware of Counterfeit) Mon Feb 17 1997 17:19

    With 3.0.8 (see Release Notes, appendix A External method execution)
    one can do a MEXT_DLL or MEXT_COMMANDLINE with the /DISCONNECT option.
    After the external hocus pocus the client then disconnects from the
    service such that the service process may be reused by another client.
    
    Question: before the age of the /DISCONNECT, that service process would
    go away when the client did a log off. So if you had an error in the
    DLL, or if you wanted to upgrade it to a new version, it was simple to 
    make a new version operational. How do you do that now? Does one need 
    to kill the process(es) in the style of stopdcs.sh?
    
    Ren�.
T.RTitleUserPersonal
Name
DateLines
2127.1IJSAPL::MONNINK_HTue Feb 18 1997 08:0013
    Renee,
    
    You'll have to stop the dcs process !
    
    This is also true for releases prior to 307 because normally you don't
    know which user is actually using the shared library, so you'll have to
    shutdown the DCS! 
    
    
    Han
    
    
    
2127.2TAV02::YAKIRYakir Lavie, ISRAEL DTN 882-3327Tue Feb 18 1997 09:2614
Hlelo Rene,

>    make a new version operational. How do you do that now? Does one need 
>    to kill the process(es) in the style of stopdcs.sh?
>    

  From the experience of some of our customers, it would seem that YES, you
need to do (as a minimum) a stopdcs.sh + startdcs.sh when the Shared Library
code has changed.

HTH

Yakir

2127.3Is the DLL reloaded now on each call?KETJE::HAENTJENSBeware of CounterfeitWed Feb 26 1997 17:1918
    I could do just one brief test with /DISCONNECT and then my development
    system broke down (for other reasons). So I want to re-test later.
    
    What I thought I noticed with /DISCONNECT is the following. Tell me if
    I'm wrong. The server process stays alife and indeed, another client
    can connect to it and make it work.
    
    But, my great advantage of loading the DLL (the shareable image on VMS)
    only once seems to have gone! As soon as the second client executes its
    external call, the DLL is reloaded (instead of being re-used).
    
    The C program in my DLL has a static variable where it counts the
    calls. Without /DISCONNECT, it counts 1 2 3 4 ... (for one client).
    With /DISCONNECT it restarts at 1 when the second client connects.
    
    So I win a process creation but I loose a DLL loading?
    
    Ren�.
2127.4maandaj.uto.dec.com::~::ANONYMOUS%Thu Feb 27 1997 12:1132
    
>    What I thought I noticed with /DISCONNECT is the following. Tell me if
>    I'm wrong. The server process stays alife and indeed, another client
>    can connect to it and make it work.
That is the intention.
    
>    But, my great advantage of loading the DLL (the shareable image on VMS)
>    only once seems to have gone! As soon as the second client executes its
>    external call, the DLL is reloaded (instead of being re-used).
No that should not be the case. I don't know VMS but on UNIX and NT, the /DISCONNECT
will disconnect the client from the DCS process on the server but the DCS process
should stay and the shared lib should still be loaded.
THe /CLOSE should stop the DCS process and hence unload the shared library.
    
>    The C program in my DLL has a static variable where it counts the
>    calls. Without /DISCONNECT, it counts 1 2 3 4 ... (for one client).
>    With /DISCONNECT it restarts at 1 when the second client connects.
I have tested the same thing on NT and UNIX. Without the /DISCONNECT all clients
have their own private counter. With the /DISCONNECT the will be using the same counter
so client A gets 1, client B gets 2 client A gets 3 etc. when they take turns on this
method.
Be carefull though. The parameters in cltdf.cfg are still taken into account. So if you 
use /DISCONNECT but the server process is not able to keep up with the request a new DCS
process will be started and also loads the DLL probably with shared text but certainly
with private data. So that counter will start at 0. 
With other words if you want to use this as an inter process (client) communication
mechanism, there is more to do.

Could you check the above when your server is running again?

Regards,
Jos
2127.5I'm wrong - it works OKKETJE::HAENTJENSBeware of CounterfeitThu Feb 27 1997 21:068
    Jos, Thanks for the quick reply and the useful info.
    
    Our server is up again, I retested and you're right. The shareable
    image stays loaded. Don't know what went wrong the first time.
    
    Sorry for the wrong statement in -2.
    
    Ren�.