VYSPER
  1. VYSPER
  2. VYSPER-307

BOSH plugin too tightly bound to Jetty

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.8
    • Component/s: BOSH
    • Labels:

      Description

      This basically is the same issue outlined in VYSPER-306

      The BOSH plugin is tightly bound to Jetty (it uses its continuation library) and it doesn't work in other contexts. In particular deploying it in Tomcat doesn't work.

        Activity

        Fabio Mancinelli created issue -
        Fabio Mancinelli made changes -
        Field Original Value New Value
        Labels bosh extensions
        Hide
        Bernd Fondermann added a comment -

        What could we do to resolve this? Use Servlet 3.0?

        Show
        Bernd Fondermann added a comment - What could we do to resolve this? Use Servlet 3.0?
        Hide
        Stig Runar Vangen added a comment -

        An attempt at updating the BOSH plugin.

        Removed usage of Jetty API's and replace them with Servlet 3.0 API's instead. I also had to update the Jetty version at top level to allow the endpoint to still use Jetty while using the same codebase. Also had to update the unit tests according to the new interfaces.

        From my testing I can see the same behavior in both implementations, and also the same shortcomings I am afraid.

        Show
        Stig Runar Vangen added a comment - An attempt at updating the BOSH plugin. Removed usage of Jetty API's and replace them with Servlet 3.0 API's instead. I also had to update the Jetty version at top level to allow the endpoint to still use Jetty while using the same codebase. Also had to update the unit tests according to the new interfaces. From my testing I can see the same behavior in both implementations, and also the same shortcomings I am afraid.
        Stig Runar Vangen made changes -
        Attachment vysper-bosh-servlet30.patch [ 12523195 ]
        Bernd Fondermann made changes -
        Assignee Bernd Fondermann [ brainlounge ]
        Hide
        Stig Runar Vangen added a comment -

        When I talk about shortcomings, I think about the lack of Tomcat support for one thing. Tomcat seem to have a bug in the async processing. The first request lets you set the response header, and that response gets parsed correctly on the client side. The following requests in the same async context does not let you set the response headers, and Tomcat seem to give some default headers only. In addition, it also switches to chunked transfer encoding because of missing content length. This results in errors in clients trying to read the response from a Tomcat context. These problems does not occur when using Jetty using the same Servlet 3.0 API's. Jetty's behavior was the same as when using its Continuation API.

        The second problem I encountered was that the extension does not always return a result from a request. I saw the same behavior using both the Jetty Continuation API's and the Servlet 3.0 API's. The result of this is that Emite (http://code.google.com/p/emite/) never finished logging in. I also tried using Pidgin (http://www.pidgin.im/), which has BOSH support if you enable it. Using Pidgin I was able to log in successfully, but chatting was a bit problematic. Sending a message to the server wasn't noticed by the server using an already open async request. I know the server never received the message as I had enabled both console logging of all BOSH messages as well as database logging of all chat messages. When Piding lost the connection and created a new one however, the message was resent, and the message got through. I then also received pending messages from others.

        Show
        Stig Runar Vangen added a comment - When I talk about shortcomings, I think about the lack of Tomcat support for one thing. Tomcat seem to have a bug in the async processing. The first request lets you set the response header, and that response gets parsed correctly on the client side. The following requests in the same async context does not let you set the response headers, and Tomcat seem to give some default headers only. In addition, it also switches to chunked transfer encoding because of missing content length. This results in errors in clients trying to read the response from a Tomcat context. These problems does not occur when using Jetty using the same Servlet 3.0 API's. Jetty's behavior was the same as when using its Continuation API. The second problem I encountered was that the extension does not always return a result from a request. I saw the same behavior using both the Jetty Continuation API's and the Servlet 3.0 API's. The result of this is that Emite ( http://code.google.com/p/emite/ ) never finished logging in. I also tried using Pidgin ( http://www.pidgin.im/ ), which has BOSH support if you enable it. Using Pidgin I was able to log in successfully, but chatting was a bit problematic. Sending a message to the server wasn't noticed by the server using an already open async request. I know the server never received the message as I had enabled both console logging of all BOSH messages as well as database logging of all chat messages. When Piding lost the connection and created a new one however, the message was resent, and the message got through. I then also received pending messages from others.
        Hide
        Bernd Fondermann added a comment -

        Thanks for these comments.

        The Tomcat problems need to be discussed with their developers.

        We need to look into the other problems you saw as well, but this is a separate issue. Please open one or more if you like.

        Show
        Bernd Fondermann added a comment - Thanks for these comments. The Tomcat problems need to be discussed with their developers. We need to look into the other problems you saw as well, but this is a separate issue. Please open one or more if you like.
        Bernd Fondermann made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.8 [ 12316171 ]
        Resolution Fixed [ 1 ]
        Hide
        Stig Runar Vangen added a comment -

        Tomcat issue posted here:
        https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

        Plugin issue described here: VYSPER-309

        Show
        Stig Runar Vangen added a comment - Tomcat issue posted here: https://issues.apache.org/bugzilla/show_bug.cgi?id=53112 Plugin issue described here: VYSPER-309

          People

          • Assignee:
            Bernd Fondermann
            Reporter:
            Fabio Mancinelli
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development