Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-809

Copyless stack

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: None
    • Fix Version/s: 5.0.0.Alpha5
    • Labels:
      None

      Description

      Currently (as of 2.7), the transport reads the contents of a received packet into a buffer, then passes a copy of the buffer to a thread from the OOB or incoming thread pools. To prevent this copy, we can

      • have the receiver read only the version and OOB flag (to see which thread pool to dispatch the packet to)
      • pass a ref to the socket to a thread from the incoming of OOB pool, have that thread read the packet and return
      • each thread in the pool has its own buffer into which the buffer is read from the socket

      Possibly use NIO: we can install a selector and get woken up whenever data to be read is present. At that point, we can pass the ref to the socket to the handler thread and return immediately. NIO with channels for multicast sockets is available only in JDK 7 (or 8?), so this is a bit off... However, we can already implement this with reading the version and flags bytes and then passing the socket to the handler

        Attachments

        1. Buf.java
          0.3 kB
        2. BufAllocator.java
          0.2 kB
        3. Message.java
          31 kB

          Issue Links

            Activity

              People

              Assignee:
              belaban Bela Ban
              Reporter:
              belaban Bela Ban
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: