synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From indika kumara <indika.k...@gmail.com>
Subject Re: Support for DiffServ with Http transport
Date Wed, 15 Feb 2012 08:19:42 GMT
Thanks for the offer.... It is always better to create JIRA issues and
provide patches. Developers @ correspond projects will review
your solutions / patches and make suggestions / improvements if needed
(hopefully constructive). BTW, I am not an active developer now and will
not be in near future.. So, I will not be able to give any concrete
feedback about your patches, etc.

Thanks,

Indika

On Wed, Feb 15, 2012 at 12:51 AM, Jørgen Nordmoen <nordmoen90@gmail.com>wrote:

> **
> Thanks for the patience Indika.
>
> This solution seems to be just what we were looking for!
>
> Since we are currently in the planning stages of this project we won't
> implement anything yet, but here is what we are thinking so far:
>
>    - org.apache.http.nio.reactor.IOSession
>       - setTrafficClass(int diffserv);
>          - channel.getsocket().setTrafficClass(int tos)
>       - int getTrafficClass();
>    - org.apache.http.impl.nio.NHttpConnectionBase
>       - setTrafficClass(int diffserv);
>          - session.setTrafficClass(int diffserv)
>       - int getTrafficClass();
>    - org.apache.synapse.transports.nhttp.HttpCoreNIOSender
>       - edit sendAsyncResponse()
>       - Here we have access to both MessageContect(Axis2MessageContext)
>       and NHttpServerConnection(extends NHttpConnectionBase) (worker.getConn())
>    - Hopefully we can add properties in the Synapse MessageContext which
>    effects the Axis2 MessageContext
>       - Add our own DiffServ property which can be retrieved in
>       HttpCoreNIOSender
>
> An additional thought now is whether or not we should push this
> upstream. So the question for you guys is if you want this additions
> upstream or if you feel they are too niche. If you want we could open
> an Issue both in Synapse and in HTTPComponents and add our patch when
> it is done.
>
>   --
> Best regards.
> Jørgen Nordmoen <jorgno@stud.ntnu.no>, <nordmoen90@gmail.com>
>
>   On on., 2012-02-15 at 00:07 +1100, indika kumara wrote:
>
> For your case, i.e., client <-> server, 'Server Handler' is the correct
> one. Look for 'sendAsyncResponse' in 'HttpCoreNIOSender'(synapse) which has
> access to 'NHttpServerConnection' (httpcore) and current Message Context.
>
>
>
>  ~ Indika
>
>  On Tue, Feb 14, 2012 at 11:17 PM, Jørgen Nordmoen <nordmoen90@gmail.com>
> wrote:
>
>  Thanks for all the feedback so far.
>
> What you have described is exactly what we want.
>
> Here is a image of how our setup will be:
>
> https://docs.google.com/drawings/pub?id=1VfzUCzqzVwIGF8qv8xlGY0hBqO9D822l1wVy6adn-bw&w=863&h=237
> The ESB will act as a proxy for services published on GlassFish, what
> we need to do is mediate messages from the GlassFish services to the
> clients and determin their priority in the network, then we have to
> alter the traffic class of the "Client server connection" to correspond
> with the right priority. Thanks to Indika we found these classes which
> we can modify:
>
>    - org.apache.http.nio.reactor.IOSession
>       - setTrafficClass(int diffserv);
>          - channel.getsocket()
>       - int getTrafficClass();
>    - org.apache.http.impl.nio.NHttpConnectionBase
>       - setTrafficClass(int diffserv);
>          - session.setTrafficClass(int diffserv)
>       - int getTrafficClass();
>
> But we are a bit confused as to the class "ClientHandler" which seems
> to send request from clients to endpoints, which in our illustration
> would be from Synapse to GlassFish. If anyone could clarify if this is
> right or wrong would be much appreciated. If this is right then I guess
> we have to alter "ServerHandler", but that doesn't seem to get any
> parameters which we could alter to include the needed QoS information.
>
>

Mime
View raw message