Seams that the minotaur is behaving badly, so I'm getting mails with couple of hours delay :)
Graham Leggett wrote: > > The way that the worker connects to backend depends on > scheme handler > > itself (direct or via proxy). > > The worker connection itself will be either bound to the client > > connection > > (http) or to a backend connection (ajp), and that is also set in > > scheme handler. > > I have to figure out how to effectively skip that for ftp > scheme handler. > > Ideally all three (http, ajp and ftp) should work the same way using a > pool: The http method of only reusing the connection if the > client reuses the connection is a bit bogus, there really > should be a pool. > > Ftp is the same - there should be a pool of ftp connections. > In the case of ftp, all it needs to do is logout completely > but keep the connection open, or - for extra points teaching > the pool that some connections require login (like ftp) and > to reuse connections wheree the login details match might > also be an idea. > > Ajp supports a pool anyway. > > Making all three the same - ie all three come from a pool > would solve this problem I think. The timeout characteristics > on each protocol would be different (I would imagine that ajp > would have a long lived connection, while http connections > would be constrained by the timeout on HTTP keepalives on > backend servers) but this is details. > They are planned to be the same. I'll make a generic obtain_connection that will be pulled out from the worker (connection pool), with opened socket (if closed). The way how it gets processed further depends on how the scheme handler says. For http connector the connection will be bound to the client connection. It will be returned to the pool (and closing the socket) when their connection id's are different. I have to see how to resolve the case when client breaks the connection. any ideas? For ajp connector the connection will be returned to the pool on request end (AJP can handle different clients trough the same socket). The ftp will probably call 'login' for new connections, but I'll first finish the upper two cases, and deal with ftp later (couple of days :) MT.
smime.p7s
Description: S/MIME cryptographic signature