Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23410

Add get() function to KeyValueStoreProvider

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.10
    • Component/s: Key/Value Store

      Description

      In order to optimize interactions with the KeyValueStoreProvider, I would like to retrieve the values for a set of keys from the KeyValueStoreProvider in one round-trip. Consider adding a method to the KeyValueStoreProvider interface similar to the one below to address this optimization requirement.

      /**
       * Retrieves a Map of key/value pairs for the given set of keys.
       *
       * @param keys the keys
       * @return the Map of key/value pairs
       * @throws IllegalArgumentException if the value cannot be returned as a {@link String}
       * @since 9.3
           */
      Map<String, byte[]> get(Set<String> keys)
      

      and maybe convenience method

      Map<String, String> get(Set<String> keys)
      

      Sample Use Case #1: Export contents of KeyValueStoreProvider - Page through the KeyValueStoreProvider.keyStream() of keys and use this API to efficiently retrieve the values associated with the keys for subsequent export.

      Sample Use Case #2: Store tiny content (Note, Tweet, etc) as a KeyValueStoreProvider value keyed by its digest and efficiently bulk retrieve that tiny content by a set of digests. A KeyValueStoreBinaryManager could be built on top of the KeyValueStoreProvider that specializes in managing tiny content. The underlying KeyValueStoreProvider could be used directly when needed to efficiently retrieve tiny content blobs in bulk. Current BinaryManager implementations do not support bulk retrieval of tiny content blobs.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h