Using a bunch of connections in a client?

2007-12-27 Thread stork
Hi, I'm trying to write a client that can utilize a set number of connections using MINA trunk (mina-core-2.0.0-M1-20071221.061156-110.jar). I'm using the netcat (http://svn.apache.org/viewvc/mina/trunk/example/src/main/java/org/apache/mina/example/netcat/Main.java?view=markup) as an example but

Question regarding mina server with high load client

2007-12-27 Thread Ashish Sharma
Hi Recently I have been experimenting with mina core 2 and I have a few questions regarding the behaviour of mina in some sample programs I made. here is the client code. its simple, it simply rams as many messages as possible into the server. http://pastebin.com/m14ac361e Now I made two

[jira] Reopened: (DIRMINA-495) IoConnector needs a way to store information into the IoSession before the IoHandler gets ahold of it

2007-12-27 Thread Mike Heath (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Heath reopened DIRMINA-495: I've been trying to retrofit some of my existing code to use the IoSessionInitializer. This code is

Re: Question regarding mina server with high load client

2007-12-27 Thread Emmanuel Lecharny
Ashish Sharma wrote: Hi Hi ! 2. I understand that second server will not be able to scale very much but mina probably will, but does this mean that mina server will not be able to handle high load from few clients but low load from many clients? I'm not able to answer your Q 1 and 3

[jira] Closed: (DIRMINA-495) IoConnector needs a way to store information into the IoSession before the IoHandler gets ahold of it

2007-12-27 Thread Mike Heath (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Heath closed DIRMINA-495. -- Resolution: Fixed Added IoFuture to argument list on IoSessionInitializer.initializeSession.

Re: Using a bunch of connections in a client?

2007-12-27 Thread Maarten Bosteels
Hello Alex, 1) you can use one SocketConnector to create many connections 2) search the forum for Too many open files This thread might interest you: http://www.nabble.com/Too-many-open-files-to7521146s16868.html HTH Maarten On Dec 27, 2007 4:43 PM, stork [EMAIL PROTECTED] wrote: Hi, I'm

Re: Using a bunch of connections in a client?

2007-12-27 Thread stork
I'm not sure I understand - how can a SocketConnector create more than one connection? That would explain why the connections aren't getting close properly. Maarten Bosteels wrote: Hello Alex, 1) you can use one SocketConnector to create many connections 2) search the forum for Too many

Re: Using a bunch of connections in a client?

2007-12-27 Thread Maarten Bosteels
On Dec 27, 2007 7:43 PM, stork [EMAIL PROTECTED] wrote: I'm not sure I understand - how can a SocketConnector create more than one connection? I meant: when you need to create more than one connection, you could/should reuse one connector instance. IoConnector connector = ...; ConnectFuture

Re: memory leak in http codec

2007-12-27 Thread Luis Neves
Luis Neves wrote: I'm running the server with logging set to DEBUG and I would like to know if there is anything more I can do to try to isolate this problem. I'm still struggling with this issue, I'm forced to restart the server every 10 minutes... the debug logging doesn't seem to

[jira] Updated: (DIRMINA-503) NioProcessor.transferFile needs to catch IOException on Linux

