From melissadiaz@example.net Mon Nov 02 11:47:18 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 85123 invoked from network); 2 Nov 2009 11:47:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 11:47:18 -0000 Received: (qmail 60572 invoked by uid 500); 2 Nov 2009 11:47:18 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 60513 invoked by uid 500); 2 Nov 2009 11:47:17 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 60503 invoked by uid 99); 2 Nov 2009 11:47:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 11:47:17 +0000 X-ASF-Spam-Status: No, hits=-6.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mta-1.ms.rz.rwth-aachen.de) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 11:47:14 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from ironport-out-1.rz.rwth-aachen.de ([83.161.120.155]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <melissadiaz@example.net> for melissadiaz@example.net; Mon, 02 Nov 2009 12:46:53 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.44,666,1249250400"; d="scan'208";a="32110458" Received: from relay-auth-2.ms.rz.rwth-aachen.de (HELO relay-auth-2) ([83.161.120.155]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Mon, 02 Nov 2009 12:46:53 +0100 Received: from [83.161.120.155] ([unknown] [83.161.120.155]) by relay-auth-2.ms.rz.rwth-aachen.de (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 9 2008)) with ESMTPA id <melissadiaz@example.net> for melissadiaz@example.net; Mon, 02 Nov 2009 12:46:53 +0100 (CET) Message-id: <melissadiaz@example.net> Date: Mon, 02 Nov 2009 12:46:53 +0100 From: =?ISO-8859-1?Q?Lukas_Nie=DFen?= <melissadiaz@example.net> User-Agent: Thunderbird 83.161.120.155 (X11/20090817) To: melissadiaz@example.net Subject: Re: SSHD - Allow Port Forwarding References: <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> In-reply-to: <melissadiaz@example.net> Am 30.10.2009 17:18 schrieb Guillaume Nodet: > I've load tested the tcpip port forwarding today and found a problem > that i've fixed. Could you give it a try on your side and report back Thanks again for your effort. The issue remains the same... Maybe I'll be able to do some tracking to see where the error occurs. Did you try and were you able to reproduce the error? I even wasn't sure if those "page-not-completely-loading" errors have to do something with your implementation or if it is my setup which causes the error, but I tried to use OpenSSH's serverside implementation, and there I can't see any problems, any pages (including those I mentioned in the last post) load seamlessly. Best regards Lukas Niessen From melissadiaz@example.net Mon Nov 02 13:03:46 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 11136 invoked from network); 2 Nov 2009 13:03:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 13:03:46 -0000 Received: (qmail 31431 invoked by uid 500); 2 Nov 2009 13:03:45 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 31378 invoked by uid 500); 2 Nov 2009 13:03:45 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 31368 invoked by uid 99); 2 Nov 2009 13:03:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 13:03:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-iw0-f188.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 13:03:34 +0000 Received: by iwn26 with SMTP id 26so3455290iwn.5 for <melissadiaz@example.net>; Mon, 02 Nov 2009 05:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=3SrsLRCptZ7X1ZMysxanUDD414/2LOuL7XlUYqFOOP0=; b=vrL1vFEj0ABDDug8VcZnx9OSdfS5IZH4PAxmpZA55Oz8XyfjbjPOI7NQb7yl3JQbDr oFVQ4auZ+UATzZG23YeDOyzK49wO+5h/TKddr9WWCAmCYDMfOueNOWvp+fYPr3Ytgw8k Xiae1gAHHNGUqwO+MRXgYssOWCQdn1Ex8rvAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qhc62bjippvHgq8NxSKcOCJAqPEm3F4hwndxDW/JgQHJHTCWG62ovW2+ivgMy8Tqme Fq3a5G7xaYbytD0KZW6RCqXUpEDn1LEgOPIbZIfMrcLJafIwqsAXBJ97H57vetN7aCbn HwaIOi6LGUY+ykSsjeFZ0nxsC2eQtP080ayYI= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id w19mr799255ibr.8.1257166990831; Mon, 02 Nov 2009 05:03:10 -0800 (PST) In-Reply-To: <melissadiaz@example.net> References: <melissadiaz@example.net> Date: Mon, 2 Nov 2009 18:33:10 +0530 Message-ID: <melissadiaz@example.net> Subject: Re: KeepAliveFilter questions From: Ashish <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Can you elaborate a bit on the problem/issue you are facing? thanks ashish On Sat, Oct 31, 2009 at 8:51 PM, Aleksandar Lazic <melissadiaz@example.net> wrote: > Dear List, > > what is 'better' the > > KeepAliveFilter > > or in the handler the sessionIdle() method? > > I have try to use the keepalive filter but I wasn't very successful ;-( > > ### main > KeepAliveFilter filter =3D new KeepAliveFilter(new > CommendKeepAliveMessageFactory()); > =A0 =A0 =A0 =A0filter.setForwardEvent(true); > > // Create TCP/IP connector. > NioSocketConnector connector =3D new NioSocketConnector(); > connector.getFilterChain().addFirst("logging", new LoggingFilter()); > connector.getFilterChain().addLast("keep-alive", filter); > connector.setConnectTimeoutMillis(20); > connector.setHandler(new Commend2SNAPHandler()); > > ConnectFuture future =3D connector.connect( > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 new InetSocketAddress("10.10.= 10.199",17000)); > =A0future.await(); > =A0System.out.println("fu-isConn " + future.isConnected()); > =A0if(future.isConnected()){ > =A0 IoSession sessin =3D future.getSession(); > =A0}else{ > =A0 =A0future.cancel(); > =A0 =A0connector.dispose(); > =A0 =A0System.exit(0); > =A0} > ### > > attached the CommendKeepAliveMessageFactory file. > > Many thanks for help. > > BR > > Aleks --=20 thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal From melissadiaz@example.net Mon Nov 02 13:06:13 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 11642 invoked from network); 2 Nov 2009 13:06:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 13:06:13 -0000 Received: (qmail 37649 invoked by uid 500); 2 Nov 2009 13:06:13 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 37606 invoked by uid 500); 2 Nov 2009 13:06:12 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 37596 invoked by uid 99); 2 Nov 2009 13:06:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 13:06:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f217.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 13:06:04 +0000 Received: by bwz9 with SMTP id 9so20117912bwz.32 for <melissadiaz@example.net>; Mon, 02 Nov 2009 05:05:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=A7PIWraG+JvP++xM5T6SxnRJT7ktGwcO+tEz/Tv2iuA=; b=x03Ehwourg3sfe+1Eo+KQ9tD8UN19q6XWZvBPs+tUenZKnCbxy/KPbXe8UBPiHhogA ST+Dt5JgDjSfN144GD0Jqs2Y2th0DZGAHKzG2Qs//hW7QcoOsBL/nnEHg3g2MuYDvHLu +iSXaFqR6xQB2M8LZiSUEknE2ZcNdq9fCIkfM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=q8eb/59x0zT17F7N/kxT7f9+w4ixTQ9rPvHUb2TIFYA6KQPARhQR8ajXa8LX78jxyS adVcbHTr7OpPSDZ6yFGek0tWUuU3GJyTshuvJxFIxtZa7zo6gddTL3STtM5ioyyUvbBb MVj5DiAhDwbrcY+u1WMXh+oWBrcgF4OiLSq4c= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id r24mr3900887bkw.132.1257167144454; Mon, 02 Nov 2009 05:05:44 -0800 (PST) Date: Mon, 2 Nov 2009 15:05:44 +0200 Message-ID: <melissadiaz@example.net> Subject: True single thread model From: Mirko Adari <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: multipart/alternative; boundary=0015175cf8ce1189280477630959 X-Virus-Checked: Checked by ClamAV on apache.org --0015175cf8ce1189280477630959 Content-Type: text/plain; charset=ISO-8859-1 Hi! I`m trying to use apache mine for mud (text based game on telnet protocol). What I want to achieve is: a. one acceptor thread b. multiple ioprocessor threads c. one handler thread, created at start, permanent, doesnt change (this is the game and its state). Currently I`m trying this: acceptor.getFilterChain().addLast("executor", new ExecutorFilter(1)); But the handler thread is created at need basis and changed over time ( Thread.getName() is different). I`m using apache mina 2.0.0.RC, how to achieve thread model I`m looking for? Thanks --0015175cf8ce1189280477630959-- From melissadiaz@example.net Mon Nov 02 18:57:04 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 43808 invoked from network); 2 Nov 2009 18:57:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Nov 2009 18:57:04 -0000 Received: (qmail 98685 invoked by uid 500); 2 Nov 2009 18:57:04 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 98628 invoked by uid 500); 2 Nov 2009 18:57:03 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 98616 invoked by uid 99); 2 Nov 2009 18:57:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 18:57:03 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO ursaminor.bitrace.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 18:57:00 +0000 Received: from localhost (localhost [83.161.120.155]) (uid 1001) by ursaminor.bitrace.net with local; Mon, 02 Nov 2009 19:56:38 +0100 id 00EBC00B.4AEF2B66.00006451 Date: Mon, 2 Nov 2009 19:56:38 +0100 From: Aleksandar Lazic <melissadiaz@example.net> To: melissadiaz@example.net Subject: Re: KeepAliveFilter questions Message-ID: <melissadiaz@example.net> References: <melissadiaz@example.net> <melissadiaz@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <melissadiaz@example.net> User-Agent: Mutt/1.5.16 (2007-06-09) On Mon 02.11.2009 18:33, Ashish wrote: >Can you elaborate a bit on the problem/issue you are facing? I was falling in the trap of session.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 10); and KeepAliveFilter After I have remove the setIdleTime in the handler the filter works. Sorry for the rush. BR Aleks From melissadiaz@example.net Tue Nov 03 20:38:01 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 12681 invoked from network); 3 Nov 2009 20:38:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 20:38:01 -0000 Received: (qmail 98556 invoked by uid 500); 3 Nov 2009 20:38:01 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 98502 invoked by uid 500); 3 Nov 2009 20:38:00 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 98492 invoked by uid 99); 3 Nov 2009 20:38:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:38:00 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-ew0-f221.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:37:51 +0000 Received: by ewy21 with SMTP id 21so6202945ewy.8 for <melissadiaz@example.net>; Tue, 03 Nov 2009 12:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=IKc0Wxib8FBU451nPzTrJkWzdEAPrDwgw+F4cXYnqFI=; b=PYn4D130qmKirgbINjeEjNeiFoa7rablq18XcetdV86z6UUV1enwCBYAXcrgCbzE47 GdGuA5HvQYNzLQfu7gUdtSH+JhL5/DWF5iDJZtDVuYDFyZEDLBRRkgJ720vAnHiCyGYn Lg/SmCOMWnWH2iQsMoCoCd5Y/2yPcp5f6S0Yc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GkeoP7cC+2FI6gEHZ/99XLkkxe8/+1ocQQeMNTVWH6SpFf2ZQU5Y6cO5iby+9UoAAy jXxgwDOMmoDFWTvpFlvqNwdLrf9X2AaCkSsBPgKXa703rxyL8lMVhAu4uRHqRGnvREe0 cR6ZP8qMaTd69Csbukzi3evCbuhDsrPbC/UWQ= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id k18mr168238wef.218.1257280651564; Tue, 03 Nov 2009 12:37:31 -0800 (PST) Date: Tue, 3 Nov 2009 15:37:31 -0500 Message-ID: <melissadiaz@example.net> Subject: TCP protocol acknowledgement delay(looks like piggybacking with the message response) From: Erinc Arikan <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: multipart/alternative; boundary=0016e6d976209e993304777d76dc X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d976209e993304777d76dc Content-Type: text/plain; charset=ISO-8859-1 Hi everybody; I implemented a byte based TCP protocol, To accomplish that I implemented my own protocolcodecfilter to decode byte stream into POJO's. My Protocol requires me to send an ACK/NAK whenever I receive a complete, meaningful message. I thought that I could write ACK directly to session in my decoder right after I am done with decoding but I couldn't make it work. So instead of doing that, I pass my POJO's to my custom message handler where all my business logic lies. And before processing POJO, first thing I do is writing the ACK back to session using session.write method. And I start processing the message after that. But it looks like my ACKs never get to the client right away, most of the time they wait for the response of actual message , and will be delivered to client together(they only have 200 ms difference). This is a huge problem for me because there's no point in having the ACK when you experience this issue. By the time they have the ACK, they will get the response anyway. I am wondering if there's a way to guarantee transmission of the ACK in a non blocking manner, without waiting for the actual message response. Mostly I am processing credit card authorizations which is a synchronous process and can take up to 4-5 seconds. I add them to ACTIVEMQ, payment processor picks them up. Definitely I want to be able to send the ack right away without waiting for 5 seconds. Any thoughts on how to do that? --0016e6d976209e993304777d76dc-- From melissadiaz@example.net Tue Nov 03 20:47:13 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 15685 invoked from network); 3 Nov 2009 20:47:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 20:47:13 -0000 Received: (qmail 12830 invoked by uid 500); 3 Nov 2009 20:47:12 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 12779 invoked by uid 500); 3 Nov 2009 20:47:12 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 12769 invoked by uid 99); 3 Nov 2009 20:47:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:47:12 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO fg-out-1718.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:47:09 +0000 Received: by fg-out-1718.google.com with SMTP id 16so1196210fgg.14 for <melissadiaz@example.net>; Tue, 03 Nov 2009 12:46:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Pp4urAeG0P4lo4RlOb2L0BY5Cvw4RT6JCtD1QfpBMAU=; b=iWeU6adkIbdF1VZwNHLw5l/1ZqMiqGxDgHVWnofKpT+iD2jOAjn0O58TXv6yYo9DcV ioVA1H2P/CfbKp55K99vm0R2SMAcbr6kHGs9unDAU6S+J3NcKcIp3cVqjDilTjNEs3Ow fTJNcea/hc33T0LE9w31S1Td6io9lLHMbA83M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kttZhCrQuvycea0saa+u3OVnFAMrsBDiJHe/WkcorGbP6oPAzJHUeOEDUnh/pqU4qh EL5AroWPQFIgzFPm8OjHMGKpPfO7lDnwYcHwYn3e1cwgP+y/ZyBL2BYJ6plOpwC7iT7l 5E7RfLuwyFcplWnvdRSTxZYjHEb82r0EXPaTI= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id l20mr77945fah.75.1257281208437; Tue, 03 Nov 2009 12:46:48 -0800 (PST) In-Reply-To: <melissadiaz@example.net> References: <melissadiaz@example.net> Date: Tue, 3 Nov 2009 21:46:48 +0100 Message-ID: <melissadiaz@example.net> Subject: Re: TCP protocol acknowledgement delay(looks like piggybacking with the message response) From: Alex Shneyderman <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable config.getSessionConfig().setTcpNoDelay(true); this is what I have for the connector but I am sure acceptor will have the same sort of setting. On Tue, Nov 3, 2009 at 9:37 PM, Erinc Arikan <melissadiaz@example.net> wrote: > Hi everybody; > > I implemented a byte based TCP protocol, To accomplish that I implemented= my > own protocolcodecfilter to decode byte stream into POJO's. My Protocol > requires me to send an ACK/NAK whenever I receive a complete, meaningful > message. I thought that I could write ACK directly to session in my decod= er > right after I am done with decoding but I couldn't make it work. > > So instead of doing that, I pass my POJO's to my custom message handler > where all my business logic lies. And before processing POJO, first thing= I > do is writing the ACK back to session using session.write method. And I > start processing the message after that. But it looks like my ACKs never = get > to the client right away, most of the time they wait for the response of > actual message , and will be delivered to client together(they only have = 200 > ms difference). > > This is a huge problem for me because there's no point in having the ACK > when you experience this issue. By the time they have the ACK, they will = get > the response anyway. > > I am wondering if there's a way to guarantee transmission of the ACK in a > non blocking manner, without waiting for the actual message response. Mos= tly > I am processing credit card authorizations which is a synchronous process > and can take up to 4-5 seconds. I add them to ACTIVEMQ, payment processor > picks them up. =A0Definitely I want to be able to send the ack right away > without waiting for 5 seconds. > > Any thoughts on how to do that? > From melissadiaz@example.net Tue Nov 03 20:55:30 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 18462 invoked from network); 3 Nov 2009 20:55:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 20:55:30 -0000 Received: (qmail 28223 invoked by uid 500); 3 Nov 2009 20:55:30 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 28191 invoked by uid 500); 3 Nov 2009 20:55:29 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 28181 invoked by uid 99); 3 Nov 2009 20:55:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:55:29 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO lo.gmane.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:55:27 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N5QP9-00016U-PZ for melissadiaz@example.net; Tue, 03 Nov 2009 21:55:03 +0100 Received: from rain.gmane.org ([83.161.120.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <melissadiaz@example.net>; Tue, 03 Nov 2009 21:55:03 +0100 Received: from fredrik by rain.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <melissadiaz@example.net>; Tue, 03 Nov 2009 21:55:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: melissadiaz@example.net From: Fredrik Jonson <melissadiaz@example.net> Subject: Re: TCP protocol acknowledgement delay(looks like piggybacking with the message response) Date: Tue, 3 Nov 2009 20:48:54 +0000 (UTC) Lines: 14 Message-ID: <melissadiaz@example.net> References: <melissadiaz@example.net> X-Complaints-To: melissadiaz@example.net X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: slrn/pre1.0.0-11 (Linux) Sender: news <melissadiaz@example.net> Erinc Arikan wrote: > I implemented a byte based TCP protocol, To accomplish that I implemented my > own protocolcodecfilter to decode byte stream into POJO's. But it looks like > my ACKs never get to the client right away, most of the time they wait for > the response of actual message, and will be delivered to client together. Sounds like you're protocol could have an issue with the tcp nagle algorithm? Try SocketSessionConfig.setTcpNoDelay(true) on the connector. http://mina.apache.org/faq.html -- Fredrik Jonson From melissadiaz@example.net Tue Nov 03 21:16:09 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 23974 invoked from network); 3 Nov 2009 21:16:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 21:16:09 -0000 Received: (qmail 52078 invoked by uid 500); 3 Nov 2009 21:16:09 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 52048 invoked by uid 500); 3 Nov 2009 21:16:08 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 52038 invoked by uid 99); 3 Nov 2009 21:16:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 21:16:08 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-ew0-f221.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 21:16:05 +0000 Received: by ewy21 with SMTP id 21so6243082ewy.8 for <melissadiaz@example.net>; Tue, 03 Nov 2009 13:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Mz85XqhooZL84ulK0el2p78MwRsU4z46rORgJkJvstc=; b=tlrdj+Ic0z53iPuQnEkSCIOiI8n4hBqlLCrUwA3WwhKAPjz7y0h2F91f8JI3C6u7w+ chENsBBLh9qbgjle+pG+MsgRpvRJZhxbUBdJCLWlfxBiqsFXkitSJHk6hMGdnSoop2dY MTJCNOpb3+9+EFd4wlUBjfyAa7KLAgmemFuKU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uLXkh/iZqgEjfunyny5NQtxXjGy4tWhdwWtaMJuP8WgML0Mve+xfu2sVH7jFSLBbTO DRvK9ozVBWP34NqBB1YNQItfkIqGE8IPZw8UUiHopIlj2itjAg1iLJHjMVZHrDPmrQP1 NJADjWDxISE/bnuikU+o0HJ5+1hsDTcA59r4E= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id k49mr184648wef.172.1257282944390; Tue, 03 Nov 2009 13:15:44 -0800 (PST) In-Reply-To: <melissadiaz@example.net> References: <melissadiaz@example.net> <melissadiaz@example.net> Date: Tue, 3 Nov 2009 16:15:44 -0500 Message-ID: <melissadiaz@example.net> Subject: Re: TCP protocol acknowledgement delay(looks like piggybacking with the message response) From: Erinc Arikan <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: multipart/alternative; boundary=0016e6d7e93a48567804777dff64 --0016e6d7e93a48567804777dff64 Content-Type: text/plain; charset=ISO-8859-1 When I set tcpNodelay to true of socketSessionConfig of the server's acceptor. I see the exact same timestamp for ACK and Response message in client logs. But when I set it to false I see 150-200 ms between ACK and message response although message processing on average takes around 800 ms On Tue, Nov 3, 2009 at 3:48 PM, Fredrik Jonson <melissadiaz@example.net> wrote: > Erinc Arikan wrote: > > > I implemented a byte based TCP protocol, To accomplish that I > implemented my > > own protocolcodecfilter to decode byte stream into POJO's. But it looks > like > > my ACKs never get to the client right away, most of the time they wait > for > > the response of actual message, and will be delivered to client > together. > > Sounds like you're protocol could have an issue with the tcp nagle > algorithm? > Try SocketSessionConfig.setTcpNoDelay(true) on the connector. > > http://mina.apache.org/faq.html > > -- > Fredrik Jonson > > --0016e6d7e93a48567804777dff64-- From melissadiaz@example.net Tue Nov 03 21:30:12 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 26969 invoked from network); 3 Nov 2009 21:30:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 21:30:12 -0000 Received: (qmail 63635 invoked by uid 500); 3 Nov 2009 21:30:11 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 63591 invoked by uid 500); 3 Nov 2009 21:30:11 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 63581 invoked by uid 99); 3 Nov 2009 21:30:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 21:30:11 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-pz0-f198.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 21:30:09 +0000 Received: by pzk36 with SMTP id 36so4431297pzk.5 for <melissadiaz@example.net>; Tue, 03 Nov 2009 13:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Gyi4cf1OgyIW71EIoXSbpuX+A0GztjFG0E7aOu1sprs=; b=beRCbUzyQIt//0Sy4zWxBOB18Lu4TE6w5+vDViz5oin/CnHeL5qa6Go8NTtpeEz/rD 6ro1oEdPcsS/Wb+hEgaNa3lxiW2HXvKkNoHZ7BScFIkb0vlYCUlliUXI9SR5KhdrSABF waJvlLT3NcjFVvU+D9nLwX9l+zMfP68LztInA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=H1eYXuDeCwuYLA7IyghavwQxfa2jRv/Jo/s1teZd1Y1o5XQDwc6GoaDdDJ+K+sP6kI k2zTPQQ8vaRXLJ4IY6Ci4gpr7kODP2bGWtHPMB4peGFCS2WBgGN4WQ90AYGaGjNboNgV KSeUw1Xe0i1I/UXOFTwj++sYvTdoMh+QuAkdU= Received: by 83.161.120.155 with SMTP id k7mr626396waf.106.1257283788857; Tue, 03 Nov 2009 13:29:48 -0800 (PST) Received: from ?83.161.120.155? (216-75-233-114.static.wiline.com [83.161.120.155]) by mx.google.com with ESMTPS id 21sm244627pxi.8.283.161.120.155.29.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Nov 2009 13:29:47 -0800 (PST) Sender: Emmanuel Lecharny <melissadiaz@example.net> Message-ID: <melissadiaz@example.net> Date: Tue, 03 Nov 2009 13:29:45 -0800 From: Emmanuel Lecharny <melissadiaz@example.net> User-Agent: Thunderbird 83.161.120.155 (X11/20090817) MIME-Version: 1.0 To: melissadiaz@example.net Subject: Re: TCP protocol acknowledgement delay(looks like piggybacking with the message response) References: <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> In-Reply-To: <melissadiaz@example.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Erinc Arikan wrote: > When I set tcpNodelay to true of socketSessionConfig of the server's > acceptor. I see the exact same timestamp for ACK and Response message in > client logs. But when I set it to false I see 150-200 ms between ACK and > message response although message processing on average takes around 800 ms > You may have to add an executor at the end of your chain so that your written ACK is sent even if the message is being processed, otherwise everything will be processed sequentially (ie, when the handler will have finished to process your messgae, then the thread will be freed, and the IoPorcessor will be able to send the data, which mean that all the written bytes are tored and sent at the same time at the end of the processing). Here is what I used in Apache DS to fix the exact same problem : IoFilterChainBuilder chain = new DefaultIoFilterChainBuilder(); // Inject the codec into the chain ((DefaultIoFilterChainBuilder)chain).addLast( "codec", new ProtocolCodecFilter( this.getProtocolCodecFactory() ) ); // Now inject an ExecutorFilter for the write operations // We use the same number of thread than the number of IoProcessor ((DefaultIoFilterChainBuilder)chain).addLast( "executor", new ExecutorFilter( new UnorderedThreadPoolExecutor( transport.getNbThreads() ), IoEventType.MESSAGE_RECEIVED ) ); /* * The server is now initialized, we can * install the default requests handlers, which need * access to the DirectoryServer instance. */ installDefaultHandlers(); startNetwork( transport, chain ); ... Just give it a try. PS : *please*, when you post a mail on this ML, just consider providing information about the MINA version you are using. The way MINA 1.0, MINA 1.1 and MINA 2.0 behave is really different. Thanks ! -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org From melissadiaz@example.net Tue Nov 03 22:09:41 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 39392 invoked from network); 3 Nov 2009 22:09:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 22:09:41 -0000 Received: (qmail 6404 invoked by uid 500); 3 Nov 2009 22:09:41 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 6344 invoked by uid 500); 3 Nov 2009 22:09:40 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 6334 invoked by uid 99); 3 Nov 2009 22:09:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 22:09:40 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-ew0-f221.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 22:09:36 +0000 Received: by ewy21 with SMTP id 21so6298794ewy.8 for <melissadiaz@example.net>; Tue, 03 Nov 2009 14:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=rQNGhijJQoL5u27Lpt7foN+swzhi92emFPTjdMzdW/k=; b=siO3oTc2WB4/UfoN44e3DmveNwgj9Kt8UF/0nUrCGM00hVLOR7veZC+q78dJA5drj7 WmJIdur35RqyVBHlqsqY3WNsPQhW9MRCSBEizHKf5/jWt42ZNo99LykMgSNkk8S5HY1u F3H+FaYooUoAtNSxEzWVmfKA4IBXmWzDjiQpw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vmfn2u1nKx2jNwtcsC+DCFpeCiLjBgBjX12Bp8eGURmjlLIShqOkMzwH7MGRv6UDhI 9rrbIABN11RSrJkVDDmZX/cHOe9zBRX96okSAP1/ZkvvF7S5BSb+DgpVDCGBxamZf0rI 9Q2dOKfQ24xHPDk0ZNwd7cZtYJNq4nZWjziGg= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id e53mr266984wef.28.1257286154696; Tue, 03 Nov 2009 14:09:14 -0800 (PST) In-Reply-To: <melissadiaz@example.net> References: <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> Date: Tue, 3 Nov 2009 17:09:14 -0500 Message-ID: <melissadiaz@example.net> Subject: Re: TCP protocol acknowledgement delay(looks like piggybacking with the message response) From: Erinc Arikan <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: multipart/alternative; boundary=0016e6d7e32da1c5e304777ebe0e --0016e6d7e32da1c5e304777ebe0e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks so much Emmanuel; I totally forgot to mention that I am using MINA 2.0 RC1. I gave it a try and It worked great, I see 2-3 seconds between ack and response now. One thing that I wonder is optimum number of threads for an executor. For now I set it to 10, But I don't think that I would need more than 2-3 threads at a time for a connection. Do you think that it would affect the performance drastically when I have 10000 devices connected to my gateway. Thanks Erinc On Tue, Nov 3, 2009 at 4:29 PM, Emmanuel Lecharny <melissadiaz@example.net>wro= te: > Erinc Arikan wrote: > >> When I set tcpNodelay to true of socketSessionConfig of the server's >> acceptor. I see the exact same timestamp for ACK and Response message in >> client logs. But when I set it to false I see 150-200 ms between ACK and >> message response although message processing on average takes around 800 >> ms >> >> > > You may have to add an executor at the end of your chain so that your > written ACK is sent even if the message is being processed, otherwise > everything will be processed sequentially (ie, when the handler will have > finished to process your messgae, then the thread will be freed, and the > IoPorcessor will be able to send the data, which mean that all the writte= n > bytes are tored and sent at the same time at the end of the processing). > > Here is what I used in Apache DS to fix the exact same problem : > > IoFilterChainBuilder chain =3D new DefaultIoFilterChainBuilder(= ); > // Inject the codec into the chain > ((DefaultIoFilterChainBuilder)chain).addLast( "codec", > new ProtocolCodecFilter( this.getProtocolCodecFactory()= ) > ); > // Now inject an ExecutorFilter for the write > operations > // We use the same number of thread than the number of > IoProcessor > ((DefaultIoFilterChainBuilder)chain).addLast( "executor", > new ExecutorFilter( > new UnorderedThreadPoolExecutor( > transport.getNbThreads() ), > IoEventType.MESSAGE_RECEIVED ) ); > > /* > * The server is now initialized, we can > * install the default requests handlers, which need > * access to the DirectoryServer instance. > */ > installDefaultHandlers(); > startNetwork( transport, chain ); > ... > > > Just give it a try. > > PS : *please*, when you post a mail on this ML, just consider providing > information about the MINA version you are using. The way MINA 1.0, MINA = 1.1 > and MINA 2.0 behave is really different. Thanks ! > > -- > -- > cordialement, regards, > Emmanuel L=E9charny > www.iktek.com > directory.apache.org > > > --0016e6d7e32da1c5e304777ebe0e-- From melissadiaz@example.net Wed Nov 04 00:24:46 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 1970 invoked from network); 4 Nov 2009 00:24:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 00:24:46 -0000 Received: (qmail 65938 invoked by uid 500); 4 Nov 2009 00:24:46 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 65882 invoked by uid 500); 4 Nov 2009 00:24:45 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 65865 invoked by uid 99); 4 Nov 2009 00:24:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 00:24:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-px0-f204.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 00:24:34 +0000 Received: by pxi42 with SMTP id 42so4585368pxi.5 for <melissadiaz@example.net>; Tue, 03 Nov 2009 16:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=OxoyL1HwK3CMoe5O3c0QWYviUqi2AF5thWin5sADzE0=; b=RZID0EnVGya3AcsT2KAM2XEJ/tYTmmm5VQF99pAruaB6OfovnkLoGLuOus3bEtSmxL 6e/Z3AeCEf4iKdJjkUyoIssx1iV/8ISG65/HbX3J8E4NXXgAsohXLX+32MuHUUpLd+Nu 7cljuXCp6vT05GrelKHC5izw+ZUwptnvMXgQ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Swvf79kDqOSOtYwlqeoflDz+A/slH6yAocEJxU5q5qneYY5pr9vS3QDunyIcPhoPni qeMSfkEOY9iilTzuq1kwQrEU+DdYEpuyF1XhV+tfZV154L6bRQFW9pwy8CMetATk+rsE /8Jl3NegZB1Dq4BZ/yKVQPfyWIzOUWLNeSABU= Received: by 83.161.120.155 with SMTP id j37mr930872waf.36.1257294253397; Tue, 03 Nov 2009 16:24:13 -0800 (PST) Received: from ?83.161.120.155? (216-75-233-114.static.wiline.com [83.161.120.155]) by mx.google.com with ESMTPS id 21sm280138pzk.3.283.161.120.155.24.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Nov 2009 16:24:12 -0800 (PST) Sender: Emmanuel Lecharny <melissadiaz@example.net> Message-ID: <melissadiaz@example.net> Date: Tue, 03 Nov 2009 16:24:07 -0800 From: Emmanuel Lecharny <melissadiaz@example.net> User-Agent: Thunderbird 83.161.120.155 (X11/20090817) MIME-Version: 1.0 To: melissadiaz@example.net Subject: Re: TCP protocol acknowledgement delay(looks like piggybacking with the message response) References: <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> In-Reply-To: <melissadiaz@example.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Erinc Arikan wrote: > Thanks so much Emmanuel; > > I totally forgot to mention that I am using MINA 2.0 RC1. > > I gave it a try and It worked great, I see 2-3 seconds between ack and > response now. > Great ! > One thing that I wonder is optimum number of threads for an executor. > > For now I set it to 10, But I don't think that I would need more than 2-3 > threads at a time for a connection. Do you think that it would affect the > performance drastically when I have 10000 devices connected to my gateway. > I think it does not matter too much, as soon as if your processing is fast, then the threads will be made available fast enough for other tasks. Now, if it takes, say, 100 ms to process a request, and if you have 100 simultaneous tasks running, then you definitively need 10 threads available in the pool (probably a few more in order to avoid bottlenecks). So if you have 10000 devices doing one request every 5 seconds, and if it costs 100 ms to process a request, the the math is simple : you will have an average of 200 requests being processed simultaneously, so you'll need 200 threads. But a 100 ms processing time is HUGE. Note : when I say *simultaneous*, it means requests being processed *at the same time*. (people are often confusing requests per second and number of requests that can be processed simultaneous at a specific moment). -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org From melissadiaz@example.net Wed Nov 04 07:52:49 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 46050 invoked from network); 4 Nov 2009 07:52:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 07:52:49 -0000 Received: (qmail 92599 invoked by uid 500); 4 Nov 2009 07:52:48 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 92548 invoked by uid 500); 4 Nov 2009 07:52:47 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 92538 invoked by uid 99); 4 Nov 2009 07:52:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 07:52:47 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=AWL,BAYES_50,HTML_MESSAGE,MIME_BASE64_TEXT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO m15-69.126.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 04 Nov 2009 07:52:45 +0000 Received: from zswallow ( [83.161.120.155] ) by ajax-webmail-wmsvr69 (Coremail) ; Wed, 4 Nov 2009 15:52:17 +0800 (CST) Date: Wed, 4 Nov 2009 15:52:17 +0800 (CST) From: zswallow <melissadiaz@example.net> To: users <melissadiaz@example.net> Message-ID: <melissadiaz@example.net> Subject: if it is a bug? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_250079_11669083.1257321137377" X-Originating-IP: [83.161.120.155] X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 090923(9022.2651.2651) Copyright (c) 2002-2009 www.mailtech.cn 126com X-CM-CTRLDATA: VcBci2Zvb3Rlcl9odG09MTQ2NzoyMjM= X-CM-TRANSID: RcqowLBrSRWyMvFKwDIKAw--.11005W X-CM-SenderInfo: p2vztzxorzqiyswou0bp/1tbiThIRLEN9zMKAmAAAsJ X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJTRUUUb7AYjxAI6xAIw2 8IcVW8XFylb7IF0VCF04k20xvEw2I207IF0wAYjxAI6xCIbckI1I0E57IF64kEYxAxMc80 4VCqF7xvr2I5M4IEnf9ElVAFpTB2q-sK649IAas0WaI_GwCS07vEb7Iv0xC_Jr1lV2xY67 kC6x804xWlV2xY67AvxsIE4c80w2Aqjc4lV2xY67CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DMIAIbVAFxVCF77xC64kEw24lV2xY67C26IkvcIIF6IxKo4kEV4ylV2xY628EF7 xvwVC0I7IYx2IY67AKxVWDJVCq3wCS07vE84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_GcCE 3s1lV2xY628EF7xvwVC2z280aVAFwI0_GcCE3s1lV2xY628EF7xvwVC2z280aVCY1x0267 AKxVW0oVCq3wCS07vE5I8CrVACY4xI64kE6c02F40Ex7xfMIAIbVAv7VC0I7IYx2IY67AK xVWUGVWUXwCS07vEYx0Ex4A2jsIE14v26r4j6F4UMIAIbVCjxxvEa2IrMIAIbVCY02Avz4 vE14v_GF4lV2xY6xkI7II2jI8vz4v_Cr0_Zr1lV2xY6xCjnVCjjxCrMIAIbVC2zVAF1VAY 17CE14v26r1j6r15MIAIbVCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCS07vEIxAIcV C2z280aVAFwI0_Jr0_Gr1lV2xY6IIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2 KfnxnUU== ------=_Part_250079_11669083.1257321137377 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: base64 SSB1c2UgbWluYSB0byByZWN2IG1lZGlhIGRhdGEoVENQL0lQKSBhbmQgaW1tZWRpYXRlbHkgc2Vu ZCBpdCBvdXQuIApJIHNldCAyIE5pb1Byb2Nlc3Nvciwgb25lIGlzIGZvciByZWN2aW5nIGRhdGEs IHRoZSBvdGhlciBpcyBmb3Igc2VuZGluZyB0aGUgcmVjdmVkIGRhdGEuCk15IHJlY3YgTmlvUHJv Y2Vzc29yIHdvcmtzIHdlbGwuIHRoZSAic2VsZWN0IiBmdW5jdGlvbiB3aWxsIGJlIHdha2V1cCBt b3JlIHRoYW4gMjUgdGltZXMgcGVyIHNlY29uZC4gQnV0IHRoZXJlIGlzIHN0aCB3cm9uZyB3aXRo IG15IHNlbmQgTmlvUHJvY2Vzc29yLiBTb21ldGltZXMgaXQgd2lsbCBrZWVwIHNsZWVwIGZvciAx IHNlY29uZCwgYWx0aG91Z2ggdGhlcmUgaXMgbG90cyBvZiBkYXRhIHdhaXRpbmcgdG8gYmUgc2Vu dCBvdXQuCiAKSSBmb3VuZCB0aGUgcmVhc29uIGlzIHRoYXQsIHRoZXJlIGlzIHNvbWV0aGluZyB3 cm9uZyBpbiB0aHJlYWQgc3luY2hyb25pemF0aW9uLgogCkkgdXNlZCBtaW5hLTIuMC4wLVJDMS4K SSBjaGFuZ2VkIHRoZSBjb2RlLCBhbmQgZXZlcnl0aGluZyB3b3JrcyB3ZWxsLgoxICAgSW4gQWJz dHJhY3RvclBvbGxpbmdJb1Byb2Nlc3Nvci5qYXZhIDogcHJpdmF0ZSB2b2lkIGZsdXNoKGxvbmcg Y3VycmVudFRpbWUpIGZ1bmN0aW9uCiAgICBJIHJlbW92ZSAiaWYoZmx1c2hlZEFsbCAmJiAuLi4u KQogICAgICAgICAgICAgICAgICAgc2NoZWR1bGVGbHVzaChzZXNzaW9uKTsKICAgICAgICAgICAg ICIKMiAgIEluIEFic3RyYWN0b3JQb2xsaW5nSW9Qcm9jZXNzb3IuamF2YTogcHVibGljIGZpbmFs IHZvaWQgZmx1c2goVCBzZXNzaW9uKSBmdW5jdGlvbgogICAgSSBjaGFuZ2VkICJpZihzY2hlZHVs ZUZsdXNoKHNlc3Npb24pICYmIG5lZWRzV2FrZXVwKSIKICAgICAgICAgICB0byAiaWYobmVlZHNX YWtldXAgJiYgc2NoZWR1bGVGbHVzaChzZXNzaW9uKSkiCiAKaWYgaXQgaXMgYSBidWc/Cgo= ------=_Part_250079_11669083.1257321137377-- From melissadiaz@example.net Wed Nov 04 10:18:51 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 80001 invoked from network); 4 Nov 2009 10:18:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 10:18:51 -0000 Received: (qmail 61394 invoked by uid 500); 4 Nov 2009 10:18:51 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 61317 invoked by uid 500); 4 Nov 2009 10:18:50 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 61307 invoked by uid 99); 4 Nov 2009 10:18:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 10:18:50 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f217.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 10:18:39 +0000 Received: by bwz9 with SMTP id 9so26887182bwz.32 for <melissadiaz@example.net>; Wed, 04 Nov 2009 02:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=EHfXY9dxC0OZUVgMXhlYgcEXQGCBvzCqlax3iT8Xm0E=; b=eb78A/bqcSCY2TRmko2vZk89XZQh6XG18cjnxpdWjSNjfEKRTdaPIuJV12ME3gkbsr jztMrRVVN0KfMVIH8tJUzERq/+sCL1v3THSbGSG3phSDos5n29r3AjsfOdwO6Xfdefwp V+S5bau0RbHakjZ9dNCuoXg+ADG/VH0/SaaaE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=X+yMSaUCpGlQqACRjl8tAwZ1A93I0dSBOKPRCugxctK3kSrlCUXuxgyvgiqWya0QlY T3tONiYEW1LlVHzh/C4nzP8k70WKR6iV8EX7Tky8azuzBNlXkW2hNcztxebcnFd0ZQNP bL+gbcJrxHOtOC4uoNVXdEuEv5cKwakw05R10= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id z20mr1217467bkb.140.1257329899464; Wed, 04 Nov 2009 02:18:19 -0800 (PST) Date: Wed, 4 Nov 2009 10:18:19 +0000 Message-ID: <melissadiaz@example.net> Subject: Problems using TextLineCodecFactory From: Mark Wallsgrove <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I am having some problems with the TextLineCodecFactory & Mina 2.0.0. For some reason when I try to receive some data as a client I get this: DEBUG [com.test.XMPPHandler] - Session Created DEBUG [com.test.XMPPHandler] - Message Sent: <stream:stream xmlns="jabber:client" to="jabber.org" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" version="1.0"> DEBUG [org.apache.mina.filter.codec.ProtocolCodecFilter] - Processing a MESSAGE_RECEIVED for session 1 DEBUG [com.test.XMPPHandler] - Session Idle The ProtocolCodecFilter claims that it is processing the data, but my handler never receives it. I managed to monitor the incoming data using Wireshark, and it looks as expected. I only have one codec which is added in the handler under the sessionOpened method like: session.getFilterChain().addLast("codec", new ProtocolCodecFilter(new TextLineCodecFactory(Charset.forName("UTF-8")))); What would be the reason for this? -- Best Regards, Mark Wallsgrove From melissadiaz@example.net Wed Nov 04 15:37:42 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 72065 invoked from network); 4 Nov 2009 15:37:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 15:37:42 -0000 Received: (qmail 39676 invoked by uid 500); 4 Nov 2009 15:37:42 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 39520 invoked by uid 500); 4 Nov 2009 15:37:41 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 39235 invoked by uid 99); 4 Nov 2009 15:37:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 15:37:41 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-pz0-f198.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 15:37:30 +0000 Received: by pzk36 with SMTP id 36so4961632pzk.5 for <melissadiaz@example.net>; Wed, 04 Nov 2009 07:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=M+cggyJcl7ghPdwp1ArA+n74XUYUyp8hd1AjE8v62hQ=; b=FxhioTK6qJmlzsdSjMxy2Hx91FVjjeiCfpEb//2/0R2cnnQzAo+r+QEDSDpbtobKZr GNlLGwsrujFHhAWVm8Yq5LaCOZ8hV+kpkZ0agouVJZSSEZbpZGWXemXLJyQ90ps6K15u ZJPfEu7TWsMtIy8ARrAdGjgCMsejWCXslKXfo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Yo1DTkH59ZrE5wIW3GiXPK1PqNYt4IXv6os/pHNsbrVZ+2b/yen9loOhO2xEBnODNL yuPX9sE5E0WvD1pzGSZNJyPJIzZWHCH7+Qsd5VljANveseKw2gKE93io6MS10i+LKQ84 72vOInK+nbopQTxYc4RqyiYHAcf84yx1Tt9Mg= Received: by 83.161.120.155 with SMTP id r11mr2254835waj.152.1257349029287; Wed, 04 Nov 2009 07:37:09 -0800 (PST) Received: from ?83.161.120.155? (216-75-233-114.static.wiline.com [83.161.120.155]) by mx.google.com with ESMTPS id 23sm656934pxi.1.283.161.120.155.37.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Nov 2009 07:37:06 -0800 (PST) Sender: Emmanuel Lecharny <melissadiaz@example.net> Message-ID: <melissadiaz@example.net> Date: Wed, 04 Nov 2009 07:37:04 -0800 From: Emmanuel Lecharny <melissadiaz@example.net> User-Agent: Thunderbird 83.161.120.155 (X11/20090817) MIME-Version: 1.0 To: melissadiaz@example.net Subject: Re: Problems using TextLineCodecFactory References: <melissadiaz@example.net> In-Reply-To: <melissadiaz@example.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Mark Wallsgrove wrote: > Hi all, > Hi, Is there a new line sent at the very end off your incoming message, so that the textLineDecoder can know that the message has been fully received ? > I am having some problems with the TextLineCodecFactory & Mina 2.0.0. > For some reason when I try to receive some data as a client I get > this: > > DEBUG [com.test.XMPPHandler] - Session Created > DEBUG [com.test.XMPPHandler] - Message Sent: <stream:stream > xmlns="jabber:client" to="jabber.org" > xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" > version="1.0"> > DEBUG [org.apache.mina.filter.codec.ProtocolCodecFilter] - Processing > a MESSAGE_RECEIVED for session 1 > DEBUG [com.test.XMPPHandler] - Session Idle > > The ProtocolCodecFilter claims that it is processing the data, but my > handler never receives it. I managed to monitor the incoming data > using Wireshark, and it looks as expected. I only have one codec which > is added in the handler under the sessionOpened method like: > > session.getFilterChain().addLast("codec", new ProtocolCodecFilter(new > TextLineCodecFactory(Charset.forName("UTF-8")))); > > What would be the reason for this? > -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org From melissadiaz@example.net Wed Nov 04 15:43:57 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 74644 invoked from network); 4 Nov 2009 15:43:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 15:43:57 -0000 Received: (qmail 53835 invoked by uid 500); 4 Nov 2009 15:43:57 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 53804 invoked by uid 500); 4 Nov 2009 15:43:57 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 53794 invoked by uid 99); 4 Nov 2009 15:43:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 15:43:57 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f217.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 15:43:54 +0000 Received: by bwz9 with SMTP id 9so27742957bwz.32 for <melissadiaz@example.net>; Wed, 04 Nov 2009 07:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=IRmBixOtmg1+JIo9BuDLxQdAh0NiDQ6J1ArZW3pe/2M=; b=kDEB+l3/okZLLXA29XmlWOf5nE8ry84Rj1YE3IJVoYWSuIusJrGL7tXokC9DmENdWD gfGi0IZ6GCxTqI5vuZE8nzlhsxygbyf+DkKegQhmKjeCZ5tRzQh3eO95VK9OkV5qOqc4 luum+DaPZj219ok+ezIViHC839OoMEVTVX/Og= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=WVhruKCANfDzcBOcqCcy8T7YyFY7+8vaVEZ/kX7xDgYwIqa/CI31iB2WEbj5phlxU6 uB03HB3+p4DCDuF/qZn0vI5f0yNlpLi9W4x68dnc94Xg4MPIhLDbKxr1IMhve0rIOzvW ZHAFEWkSqsLKIvtEtaAx++TdXk8Gf6f7PQok0= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id k19mr1624193bkd.96.1257349412655; Wed, 04 Nov 2009 07:43:32 -0800 (PST) In-Reply-To: <melissadiaz@example.net> References: <melissadiaz@example.net> <melissadiaz@example.net> Date: Wed, 4 Nov 2009 15:43:32 +0000 Message-ID: <melissadiaz@example.net> Subject: Re: Problems using TextLineCodecFactory From: Mark Wallsgrove <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Emmanuel, >From looking at the hex it doesn't look like there is. Is there any way to get around this? Best Regards, Mark Wallsgrove 2009/11/4 Emmanuel Lecharny <melissadiaz@example.net>: > Mark Wallsgrove wrote: >> >> Hi all, >> > > Hi, > > Is there a new line sent at the very end off your incoming message, so th= at > the textLineDecoder can know that the message has been fully received ? >> >> I am having some problems with the TextLineCodecFactory & Mina 2.0.0. >> For some reason when I try to receive some data as a client I get >> this: >> >> DEBUG [com.test.XMPPHandler] - Session Created >> DEBUG [com.test.XMPPHandler] - Message Sent: <stream:stream >> xmlns=3D"jabber:client" to=3D"jabber.org" >> xmlns:stream=3D"http://etherx.jabber.org/streams" xml:lang=3D"en" >> version=3D"1.0"> >> DEBUG [org.apache.mina.filter.codec.ProtocolCodecFilter] - Processing >> a MESSAGE_RECEIVED for session 1 >> DEBUG [com.test.XMPPHandler] - Session Idle >> >> The ProtocolCodecFilter claims that it is processing the data, but my >> handler never receives it. I managed to monitor the incoming data >> using Wireshark, and it looks as expected. I only have one codec which >> is added in the handler under the sessionOpened method like: >> >> session.getFilterChain().addLast("codec", new ProtocolCodecFilter(new >> TextLineCodecFactory(Charset.forName("UTF-8")))); >> >> What would be the reason for this? >> > > > -- > -- > cordialement, regards, > Emmanuel L=C3=A9charny > www.iktek.com > directory.apache.org > > > --=20 Best Regards, Mark Wallsgrove From melissadiaz@example.net Wed Nov 04 17:18:27 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 10381 invoked from network); 4 Nov 2009 17:18:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 17:18:27 -0000 Received: (qmail 89134 invoked by uid 500); 4 Nov 2009 17:18:26 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 89111 invoked by uid 500); 4 Nov 2009 17:18:26 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Delivered-To: moderator for melissadiaz@example.net Received: (qmail 22335 invoked by uid 99); 4 Nov 2009 16:13:42 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) X-Virus-Scanned: melissadiaz@example.net Date: Wed, 4 Nov 2009 10:13:10 -0600 (CST) From: melissadiaz@example.net To: melissadiaz@example.net Message-ID: <{{EMAIL+PHONE}}> In-Reply-To: <melissadiaz@example.net> Subject: Re: Problems using TextLineCodecFactory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [83.161.120.155] X-Mailer: Zimbra 5.0.16_GA_2921.RHEL5_64 (ZimbraWebClient - FF3.0 (Linux)/5.0.16_GA_2921.RHEL5_64) X-Virus-Checked: Checked by ClamAV on apache.org The text line codec does exactly what it's title implies, sends a line. I w= ould recommend using a different codec set. Using a size header as opposed = to some delimiting character will give a more robust solution; sending a me= ssage which is delimited by some arbitrary character will not let you use t= hat character in the message, so your XML won't be able to have any new lin= es in it if you use the textlinecodec. Will ----- Original Message ----- From: "Mark Wallsgrove" <melissadiaz@example.net> To: melissadiaz@example.net Sent: Wednesday, November 4, 2009 9:43:32 AM GMT -06:00 US/Canada Central Subject: Re: Problems using TextLineCodecFactory Hi Emmanuel, >From looking at the hex it doesn't look like there is. Is there any way to get around this? Best Regards, Mark Wallsgrove 2009/11/4 Emmanuel Lecharny <melissadiaz@example.net>: > Mark Wallsgrove wrote: >> >> Hi all, >> > > Hi, > > Is there a new line sent at the very end off your incoming message, so th= at > the textLineDecoder can know that the message has been fully received ? >> >> I am having some problems with the TextLineCodecFactory & Mina 2.0.0. >> For some reason when I try to receive some data as a client I get >> this: >> >> DEBUG [com.test.XMPPHandler] - Session Created >> DEBUG [com.test.XMPPHandler] - Message Sent: <stream:stream >> xmlns=3D"jabber:client" to=3D"jabber.org" >> xmlns:stream=3D"http://etherx.jabber.org/streams" xml:lang=3D"en" >> version=3D"1.0"> >> DEBUG [org.apache.mina.filter.codec.ProtocolCodecFilter] - Processing >> a MESSAGE_RECEIVED for session 1 >> DEBUG [com.test.XMPPHandler] - Session Idle >> >> The ProtocolCodecFilter claims that it is processing the data, but my >> handler never receives it. I managed to monitor the incoming data >> using Wireshark, and it looks as expected. I only have one codec which >> is added in the handler under the sessionOpened method like: >> >> session.getFilterChain().addLast("codec", new ProtocolCodecFilter(new >> TextLineCodecFactory(Charset.forName("UTF-8")))); >> >> What would be the reason for this? >> > > > -- > -- > cordialement, regards, > Emmanuel L=C3=A9charny > www.iktek.com > directory.apache.org > > > --=20 Best Regards, Mark Wallsgrove From melissadiaz@example.net Wed Nov 04 17:32:10 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 15074 invoked from network); 4 Nov 2009 17:32:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 17:32:10 -0000 Received: (qmail 12514 invoked by uid 500); 4 Nov 2009 17:32:09 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 12483 invoked by uid 500); 4 Nov 2009 17:32:09 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 12473 invoked by uid 99); 4 Nov 2009 17:32:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 17:32:09 +0000 X-ASF-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-pz0-f198.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 17:32:07 +0000 Received: by pzk36 with SMTP id 36so5039053pzk.5 for <melissadiaz@example.net>; Wed, 04 Nov 2009 09:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Mfp5ZeON8ZW7ZIwOrJkWqWHEkv1kje3QWRnplIdLi4s=; b=ZTTy98/KymY+jOIu2A/STLTm8VH5KRkZR860Z/8Yn87l3wyWAwAJPzMGxUO4s8whrS 7Ro8pzRLw92uBK75kAX51gaHcn/6QKGkr/WDtiZVp50LEt1UJNqbGMtIiX8jO7exSHNb DryjbefGNWhHzKMy3+bSIoLRWojR2xc6CK+3A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Ic8FtnbV4h3Wv4ZUg76uFtuirwMaMZuaI8yljL5blI/qPbHNq8+KhPtwsS8VOETAu1 w6S/+6k0EI83FmR6w27HTRbuwxoPJrJ/Ngczqtyu3uPMNaXy6Mno0Z4ypVloseUTpr1d pAd+XqW+pIbRLdeYHX6LPbFsJN+tCvBw/PoD4= Received: by 83.161.120.155 with SMTP id 15mr2494843wac.181.1257355907009; Wed, 04 Nov 2009 09:31:47 -0800 (PST) Received: from ?83.161.120.155? (216-75-233-114.static.wiline.com [83.161.120.155]) by mx.google.com with ESMTPS id 20sm133127pxi.3.283.161.120.155.31.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Nov 2009 09:31:44 -0800 (PST) Sender: Emmanuel Lecharny <melissadiaz@example.net> Message-ID: <melissadiaz@example.net> Date: Wed, 04 Nov 2009 09:31:08 -0800 From: Emmanuel Lecharny <melissadiaz@example.net> User-Agent: Thunderbird 83.161.120.155 (X11/20090817) MIME-Version: 1.0 To: melissadiaz@example.net Subject: Re: Problems using TextLineCodecFactory References: <melissadiaz@example.net> <melissadiaz@example.net> <melissadiaz@example.net> In-Reply-To: <melissadiaz@example.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Mark Wallsgrove wrote: > Hi Emmanuel, > > >From looking at the hex it doesn't look like there is. Is there any > way to get around this? > If you don't have new lines in your message, then using a *textline* codec is not going to solve your problem. As you are trying to decode XML document, the only solutuon is to either wrap your own codec (good luck...) or to have a look at the Vysper subproject which is all about XMPP : http://mina.apache.org/vysper/ -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org From melissadiaz@example.net Fri Nov 06 15:44:39 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 48041 invoked from network); 6 Nov 2009 15:44:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Nov 2009 15:44:39 -0000 Received: (qmail 75142 invoked by uid 500); 6 Nov 2009 15:44:39 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 75084 invoked by uid 500); 6 Nov 2009 15:44:38 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 75074 invoked by uid 99); 6 Nov 2009 15:44:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 15:44:38 +0000 X-ASF-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mail-iw0-f188.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 15:44:36 +0000 Received: by iwn26 with SMTP id 26so848843iwn.5 for <melissadiaz@example.net>; Fri, 06 Nov 2009 07:44:15 -0800 (PST) MIME-Version: 1.0 Sender: melissadiaz@example.net Received: by 83.161.120.155 with SMTP id j36mr1507591ibr.21.1257522255122; Fri, 06 Nov 2009 07:44:15 -0800 (PST) In-Reply-To: <melissadiaz@example.net> References: <melissadiaz@example.net> Date: Fri, 6 Nov 2009 10:44:15 -0500 X-Google-Sender-Auth: dd42c22d4c096b75 Message-ID: <melissadiaz@example.net> Subject: Re: Mina Proxy example - AbstractProxyIoHandler From: Les Hazlewood <melissadiaz@example.net> To: melissadiaz@example.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Bump! Any ideas? A Mina dev could probably answer this in about 3 seconds :) Thanks in advance! Regards, Les On Fri, Oct 30, 2009 at 7:34 PM, Les Hazlewood <melissadiaz@example.net> wrot= e: > Hi folks, > > In the AbstractProxyIoHandler here: > > http://mina.apache.org/report/trunk/xref/org/apache/mina/example/proxy/Ab= stractProxyIoHandler.html > > the messageReceived method creates a copy of of the incoming IoBuffer > and sends the copy to the paired Session. =C2=A0Why is this necessary? = =C2=A0Can > you just send the incoming IoBuffer directly to the paired session (no > copy)? > > In my preliminary testing with an HTTP proxy, I've change the code to > *not* use the copy, and all seems fine. I just want to make sure this > is OK before I stick with it :) > > Thanks for the feedback! > > Cheers, > > Les > From melissadiaz@example.net Fri Nov 06 16:13:26 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 60277 invoked from network); 6 Nov 2009 16:13:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Nov 2009 16:13:25 -0000 Received: (qmail 17584 invoked by uid 500); 6 Nov 2009 16:13:25 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 17547 invoked by uid 500); 6 Nov 2009 16:13:25 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 17537 invoked by uid 99); 6 Nov 2009 16:13:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 16:13:25 +0000 X-ASF-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of melissadiaz@example.net designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-pz0-f198.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 16:13:22 +0000 Received: by pzk36 with SMTP id 36so767948pzk.5 for <melissadiaz@example.net>; Fri, 06 Nov 2009 08:13:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=MjhReTuK1Vd0ER3d6MhOgxZZvzwUmneQgwJrrQz/zvU=; b=C4/wvuH7J9ZsGuLztnnU30S3aHHwSAgeMPMdvEthyTHRru05Ih/Wa5484gCw2FYibr bvJD+5KK28K4uT7zwpue6VPVxD2C/SfyIPKUxEYDHSpQlOeD33prHuZfN2AyU8x0dgcj wNxOVRF+Ni17dDUf32D3dI/qfNSM33+JJg6RU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=g0hgQ90L3hthJq6tuPNU4WONhcW3l9a0HoLKqohb86gWphsOfp07HrW6DU2DEtL9XA lyc2ju8uoGxJgb2F6+/GbWV56CouRe3DrAlmA0RwpIIx14vFE07lU+ej6ejtiH2AmuXB aWO6/vdSko3iBM0pgYJTeDL+d0ip81LIURHw0= Received: by 83.161.120.155 with SMTP id n18mr6853368wae.154.1257523982301; Fri, 06 Nov 2009 08:13:02 -0800 (PST) Received: from ?83.161.120.155? (216-75-233-116.static.wiline.com [83.161.120.155]) by mx.google.com with ESMTPS id 20sm95647pxi.15.283.161.120.155.12.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 06 Nov 2009 08:13:00 -0800 (PST) Sender: Emmanuel Lecharny <melissadiaz@example.net> Message-ID: <melissadiaz@example.net> Date: Fri, 06 Nov 2009 08:12:44 -0800 From: Emmanuel Lecharny <melissadiaz@example.net> User-Agent: Thunderbird 83.161.120.155 (X11/20090817) MIME-Version: 1.0 To: melissadiaz@example.net Subject: Re: Mina Proxy example - AbstractProxyIoHandler References: <melissadiaz@example.net> <melissadiaz@example.net> In-Reply-To: <melissadiaz@example.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Les Hazlewood wrote: > Bump! > > Any ideas? A Mina dev could probably answer this in about 3 seconds :) > > Thanks in advance! > Not sure it's necessary. Don't have time to check that right now (ApacheCpon going on), but will check later. Thanks ! -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org From melissadiaz@example.net Fri Nov 06 16:24:22 2009 Return-Path: <melissadiaz@example.net> Delivered-To: melissadiaz@example.net Received: (qmail 63670 invoked from network); 6 Nov 2009 16:24:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Nov 2009 16:24:22 -0000 Received: (qmail 35260 invoked by uid 500); 6 Nov 2009 16:24:22 -0000 Delivered-To: melissadiaz@example.net Received: (qmail 35238 invoked by uid 500); 6 Nov 2009 16:24:22 -0000 Mailing-List: contact melissadiaz@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:melissadiaz@example.net> List-Unsubscribe: <mailto:melissadiaz@example.net> List-Post: <mailto:melissadiaz@example.net> List-Id: <users.mina.apache.org> Reply-To: melissadiaz@example.net Delivered-To: mailing list melissadiaz@example.net Received: (qmail 35228 invoked by uid 99); 6 Nov 2009 16:24:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 16:24:22 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mail-iw0-f188.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 16:24:17 +0000 Received: by iwn26 with SMTP id 26so881673iwn.5 for <melissadiaz@example.net>; Fri,
{'source': 'Apache Software Foundation Public Mail Archives'}