Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1322

Implement request coalescing

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Critical
    • Resolution: Deferred
    • Affects Version/s: None
    • Fix Version/s: 1.1.0.RC1
    • Component/s: GWT
    • Labels:
      None

      Description

      We cannot ship without ensuring that all requests in a single tick of the event loop reach the server in a single http request. The simple DynaTableRF sample is already locking up the browser.

      This should be as simple as

      • find the spot where we fire requests and instead putting them in a string buffer / json object
      • issue a ScheduleFinally to do the actual fire
      • have the server fire off each request and capture its response string
      • append these and return them to the client in a single response
      • have the client resolve each response

      More specifically:

      • Create a subclass of DefaultRequestTransport that adds wire-level coalescing.
        • It may be simpler code-wise to add a "protected boolean enableCoalescing()" to DRT and only override the one method in the subclass.
      • Change RequestFactoryJsonImpl.initialize(EventBus) to use a GWT.create(RequestTransport.class)
      • Add <replace-with> rebind rules for RequestTransport in RequestFactory.gwt.xml.
        • One should use DefaultReqestTransport, the second should use the coalescing variant.
        • Introduce a deferred-binding variable to control whether or not coalescing is used.
      • Update the RequestFactoryServlet to look for a coalesced request (based on header?) and move the code that calls JsonRequestProcessor into a loop that has robust exception handling.
        • The same code should be able to handle a standalone request as easily as a coalesced request.
        • Thinking about it more, I'm not really fond of using a co-servlet that uses RequestDispatchers.
      • Pack the payloads into a coalesced response, and have the CoalescingRequestTransport demux the payload.

      With this approach, you shouldn't need to touch any of the RequestFactory guts.

        Attachments

          Activity

            People

            Assignee:
            rice Daniel Rice
            Reporter:
            rjrjr@google.com Ray Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 1d
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified