users@grizzly.java.net

AW: Re: Grizzly-based proxy server

From: John ROM <snake-john_at_gmx.de>
Date: Mon, 02 Jun 2008 23:35:19 +0200

Hello Karsten,

I can only make a few comments because I have not much time at
the moment and please keep in mind that I do not play grizzly-wise in same league
as Jeanfrancois.

I think it is very good to post working examples. So that one knows what the other is talking about!

But I actually the way you ported the http proxy to grizzly just
does not feel right to me.

- I have a problem with the RequestHandler class because its basically an Adapter and has to use com.sun.grizzly.tcp.Request and Response
and repeat some work which has been done by these classes.

So in my opinion if you have some programming time and want top performance with
low resource consumption you should
hook RequestHandler somewhere nearer to the actual parsing of the bytes. Maybe not use SelectorThread at all but set up your own ProtocolChain ....

- Because of the architecture you are doing way to much Byte/String copying.

- maybe look for ways so that the filters can work on streaming data (maybe that is not possible)

- Replace RequestStreamer with asynchronous Grizzly Nio writing

I favor a Implementation which looks more like

see Thread Subject: Proxy implementation

https://grizzly.dev.java.net/servlets/ReadMsg?list=users&msgNo=83

Many Greetings
John


-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx