On 3/4/06, Samuel Doyle <[EMAIL PROTECTED]> wrote: > > Nobody has any suggestions on using some form of mina > provided approach for this?
It takes some time for you to get a response; because it's an open source software. It can even take a week. :) > Hi, I'm basically attempting to use mina to act as a > > proxy server something like discussed in the > > previous > > example: > > > > http://www.nabble.com/-MINA-Using-MINA-to-write-a-proxy-server-like-application-t656623.html > > However, the case I have is not 1:1 on the client > > and > > server session basis. > > > > The situation I have involves a client which spawns > > multiple processes, each opening its own connection > > to > > my proposed mina server. The mina server itself has > > a > > persistent fixed amount of connections to the actual > > server to distribute the client requests with. The > > client connections are short lived are only open to > > process a single request while the mina->server > > should > > always be open. > > > > Client 1<---------| > > | Persistent Conn 1 > > Client 2<--------|| |--------------> > > Mina Server Actual Server > > Client 3<--------|| |--------------> > > | Persistent Conn 2 > > Client 4<---------| > > > > The amount of client connections is variable but the > > connections from mina to the actual server is always > > fixed. My question is, what is the best way to demux > > the responses from the actual server to the > > appropriate client? One of the fixed mina->server > > sessions may have several client->mina sessions > > attached to it at one time. Is there something Mina > > provides to do this or do I need to come up with > > some > > home grown based version? There's no special way to implement it. To do so, there has to be an identifier for each message so you can determins which message belongs to which client. Plus, the proxy should be able to interpret the message so it can extract the ID field. That's all. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
