Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4473

Binary protocol: handle asynchronous execution (better)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.0 beta 1
    • None
    • None

    Description

      The current implementation of the binary protocol handle message asynchronously. I.e. if a client send multiple requests simultaneously, we will handle all request in parallel and in particular we make no guarantee on the order with which the response are sent. But then the client has no way to associate which response correspond to which query. This ticket proposes adding a stream id to each frame. This id would be set to by the client, and the server would just reuse the same id in the response. That way, the client can send multiple simultaneous queries with different stream id and know which response correspond to which request.

      This has the advantages of 1) being trivial to implement and 2) leaving the possibility for synchronous clients (that wait for responses before sending a new request) to ignore that stream id and just use 0 all the time.

      Attachments

        1. 4473.txt
          8 kB
          Sylvain Lebresne
        2. 4473-2.txt
          9 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            paul cannon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: