Details

    • Type: Feature Request Feature Request
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      there's a feature in servlet 3.0 specification which "allows the thread to issue a call to the resource and return back to the container without getting blocked. The thread can perform other tasks, which makes Servlet 3.0's performance more efficient. Implementing an Asynchronous Servlet requires using the AsyncContext, which can be obtainer from the HTTP request object."

      there is an example using java under section "Aysnchronous Servlets" here: http://www.mastertheboss.com/servlet-30/servlet-30-tutorial

      here is an example of the lift framework implementation:

      https://www.assembla.com/spaces/liftweb/wiki/Asynchronous_REST_API_support

      here is the implementation:

      https://github.com/lift/lift/blob/3b2112aa419c57ca35e111463b714ebf945ce3fe/framework/lift-base/lift-webkit/src/main/scala/net/liftweb/http/rest/RestContinuation.scala

      java EE AsyncContext documentation:

      http://docs.oracle.com/javaee/6/api/javax/servlet/AsyncContext.html

      jboss implementation:

      http://docs.jboss.org/jbossweb/latest/api/org/apache/catalina/connector/Request.AsyncContextImpl.html

      an example for jboss:

      http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/servlet-async/

        Activity

        Hide
        Mariano Guerra
        added a comment -

        I have a recipe on how to do this here:

        https://github.com/marianoguerra/immutant-recipes/tree/master/async-handler

        it only requires a one line change on immutant, the patch is on the README of that recipe.

        for me it's enough with that line change, I can make the async-handler a lib so it can evolve faster and independently until it's good enough.

        Show
        Mariano Guerra
        added a comment - I have a recipe on how to do this here: https://github.com/marianoguerra/immutant-recipes/tree/master/async-handler it only requires a one line change on immutant, the patch is on the README of that recipe. for me it's enough with that line change, I can make the async-handler a lib so it can evolve faster and independently until it's good enough.
        Hide
        Toby Crawley
        added a comment -

        I've committed the change that marks the servlet as async: https://github.com/immutant/immutant/commit/f38cb3a31e48e25845bfa4398250d2169ce0e726

        Keep us posted on how the lib is going - we'd be happy to roll it in to Immutant at some point.

        Show
        Toby Crawley
        added a comment - I've committed the change that marks the servlet as async: https://github.com/immutant/immutant/commit/f38cb3a31e48e25845bfa4398250d2169ce0e726 Keep us posted on how the lib is going - we'd be happy to roll it in to Immutant at some point.
        Hide
        Toby Crawley
        added a comment -

        I also exposed the current-servlet-request in a public ns: (immutant.web/current-servlet-request) https://github.com/immutant/immutant/commit/4268a4024e56e300b81d0af68f90edca42ad8a82

        Show
        Toby Crawley
        added a comment - I also exposed the current-servlet-request in a public ns: (immutant.web/current-servlet-request) https://github.com/immutant/immutant/commit/4268a4024e56e300b81d0af68f90edca42ad8a82
        Hide
        Toby Crawley
        added a comment -

        I'm closing this, since the rest of this work is happening in Mariano's own lib for now.

        Show
        Toby Crawley
        added a comment - I'm closing this, since the rest of this work is happening in Mariano's own lib for now.

          People

          • Assignee:
            Toby Crawley
            Reporter:
            Mariano Guerra
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: