Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-41

Add "near" references to river protocol

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0.CR1
    • None
    • River
    • None

      In the River protocol, references to previously-occurring objects are 4 bytes long. Many streams will have a small number of references; other streams may have a high amount of "locality" in the stream (objects that are proximate to each other in the object graph may be closer together in the stream).

      Explore the idea of "near" references. This could take one of two forms.

      One is that of an alternate reference mechanism that is one byte (unsigned), an absolute reference to an object starting from the stream head. In this way, the first 256 objects can be referenced by using only two bytes instead of five.

      Another is to use one byte (unsigned) which is a negative relative index from the current object sequence number. In this way, any of the last 256 objects written to the stream may be referenced by using only two bytes instead of five.

      Some analysis would be warranted to determine which approach would incur the most savings.

            dlloyd@redhat.com David Lloyd
            dlloyd@redhat.com David Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: