Re: concurrent users simulation

2007-04-21 Thread jian wu
Hi, I'm using Python to develop the test driver and test simulator for our messaging gateway built on top Mina. From my experience, using Python might be an overkill if you just want to do some simple testing. But, if you want to do some sophisticated testing, Python has a lot of libraries/mod

Re: Re : Issue with resource locking

2007-04-21 Thread Niklas Therning
Dupont jean wrote: > I'm effectively trying to lock access to a POP3 user mailbox using the J2SE > 5.0 ReentrantLock implementation. > > this is the revelant part of my handler > > -- > public class Pop3ProtocolHandler extends IoHandlerAdapter implements > AbstractPop3Handler > { > ... >

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread Michael Grundvig
Ah, yup, you are correct. Slightly better then GPL :) Mike - Original Message - From: "Greg Duffy" <[EMAIL PROTECTED]> To: Sent: Saturday, April 21, 2007 1:57 PM Subject: Re: 1000+ simultaneous connections with data transfer? I think it's actually LGPL. On 4/21/07, Michael Grundvi

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread Greg Duffy
I think it's actually LGPL. On 4/21/07, Michael Grundvig <[EMAIL PROTECTED]> wrote: I'm using Trove for a large project currently. It's faster at times and slower at others with the newest JDK. Overall though, if you can get away with a primitive as the key, it works quite well. The licensing i

Re: concurrent users simulation

2007-04-21 Thread Michael Grundvig
We wrote our own load tester using MINA and ran it inside of JMeter. We didn't like the JMeter piece in the end and so ripped it out. Now it's just a straight MINA client with a series of properties files to manage the various settings. Seems to work much better. Mike - Original Message -

Re: concurrent users simulation

2007-04-21 Thread mat
No other methods? 2007/4/21, Thierry Mallard <[EMAIL PROTECTED]>: mat a écrit : > Hi, > > I just finished my server. Can anyone provide me a method to simulate the > concurrect users test? I open telnet on my pc however when it reaches > 70, my > pc CPU usage is 100% and connection is hard to m

Re: How can I configure multiple decoders in MINA?

2007-04-21 Thread mat
What i meants was needed to add more "IF else" into message decoder(NOT good design pattern)? 2007/4/22, mat <[EMAIL PROTECTED]>: Actually i had same questions, I am implementing a Gateway proxy server which should understand 2 different protocols. Should I use IF ELSE method in my own message

Re: How can I configure multiple decoders in MINA?

2007-04-21 Thread mat
Actually i had same questions, I am implementing a Gateway proxy server which should understand 2 different protocols. Should I use IF ELSE method in my own message decoder class? However, I don't think it is a good approach since it prevents adding new protocols. Any good idea? 2007/4/17, Trusti

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread Michael Grundvig
I'm using Trove for a large project currently. It's faster at times and slower at others with the newest JDK. Overall though, if you can get away with a primitive as the key, it works quite well. The licensing is a problem though as it's GPL. Mike - Original Message - From: "Ming Fan

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread Ming Fang
Has anyone try using the Trove HashMap implementation(http:// trove4j.sourceforge.net/)? For some tests it is many times faster than the JDK one. On Apr 21, 2007, at 9:58 AM, Richard Lowe wrote: I found that HashMap lookups with this amount of packets can be particularly expensive, as can c

boardcasting

2007-04-21 Thread mat
Hi, I implemented my protocol encoding in the procotol filter and I used one session one object method. I just wonder if I try to boardbast the message to N clients, which means the encoding part will be called N times? If so, should I move my encoding part in the IoHandler which means encoding

Thread Priority

2007-04-21 Thread Richard Lowe
Hi there, On my server program I send a message to all of the connected sessions (250 bytes of data) every 1/4 of a second. Interstingly, I have always had to do this in my main server program to keep the CPU usage down: Thread.currentThread().setPriority(Thread.MAX_PRIORITY); If I don't, t

Re:Issue with resource locking

2007-04-21 Thread Eero Nevalainen
Dupont jean wrote: I'm effectively trying to lock access to a POP3 user mailbox using the J2SE 5.0 ReentrantLock implementation. Would java.util.concurrent.Semaphore be enough for you? Using it as a binary semaphore as stated in the description works pretty much like a lock and can be releas

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread Richard Lowe
Hi Trustin, Yes, I tried that as well - it didn't seem to make much difference, though I guess that flag would be more useful over the Internet maybe? There is a happy ending to this story, after much tuning and playing around with JProfiler I managed to squeeze quite a bit more out of the n

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread mat
I wonder when turning on the setTcpNoDelay?

Re: 1000+ simultaneous connections with data transfer?

2007-04-21 Thread Richard Lowe
Hi Trustin, Many thanks - I had already tried playing with the message size - obviously that does help a little. I think the default on this particular machine is 8192 bytes (Windows XP). Many thanks, Richard. -- Trustin Lee wrote: On 4/20/07, Richard Lowe <[EMAIL PROTECTED]> wrote: Hi Mik

Re : Issue with resource locking

2007-04-21 Thread Dupont jean
I'm effectively trying to lock access to a POP3 user mailbox using the J2SE 5.0 ReentrantLock implementation. this is the revelant part of my handler -- public class Pop3ProtocolHandler extends IoHandlerAdapter implements AbstractPop3Handler { ... public void messageReceived(IoSession

IoSession synchronized

2007-04-21 Thread mat
Hi folks, If the code is correct? do I need synchronized (sessions)? I have a hashtable to maintain the IoSession. public void onBroadcasting(MyMessage message) { Enumeration e = sessions.elements(); while(e.hasMoreElements()) { IoSession session = (IoSession)e.nextElement(); session

Re: Issue with resource locking

2007-04-21 Thread Niklas Therning
Dupont jean wrote: > Hi there, > > I'm having an issue with a protocol handler i wrote. The handler acquires a > lock in the first stages of the protocol communication, then multiple > messages are exchanged between client and server and when the client decides > to put an end to the communicati