Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Sanely modifying running code

by thor (Priest)
on Mar 14, 2006 at 01:35 UTC ( #536434=note: print w/ replies, xml ) Need Help??


in reply to Sanely modifying running code

What if you had two instances of your service running and had a way to individually control the starting/stopping of each one? If you did this, you could shut down service A, change whatever you want, bring up service A, and then do the same for B. The "stop" command would really be a quiesce, allowing currently connected users to stay connected, but new requests would go to the other service. Once all the currently connected users disconnect, the service shuts down and you can do your work. This assumes that user sessions are relatively short-lived.

thor

The only easy day was yesterday


Comment on Re: Sanely modifying running code
Re^2: Sanely modifying running code
by Limbic~Region (Chancellor) on Mar 14, 2006 at 13:11 UTC
    thor,
    Hmmm - what you describe appears to assume that my network application is web based where HTTP is stateless and "sessions" are created through the application. This is not the case - these are sockets. A TCP connection is established and remains that way until termination. Building the necessary framework to make your suggestion work is way beyond the scope of this project. If I am missing something obvious - let me know.

    Cheers - L~R

      what you describe appears to assume that my network application is web based where HTTP is stateless and "sessions" are created through the application.
      Almost. It does, however, assume that sessions are started and stopped relatively quickly (think minutes instead of days).
      A TCP connection is established and remains that way until termination.
      Interestingly enough, that's how the web works. ;) Either way, you're free to use the methodology that I stated above or not; I won't be hurt if you don't.

      thor

      The only easy day was yesterday

        thor,
        I am interested in hearing how I could use your methodology but you can consider me confused. I would have thought my requirement of not dropping connected users would make your approach untenable?

        I can't rely on users to disconnect from one server and reconnect to another as stated in my original requirements. The only way I can see to make your solution work then is to have the clients connect to a proxy on the front side which then reconnects to the second server on the back side.

        Is this what you were proposing or am I still just missing the boat?

        Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://536434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-09-19 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls