Tens of thousands of users

First, congratualtions on open sourcing this. I’'m already thinking of some very cool projects (as evidenced below).

Any chance this could scale to tens of thousands of users (or hundreds of thousands) if most of them are idle? Or is memory consumption too high? Any way to cut down on memory usage if most users are idle most of the time (sharing buffers).

Thanks,

Dan

Dan,

In order to support tends of thousands of users, we’‘ll need to make the switch to the NIO library in Java. It uses a selector for connections instead of a thread for each connection (allowing much greater scalability). In order to support hundreds of thousands of connections, clustering of servers would need to be implemented. Even though you didn’'t ask, millions of connections would require a miracle.

NIO is a fairly high priority, clustering would be great but is lower priority at the moment. However, clustering may not be all that difficult after S2S is implemented – that code may lay the foundation for clustering.

Regards,

Matt

Yep, I’‘ve implemented stuff with NIO before. If you’‘re thinking about it, I’‘d read the SEDA papers at <a href="http://www.eecs.harvard.edu/mdw/proj/seda/> http://www.eecs.harvard.edu/mdw/proj/seda/. Once the source is out, I still suspect I won’‘t have time to help, but if I do somehow get the chance to do an NIO upgrade, I’'ll certainly contribute it back to the tree.

Anyway, I’'m quite excited about the release and will be far more excited once NIO and clustering support exist.

Dan,

We actually use the SEDA architecture in Messenger internally already. It’‘s allowed for quite high throughput even though we’‘re not using NIO. I’'m hoping that a lot of NIO bugs are fixed in JDK 1.5 – that should make an implementation much more reasonable.

-Matt

Nice, very nice. From everything I’‘m seeing, you guys have some serious engineering cred for your products. Once you have NIO, I’‘ll definitely load-test and then switch my stuff over (I’‘ve already moved to Smack on the client side). And once there’'s clustering…

(And yes, NIO is massively improved in 1.5.0. Especially useful is javax.net.ssl.SSLEngine.)

(And yes, NIO is massively improved in 1.5.0.

Especially useful is javax.net.ssl.SSLEngine.)

Yep, SSLEngine and built-in SASL support for JDK 1.5 means we’'re thinking quite strongly about requring JDK 1.5 for Messenger. We can use all the cool new language features then.

-Matt

Did you ever make the change over to NIO? Is that still in plan?

Did you ever make the change over to NIO? Is that

still in plan?

Nope, we haven’‘t made the change yet. We’'d like to, but need to figure out an XML parsing solution that would work with NIO first.

Regards,

Matt