2 Replies Latest reply on Oct 2, 2008 11:15 PM by rmonge

    Openfire BOSH And Apache

    Bronze

      Hi,

       

      I have spent the last few weeks researching Comet and XMPP.

      Looking for a Javascript XMPP library in particular, to write a web client for Openfire.

       

      I have played around with Openfire and a Glasfish Grizzly Comet Servlet and some Javascript/Dojo libraries.

      I am thinking of heading down the road of:

       

      Strophe BOSH web client -> Apache? -> [connction manager maybe some point] -> Openfire

       

      Previously thinking

      Custom web client -> Comet servlet on Glassfish/Tomcat/Jboss -> Service layer -> Openfire

       

      My question is this.

      Many of the limited resources on the web suggest putting Apache in front of Openfire to proxy /http-bind request through.

      Can anybody explain to me if this would have a detrimental impact of scalability becuase as I understand it the XMPP interface to Openfire is Java Servlet based using the NIO non-blocking technique.

       

      Obviously, Apache has a limit of number of connections and as I currently understand the way people are writing on the Internet around this subject I'm slightly confused. By using Apache do we not lose the NIO advantage? Would the persistent http connection not be with Apache instead of Openfire?

       

      If anybody could shed some light on this in particular, then very much appreciated.

      If anyone has any input as to my suggested approaches above and whether in their opinion on the knowledge gained to date I'm heading down a good route of design for an Openfire web based solution that also would be welcomed.

       

      I like xmpp because it is the standardised approach.

      I like Openfire, it is Java, I am Java. The Admin console is excellent.
      While not without some limtiations, I feel BOSH would be better for me than writing a custom Comet layer to interface with Openfire.

       

      Many thanks.

      Bobsycle.

        • Re: Openfire BOSH And Apache
          Bronze

          Bump,

           

          Hi, so can anybody...

           

          1. Shed some light on why putting Apache in front of Openfire using ProxyPass doesn't place a limit on the number of connections?

          I was under the impression Openfire implementes NIO non blocking so very much more performent. By putting Apache between are we not hindering this?

           

          I really would like to understand this.

           

          2. Any suggestions on a good design approach to using Openfire and a web client?

           

          Thanks.

            • Re: Openfire BOSH And Apache
              Bronze

              #1 I think putting apache in front is a great idea, I'm doing something similar.  It allows you to scale your front end, it provides a slow connection buffer for your openfire instance, and finally it's nice to have apache in front for securities sake.  Here is my current setup:

               

              apache lb and cache instance + apache lb and cache instance

                            \                                                /

                        HA Proxy                                 HAProxy (provides session stickyness and more complex lb algorithms)

                              \                                           /

                               \                                         /

                                     OpenFire Server:7070