I fixed the SocketReadThread, SocketAcceptThread, ConnectionManagerImpl and added some new Classes in org.messenger.net package. I didn’'t change the XML Parser, but I replaced the old XMLReader and XMLWriter by some new ByteChannelReader and ByteChannelWriter Classes, Now I have a series of non-blocking socket handling classes.
I tested the modified JiveMessenger on Windows 2000 OS with my PC(intel 2.4G CPU, 1G memory). When I got over 5,000 simultaneous users, the server is fine, just CPU is full usage, memory usage is just about about 300m. it is exciting, when I used the original JiveMessenger, I only got about 3,000 users, and memory usage was much more. Now, I think if I have a more power machine(maybe, multi CPU), I will got over 20,000 users. I will test the case when I have a situation.
I believe I can do more things about server optimized, Now I used one thread for 50 socket connection, and I did a very simple thread pool.
, I desired any good advices from you, thanks.