Your problem is very similar to the problems with a Web frontend to the IMAP protocol; it is designed to be stateful and let users keep connections, which conflicts with HTTP's stateless model.
A solution that some IMAP users use is a connection-caching IMAP proxy. It keeps a large cache of connections open, each identified somehow (with an ID or by username/password). When the Web app gets a request, it opens a new connection to the IMAP proxy. The proxy looks in its connection cache for the connection. If it finds it, it uses the cached connection; otherwise it opens a new one. Presumably the proxy will time out connections after a period of time, or else keep a maximum number of sessions open then close the least recently used one.
You could do this by adding a SESSION command to your protocol, which the proxy could use to re-attach users to sessions. The session number could be kept as a cookie, form variable, session variable, etc.
In reply to Re: HTTP server guidance
by sgifford
in thread HTTP server guidance
by DaveH
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |