Re: Support for DiffServ with Http transport

2012-02-15 Thread indika kumara
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.

Re: Support for DiffServ with Http transport

2012-02-14 Thread Jørgen Nordmoen
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 * setTraffi

Re: Support for DiffServ with Http transport

2012-02-14 Thread indika kumara
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 wrote: > ** > T

Re: Support for DiffServ with Http transport

2012-02-14 Thread Jørgen Nordmoen
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

Re: Support for DiffServ with Http transport

2012-02-13 Thread indika kumara
I think usually the traffic class is determined based on the client/user/tenant class. Usually it is needed to classify the incoming requests from users into classes(e.g., gold, silver, etc) and use that information to set the traffic class in the network channel. In that case, the traffic class ne

Re: Support for DiffServ with Http transport

2012-02-13 Thread Hiranya Jayathilaka
I think this needs to be implemented almost entirely at the NHTTP transport level. You can load a set of hostname-to-traffic class mappings from a transport receiver parameter. Then as Oleg pointed out you can set the appropriate class requirements on the socket in the prepareSocket method of an ex

Re: Support for DiffServ with Http transport

2012-02-13 Thread indika kumara
Have a look at how we set socket timeout per request. Look for the follwing code fragemnt in the method 'processConnection' in 'ClientHandler' (synapse) if (axis2Req.getTimeout() > 0) { conn.setSocketTimeout(axis2Req.getTimeout()); } Then look at how the implementaion at 'NH

Re: Support for DiffServ with Http transport

2012-02-13 Thread Jørgen Nordmoen
Thanks for the clarification Oleg and appologies for the duplicate message in the HC mailing list. Currently the bind method seems like our best bet since we need to change the traffic class on each client connection, but we are having a bit of a problem finding a way to interact between a mediato

Re: Support for DiffServ with Http transport

2012-02-10 Thread Oleg Kalnichevski
On Fri, 2012-02-10 at 11:24 +0100, Jørgen Nordmoen wrote: > Thank you for your reply. > > Setting the traffic class is exactly what we need. We have to do that > to every client connection, but also need to have control over what is > set for each connection as the clients will get different prior

Re: Support for DiffServ with Http transport

2012-02-10 Thread Jørgen Nordmoen
Thank you for your reply. Setting the traffic class is exactly what we need. We have to do that to every client connection, but also need to have control over what is set for each connection as the clients will get different priority based on our parameters. We have looked into the classes you s

Re: Support for DiffServ with Http transport

2012-02-09 Thread indika kumara
Hi, Would *setTrafficClass(int tc)* of java Socket API work for you? You can access the connecting Socket by overrideing 'bind' of DefaultNHttpClientConnection (httpcore) in LoggingNHttpClientConnection (synapse) and set tranffic class Also, you can modify 'bind' method of DefaultNHttpClientConn

Support for DiffServ with Http transport

2012-02-09 Thread Jørgen Nordmoen
Hello. Long explenation: We are a group of students tasked with creating a system which is able to prioritize messages in a network, our customer has asked us to use WSO2 ESB which is, as you most likely know, just Apache Synapse. We have one strict demand from the customer and that is that our sy