2007-12-27 Thread Mike Heath (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Heath updated DIRMINA-503: --- Affects Version/s: 2.0.0-M1 NioProcessor.transferFile needs to catch IOException on Linux

[jira] Resolved: (DIRMINA-503) NioProcessor.transferFile needs to catch IOException on Linux

2007-12-27 Thread Mike Heath (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Heath resolved DIRMINA-503. Resolution: Fixed This has been fixed although I'm unsure if it will affect the APR transport.

Re: AbstractIoSession and final qualifiers

2007-12-27 Thread Jeff Genender
Trustin (and others)...so how about these changes and additions to the AbstractIoSession? This will allow the scheduledBytes/messages to be overriden, and also allow someone to set them. Index: core/src/main/java/org/apache/mina/common/AbstractIoSession.java

Re: Using a bunch of connections in a client?

2007-12-27 Thread Qi
Hi there, I used to confused on the same problem as well, so please let me share my understanding on this. You would only need on IoConnector if you only need one set of business logic for handling server's response. Let's image your IoConnector is your web browser, and IoAcceptor is a remote

Re: AbstractIoSession and final qualifiers

2007-12-27 Thread Trustin Lee
Hi Jeff, Do we need to remove the final modifier if we are going to provide setters? And assuming you are using DummySession as a mock object, I'd suggest making AbstractIoSession.setScheduled...(...) protected and make them public in DummySession. WDYT? Cheers, Trustin On Dec 28, 2007 8:19

Re: Using a bunch of connections in a client?

2007-12-27 Thread Trustin Lee
Hi Qi and Maarten, Thank you so much for sharing your experience in detail. Cheers, Trustin On Dec 28, 2007 9:29 AM, Qi [EMAIL PROTECTED] wrote: Hi there, I used to confused on the same problem as well, so please let me share my understanding on this. You would only need on IoConnector

[jira] Commented: (DIRMINA-503) NioProcessor.transferFile needs to catch IOException on Linux

2007-12-27 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554644 ] Trustin Lee commented on DIRMINA-503: - The APR transport doesn't support file transfer yet. It should be easy

[jira] Commented: (DIRMINA-495) IoConnector needs a way to store information into the IoSession before the IoHandler gets ahold of it

2007-12-27 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554645 ] Trustin Lee commented on DIRMINA-495: - I'd prefer IoSessionInitializer? extends ConnectFuture to

Re: Question regarding mina server with high load client

2007-12-27 Thread Trustin Lee
Hi Ashish, On Dec 28, 2007 2:21 AM, Ashish Sharma [EMAIL PROTECTED] wrote: Hi Recently I have been experimenting with mina core 2 and I have a few questions regarding the behaviour of mina in some sample programs I made. here is the client code. its simple, it simply rams as many messages

[jira] Created: (DIRMINA-504) Allow ProtocolEncoder to generate non-IoBuffer objects

2007-12-27 Thread Trustin Lee (JIRA)
Allow ProtocolEncoder to generate non-IoBuffer objects -- Key: DIRMINA-504 URL: https://issues.apache.org/jira/browse/DIRMINA-504 Project: MINA Issue Type: Improvement

Re: ProtocolEncoderOutput and FileRegion

2007-12-27 Thread Trustin Lee
Hi Geoff, On Dec 27, 2007 10:52 AM, Trustin Lee [EMAIL PROTECTED] wrote: On Dec 27, 2007 4:14 AM, Geoff Cadien [EMAIL PROTECTED] wrote: Is there any reason to not be able to write a FileRegion to ProtocolEncoderOutput in addition to an IoBuffer? It's an API flaw. It should be fixed.

[jira] Resolved: (DIRMINA-504) Allow ProtocolEncoder to generate non-IoBuffer objects

2007-12-27 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trustin Lee resolved DIRMINA-504. - Resolution: Fixed Resolved as described Allow ProtocolEncoder to generate non-IoBuffer

Re: support for asyncrhonous messaging on a per-connection basis

2007-12-27 Thread Trustin Lee
Hi Scott, On Dec 26, 2007 3:48 AM, [EMAIL PROTECTED] wrote: If a single client session sends multiple requests before a response for the first request is sent by the server, it appears that client requests are processed sequentially/serially. It appears that the processing of the second

Re: AbstractIoSession and final qualifiers

2007-12-27 Thread Jeff Genender
Yep...agreed...how is this? Index: core/src/main/java/org/apache/mina/common/AbstractIoSession.java === --- core/src/main/java/org/apache/mina/common/AbstractIoSession.java (revision 607135) +++

Re: How to lost message

2007-12-27 Thread Trustin Lee
On Dec 25, 2007 10:47 PM, Steve Johns [EMAIL PROTECTED] wrote: Did everyone test if Mina drops the message under heavy loading? In Mina wesite, I only saw the HTTP server benchmark test. Does everyone have the pure socket server benchmark test result? Thanks in advance. With a simple echo