Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-326

Improve streaming of large objects for network server and client

    XMLWordPrintableJSON

Details

    • Performance

    Description

      Currently the stream writing methods in network server and client require a length parameter. This means that we have to get the length of the stream before sending it. For example in network server in EXTDTAInputStream we have to use getString and getbytes() instead of getCharacterStream and getBinaryStream so that we can get the length.

      SQLAM Level 7 provides for the enhanced LOB processing to allow streaming without indicating the length, so, the writeScalarStream methods in
      network server DDMWriter.java and network client Request.java can be changed to not require a length.

      Code inspection of these methods seems to indicate that while the length is never written it is used heavily in generating the DSS. One strange thing is that it appears on error, the stream is padded out to full length with zeros, but an actual exception is never sent. Basically I think perhaps these methods need to be rewritten from scratch based on the spec requirements for lobs.

      After the writeScalarStream methods have been changed, then EXTDAInputStream can be changed to properly stream LOBS. See TODO tags in this file for more info. I am guessing similar optimizations available in the client as well, but am not sure where that code is.

      Attachments

        1. ClobTest.zip
          77 kB
          Sunitha Kambhampati
        2. DERBY-326_2.patch
          26 kB
          Tomohito Nakayama
        3. DERBY-326_3.patch
          28 kB
          Tomohito Nakayama
        4. DERBY-326_4.patch
          30 kB
          Tomohito Nakayama
        5. DERBY-326_5_indented.patch
          32 kB
          Tomohito Nakayama
        6. DERBY-326_5.patch
          30 kB
          Tomohito Nakayama
        7. DERBY-326_6.patch
          37 kB
          Tomohito Nakayama
        8. DERBY-326_7.patch
          276 kB
          Tomohito Nakayama
        9. DERBY-326_8.patch
          278 kB
          Tomohito Nakayama
        10. DERBY-326_9.patch
          276 kB
          Tomohito Nakayama
        11. DERBY-326.patch
          28 kB
          Tomohito Nakayama
        12. ReEncodedInputStream.java.modifiedForLongRun
          3 kB
          Tomohito Nakayama

        Issue Links

          Activity

            People

              tmnk Tomohito Nakayama
              kmarsden Katherine Marsden
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: