Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9604

Support to run converters in the user requested format

    Details

      Description

      As described in the docs, a filter/converter can optionally specify a MediaType to process events, and let Infinispan perform the conversion between the storage format and the chosen format. Once converters are applied, the last step, in case it's needed, it to convert the event to the request format, which is the format that the cache was decorated with the withMediaType(...) method when the listener registration was performed.

      This is the basic mechanism that allow events to be received in a different MediaType than the data is stored, at the same time allowing the filter/converter to pick the best format to process data.

      Some converters, such as org.infinispan.server.hotrod.KeyValueVersionConverter (used in NearCache and the Spark Connecor) cannot work in this scheme since as part of its operation, it reads the stored key and values and creates a new value which is the aggregation of the Key and the Value in the byte[] format, thus preventing the final transformation step to the requested mediatype, since the type information is totally lost in the process.

      For this case it'd be interesting to have the possibility of applying the converters's convert() operation after having transformed the Key and Values to the final request format, therefore the final event value will be an aggregated byte[] but in the user requested format.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gustavonalle Gustavo Fernandes
                Reporter:
                gustavonalle Gustavo Fernandes
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: