Rebooting an application

  • Thread starter Kevin Shallenberger
  • Start date
K

Kevin Shallenberger

Hello all,
I have a client/server program where I'd like to be able to "reboot" the
server without losing the client connections and some of the objects.
Essentially I'd like to be able to update the server code without bringing
it down. It takes ~5 min to startup so it'd be nice if I could maintain the
larger objects. How would I be able to work this out?

Thanks,
Kevin
 
K

Kevin Shallenberger

That takes care of transferring the objects. Now how do I move the client's
socket connection over to the newly started app without disconnecting?
 
A

ak

Kevin Shallenberger said:
Hello all,
I have a client/server program where I'd like to be able to "reboot" the
server without losing the client connections and some of the objects.
Essentially I'd like to be able to update the server code without bringing
it down.
Write your own ClassLoader, and update the server code without rebooting
 
C

Chris Uppal

Kevin said:
That takes care of transferring the objects. Now how do I move the
client's socket connection over to the newly started app without
disconnecting?

Probably your best bet is to re-engineer the communication protocol so that
clients understand that the server will sometimes disconnect, and will
reconnect automatically when they need to.

-- chris
 
A

Andy Fish

the key to this is making the design as stateless as possible. Have all the
paraphernalia asssociated with a particular connection separated out and
made serializable

you can't reconnect an actual tcp/ip socket, so you will need to make your
communication protocol connectionless (or semi-connectionless) and pass
something akin to an HTTP cookie backwards and forwards when reconnecting

if you don't want the client to disconnect after every request, I would
prefer having the client volunteer to disconnect after a certain amount of
idle time rather than force the server to shutdown with the TCP connections
still active. That way when you want to shut the server down you don't need
to worry about one of the clients being in the middle of a transaction - you
can disallow new connections and wait for all the existing clients to
timeout.

Andy
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top