Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Beta1, 2.0.0
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      client & server
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      We need to implement form delta-submission so that the amount of data sent over the wire is minimized.

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment -

          After a failed prototype and some additional discussions we came to the conclusion that we need a delta submit implementation that is not spreading like cancer throughout the entire code base. Also it should be easily turned on or off.

          Show
          Mircea Toma added a comment - After a failed prototype and some additional discussions we came to the conclusion that we need a delta submit implementation that is not spreading like cancer throughout the entire code base. Also it should be easily turned on or off.
          Hide
          Mircea Toma added a comment -

          The chosen implementation is supposed to truly calculate the difference in parameters between a previously sent submit and the current form submit. Only the added and removed parameters are sent to the server which is responsible to recreate the full form submission.

          Calculating the difference between to sets of parameters is an expensive operation (for Javascript). The complementing of two sets is done by iterating over the elements of the complemented set, while testing if the current element is found in the complementing set. When the lookup is sucessful the element it is not added to the resulting set.

          Show
          Mircea Toma added a comment - The chosen implementation is supposed to truly calculate the difference in parameters between a previously sent submit and the current form submit. Only the added and removed parameters are sent to the server which is responsible to recreate the full form submission. Calculating the difference between to sets of parameters is an expensive operation (for Javascript). The complementing of two sets is done by iterating over the elements of the complemented set, while testing if the current element is found in the complementing set. When the lookup is sucessful the element it is not added to the resulting set.
          Hide
          Mircea Toma added a comment -

          To improve the speed of lookup we need to implement a hashtable in Javascript. The lookup operations will be sped up considerably for sets larger than 3000 items.

          Show
          Mircea Toma added a comment - To improve the speed of lookup we need to implement a hashtable in Javascript. The lookup operations will be sped up considerably for sets larger than 3000 items.
          Hide
          Mircea Toma added a comment -

          Implemented Hashtable using a direct chaining strategy. See http://en.wikipedia.org/wiki/Hash_table#Separate_chaining .

          Show
          Mircea Toma added a comment - Implemented Hashtable using a direct chaining strategy. See http://en.wikipedia.org/wiki/Hash_table#Separate_chaining .
          Hide
          Mircea Toma added a comment -

          Implemented SDBM hash function. See http://www.cse.yorku.ca/~oz/hash.html .

          Show
          Mircea Toma added a comment - Implemented SDBM hash function. See http://www.cse.yorku.ca/~oz/hash.html .
          Hide
          Mircea Toma added a comment -

          Implemented Hashset based on the hash table operations. This is the structure we need to hold the paramerters of a form submit to allow fast lookup to the contained elements.

          Implemented complement operation for the Hashset. The operation is attached to the Hashset object to allow fast access to the internals of the underlying hashtable's primitive operations.

          Show
          Mircea Toma added a comment - Implemented Hashset based on the hash table operations. This is the structure we need to hold the paramerters of a form submit to allow fast lookup to the contained elements. Implemented complement operation for the Hashset. The operation is attached to the Hashset object to allow fast access to the internals of the underlying hashtable's primitive operations.
          Hide
          Mircea Toma added a comment -

          Created unit test to verify Hashtable and Hashset functionality and also empirical performance tests.

          Show
          Mircea Toma added a comment - Created unit test to verify Hashtable and Hashset functionality and also empirical performance tests.
          Hide
          Mircea Toma added a comment -

          Started delta submit implementation.
          Modified ice.submit function to calculate the complement between the sets of parameters generated by the previous ice.submit function invocation and paramaeters calculated for the current invocations.

          The previous parameters are saved as a property on the form element.

          Normally, the first form submit does not a previous set of parameters. To avoid sending a large form submit the initial parameters are calculated for each form on page load.

          Show
          Mircea Toma added a comment - Started delta submit implementation. Modified ice.submit function to calculate the complement between the sets of parameters generated by the previous ice.submit function invocation and paramaeters calculated for the current invocations. The previous parameters are saved as a property on the form element. Normally, the first form submit does not a previous set of parameters. To avoid sending a large form submit the initial parameters are calculated for each form on page load.
          Hide
          Mircea Toma added a comment -

          Introduced DeltaSubmitPhaseListener phase lister that reconstructs the full set of parameters by using the previous set of parameters (saved as attribute on the form component) the submitted delta parameters. The processing is done before apply-request-phase so that the components will the calculated parameters for decoding.

          Show
          Mircea Toma added a comment - Introduced DeltaSubmitPhaseListener phase lister that reconstructs the full set of parameters by using the previous set of parameters (saved as attribute on the form component) the submitted delta parameters. The processing is done before apply-request-phase so that the components will the calculated parameters for decoding.
          Hide
          Mircea Toma added a comment - - edited

          Make delta submit feature configurable. Setting 'org.icefaces.deltaSubmit' context parameter to 'true' enables the delta submit feature.

          Show
          Mircea Toma added a comment - - edited Make delta submit feature configurable. Setting 'org.icefaces.deltaSubmit' context parameter to 'true' enables the delta submit feature.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Mircea Toma
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: