Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13526

IQv2: Consider more generic logic for mapping between binary and typed queries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • streams

    Description

      Right now, typed queries (like KeyQuery) need to be specially handled and translated to their binary counterparts (like RawKeyQuery). This happens in the Metered store layers, where the serdes are known. It is necessary because lower store layers are only able to handle binary data (because they don't know the serdes).

      This situation is not ideal, since the Metered store layers will grow to host quite a bit of query handling and translation logic, because the relationship between typed queries and binary counterparts is not obvious, and because we can only automatically translate known query types. User-supplied queries and stores will have to work things out using their a-priori knowledge of the serdes.

       

      One suggestion (from mjsax ) is to come up with some kind of generic "query mapping" API, which the Metered stores would use to translate back and forth between typed and raw keys and values. Users would be able to supply their own mappings along with their custom queries.

      Another option would be to have the Metered stores attach the serdes to the query on the way down and then to the result on the way up. Then, the serdes would be available in the bytes store (as part of the request) and to the users when they get their results (as part of the response).

      Other options may also surface once we start playing with ideas.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vvcephei John Roesler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: