Return-Path: X-Original-To: apmail-synapse-dev-archive@www.apache.org Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF80B9A14 for ; Fri, 10 Feb 2012 10:25:34 +0000 (UTC) Received: (qmail 84247 invoked by uid 500); 10 Feb 2012 10:25:29 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 83013 invoked by uid 500); 10 Feb 2012 10:25:02 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 82972 invoked by uid 99); 10 Feb 2012 10:24:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 10:24:57 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nordmoen90@gmail.com designates 209.85.215.42 as permitted sender) Received: from [209.85.215.42] (HELO mail-lpp01m010-f42.google.com) (209.85.215.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 10:24:50 +0000 Received: by lagk11 with SMTP id k11so2373721lag.15 for ; Fri, 10 Feb 2012 02:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:subject:from:to:date:in-reply-to:references:content-type :x-mailer:mime-version; bh=D7LRPWDoe4uJwM5QQkBHB0+3wGRPVIFFh6zA972TflA=; b=dJi0vQYGCnx/OsQkV0hAsW516FCQ1YnUaKClfhHC540lz3IDXfIGGZwa+6occjvY4e llHUxf18PFcD0byE7bPIXCJ/6KT2WuEM59oliuebBEA027xbIrP1RPPhuPPB4y1cANDA /ZZS3X42I4xW9g95621whS04GaQB0GiRNNOPQ= Received: by 10.152.136.20 with SMTP id pw20mr3774130lab.32.1328869468705; Fri, 10 Feb 2012 02:24:28 -0800 (PST) Received: from [78.91.83.208] (dhcp-083208.wlan.ntnu.no. [78.91.83.208]) by mx.google.com with ESMTPS id jh4sm4520740lab.17.2012.02.10.02.24.26 (version=SSLv3 cipher=OTHER); Fri, 10 Feb 2012 02:24:26 -0800 (PST) Message-ID: <1328869465.1635.40.camel@localhost.localdomain> Subject: Re: Support for DiffServ with Http transport From: =?ISO-8859-1?Q?J=F8rgen?= Nordmoen To: dev@synapse.apache.org Date: Fri, 10 Feb 2012 11:24:25 +0100 In-Reply-To: References: <1328790348.1635.24.camel@localhost.localdomain> Content-Type: multipart/alternative; boundary="=-QRXzW/pHmoKBWxBrWw/J" X-Mailer: Evolution 3.2.3 Mime-Version: 1.0 --=-QRXzW/pHmoKBWxBrWw/J Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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 suggested, but we can't find any 'bind' method or anything related to the sending socket. Best regards. Jørgen Nordmoen , On fr., 2012-02-10 at 14:22 +1100, indika kumara wrote: > 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 DefaultNHttpClientConnection > (httpcore) to set traficclass using provided http parameters of 'bind' > method. > > > Note: I do not have a good knowledge abut httpcore. So, I may wrong. > Please check with them. > > > Thanks, > > > Indika > > > > 2012/2/9 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 system must be able to set the DiffServ field in the > IP > header. The system must be able to accept SOAP messages and > forward > them to a GlassFish server with the final endpoints. And here > is our > problem, since Synapse does not directly support DiffServ or > TOS we > need to implement it, but after much research we are still not > quite > sure how to do this and that is why this emails is sent. We > have some > leads on where we could alter, > org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor > could be > extended in order to obtain the DiffServ value from the > MessageContext > and then alter the Socket connection, but we are not quite > sure as we > don't have the overview needed. > > Question: > Is there a way we could alter Synapse, Axis 2 and/or > HTTPCommons in order for us to support setting different > DiffServ > values to different clients? Hopefully we could alter > something which > we could either reach or interact with from a mediator which > we have to > write a cuple of anyway. > > Best regards. > Jørgen Nordmoen , > > > > > --=-QRXzW/pHmoKBWxBrWw/J Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit 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 suggested, but we can't find any
'bind' method or anything related to the sending socket.

Best regards.
Jørgen Nordmoen <jorgno@stud.ntnu.no>, <nordmoen90@gmail.com>
On fr., 2012-02-10 at 14:22 +1100, indika kumara wrote:
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 DefaultNHttpClientConnection (httpcore) to set traficclass using provided http parameters of 'bind' method.


Note: I do not have a good knowledge abut httpcore. So, I may wrong. Please check with them.


Thanks,


Indika

2012/2/9 Jørgen Nordmoen <nordmoen90@gmail.com>
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 system must be able to set the DiffServ field in the IP
header. The system must be able to accept SOAP messages and forward
them to a GlassFish server with the final endpoints. And here is our
problem, since Synapse does not directly support DiffServ or TOS we
need to implement it, but after much research we are still not quite
sure how to do this and that is why this emails is sent. We have some
leads on where we could alter,
org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor could be
extended in order to obtain the DiffServ value from the MessageContext
and then alter the Socket connection, but we are not quite sure as we
don't have the overview needed.

Question:
Is there a way we could alter Synapse, Axis 2 and/or
HTTPCommons in order for us to support setting different DiffServ
values to different clients? Hopefully we could alter something which
we could either reach or interact with from a mediator which we have to
write a cuple of anyway.

Best regards.
Jørgen Nordmoen <jorgno@stud.ntnu.no>, <nordmoen90@gmail.com>





--=-QRXzW/pHmoKBWxBrWw/J--