[SFC-170] Provide an asynchronous API to SFC data store in sfc-provider Created: 08/Nov/16  Updated: 19/Oct/17

Status: Open
Project: sfc
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Jaime CaamaƱo Ruiz Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

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.


Generated at Wed Feb 07 20:38:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.