users@grizzly.java.net

Re: Proxy implementation

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Tue, 05 Jun 2007 17:52:31 +0200

Karsten, please try this version.
I tried to avoid frequent registering of OP_READ on main selector.

WBR,
Alexey.

Oleksiy Stashok wrote:
>
>>> In your implementation one thing is not clear to me. It's your Map.
>>> May be I missed something, but seems it's just one-direction map. In
>>> other words what will be if request will come to proxy in several
>>> parts? How it will be processed?
>>>
>>
>> No, the map contains the SocketConnections from the client to the
>> proxy as key and proxy to server as value and also the other direction.
>>
> Right, didn't notice that :)
>
>>>> Can have used a blocking connect method and write the dat in
>>>> blocking mode. Can this cause problems? As far as I see the
>>>> Pipiline is executed eahc time a SelectionKey event happens but by
>>>> defualt 20 threads are only executed. Can this be a limit? Can the
>>>> performance be improved?
>>>>
> It depends from specific configuration, but think 20 threads should be
> ok. Think the main reason of bad results - is that in our
> implementations we reregister keys all the time on main selector.
> Think using ByteBufferInputStream for reading will get implementation
> speed much better.
>
> WBR,
> Alexey.
>
>>>> I have also attached test results from JMeter compared to a
>>>> blocking solution and a direct conenction to a Tomcat server.
>>>>
>>>> Ragards,
>>>> Karsten
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>