Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4646

Try to unmarshall direct messages in striped pool

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • general
    • None

    Description

      During marshalling in NIO thread the following should be added to the write buffer and sent to peer:
      1. chunk size - 16 bits (this probably puts limitation on max write buffer size of 64k or will require some changes to direct writer)
      2. last chunk - 1 bit
      3. pool policy - 8 bits

      Here is the scheme to explain how this should work.

      [chunk size] [pool policy] [partition] [last flag] [chunk data] X <-- no more space in write buffer
      [next chunk size] [last flag] [chunk data] <<-- we write next chunk once some space is available in write buffer, but we skip partition and policy flags and maybe others that should be sent only once.
      ...
      ...
      [next chunk size] [last flag] [chunk data] <<-- last flag is true here
      

      Examples
      Write buffer - 64k
      Message - 84k

      1. sender reserves space for chunk size
      2. reserves space for policy and last chunk flag
      3. marshalls message to buffer while it has free space (64k - SPACE will be written to buffer)
      4. puts size and flags to reserved space in the beginning
      5. sends buffer or part of it which makes some space available to further writes
      6. reserves space for next chunk size and flags
      7. marshalls message to buffer while it has free space (lets assume the rest of message fits)
      8. puts size and last=true to the reserved space and sends

      Receiver:

      1. reads chunk size, stores the target pool and partition
      2. allocates heap buffer and copies chunk data to it from read buffer
      3. once all message chunks are fully read message should be submitted to a pool where it will be unmarshalled and processed

      Attachments

        1. client_serialization.patch
          376 kB
          Igor Seliverstov

        Issue Links

          Activity

            People

              gvvinblade Igor Seliverstov
              yzhdanov Yakov Zhdanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: