glassfish
  1. glassfish
  2. GLASSFISH-14957

[PERF] Optimize RESTful API such that in-process calls avoids the network overhead

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: future release
    • Component/s: rest-interface
    • Labels:
      None

      Description

      Paul Sandoz had mentioned the possibility of making Jersey avoid the network penalty when the client and server are in the same JVM. We need to investigate this to see if it's possible, as that could be a significant performance boost for the console.

        Activity

        Hide
        ludo added a comment -

        From Paul:
        see the in memory test container:

        http://java.net/projects/jersey/sources/svn/show/trunk/jersey/jersey-test-framework/jersey-test-framework-inmemory?rev=4410

        specifically:

        http://java.net/projects/jersey/sources/svn/content/trunk/jersey/jersey-test-framework/jersey-test-framework-inmemory/src/main/java/com/sun/jersey/test/framework/impl/container/inmemory/TestResourceClientHandler.java?rev=4410

        Note that it serializes and buffers the request and response entity if present. It might be possible to avoid that for the response entity, not sure about the request entity. It may also be possible under certain circumstances to match the request/response entity Java instances with the client and server and pass by reference but care has to be taken depending on what assumptions the app is running with.

        IIRC you are depending on the injection of some Grizzly request/response artifacts. Under such circumstances those artifacts will not be injected, so you may need to abstract out that information."

        Not sure about the lack of injection in some area...Might be more complicated than expected.

        Show
        ludo added a comment - From Paul: see the in memory test container: http://java.net/projects/jersey/sources/svn/show/trunk/jersey/jersey-test-framework/jersey-test-framework-inmemory?rev=4410 specifically: http://java.net/projects/jersey/sources/svn/content/trunk/jersey/jersey-test-framework/jersey-test-framework-inmemory/src/main/java/com/sun/jersey/test/framework/impl/container/inmemory/TestResourceClientHandler.java?rev=4410 Note that it serializes and buffers the request and response entity if present. It might be possible to avoid that for the response entity, not sure about the request entity. It may also be possible under certain circumstances to match the request/response entity Java instances with the client and server and pass by reference but care has to be taken depending on what assumptions the app is running with. IIRC you are depending on the injection of some Grizzly request/response artifacts. Under such circumstances those artifacts will not be injected, so you may need to abstract out that information." Not sure about the lack of injection in some area...Might be more complicated than expected.
        Hide
        Nazrul added a comment -

        Ludo mentioned that it is too risky to fix at this point. Excluding from 3.1 count.

        Show
        Nazrul added a comment - Ludo mentioned that it is too risky to fix at this point. Excluding from 3.1 count.
        Hide
        Tom Mueller added a comment -

        Reassigning to Jason as Ludo is no longer on the project.

        Show
        Tom Mueller added a comment - Reassigning to Jason as Ludo is no longer on the project.

          People

          • Assignee:
            Jason Lee
            Reporter:
            Jason Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: