powered by Jive Software

Is Smack Thread Safe (Server-side program)

I’‘ve been asked to write a Server-side component that translates requests from HTML pages into calls to our Jabber IM Server via Smack. There could potentially be >1000 clients (using web browsers). Is Smack thread safe or will I run into problems using it’'s libraries this way? Also, can you see any issues related to using Smack on a high volume enterprise server?




Smack should work fine and is fully thread safe. However, I’'d recommend keeping one ore more persistent connections to the XMPP server and then just continuing to resend messages with those connections. This will scale much better than opening up a different connection for each web request.