Uploaded image for project: 'sfc'
  1. sfc
  2. SFC-170

Provide an asynchronous API to SFC data store in sfc-provider

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Resolution: Unresolved
    • unspecified
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    Description

      With the availability of JDK8, more libraries are available that make functional asynchronous programming feasible. Asynchronous data store access performed in sfc-genius module is a proof of concept of it. It would be good to extend the concept to the sfc-provider API so than an asynchronous API is available project wide.

      An initial approach could be:

      New module

      sfc-util/sfc-datastore-utils

      that will hold general asynchronous access utilities that could be
      used to access not only sfc data store but also other data stores. For
      example, we could move there the following utility classes/methods from
      sfc-genius:

      • SfcGenius::toCompletableFuture
        Converts to google guava ListenableFuture to the standard JDK8
        CompletableFuture
      • SfcGeniusAbstractReader::doRead
        Handles absence of optional as an Exception
      • SfcGeniusAbstractReader::doReadOptional
        Converts google guava Optional to standard JDK8 optional

      Then we could start working on a parallel asynchronous API on the
      sfc-provider module i.e. "async-api". As we enrich that API, the sync
      API can be refactored to wrap the async-api converting it to synchronous.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jaicaa Jaime CaamaƱo Ruiz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: