Skip to content

Refactor TripleStoreService to be compatible with NextGraph #1263

Description

@srosset81

The current TripleStoreService interacts directly with the Fuseki API. We will keep this service, but we will create another one which will interact with the NextGraph API and take into account its particularities (such as sessions handling, and URIs transformation)

https://git.nextgraph.org/NextGraph/nextgraph-rs/src/branch/master/ng-sdk-js/app-node/index.js

  • Rename TripleStoreService to FusekiTripleStoreService
    • Remove references to "secure dataset"
    • Remove 'X-SemappsUser' from Fuseki calls
  • Create a NgTripleStoreService (also named "triplestore", and with the same actions)
  • Sessions handling
    • It's better if sessions are not opened/closed on every request, as there are some informations that are put in memory. But it's also better if the sessions are not kept forever open, to free up that memory.
    • Every time we access a dataset, get the session ID associated with this dataset (NextGraph will open the session if it is not already opened)
    • Keep track in memory of the latestAccessTime of each session
    • Every 24h (for example), setup a cron to look for sessions which have not been used in the past 24h, and close them.
  • TripleStoreAdapter
    • The adapter should still work with NextGraph. The dataset will need to be the UUID provided by NextGraph so, for the AuthAccountService, we will need to store somewhere this UUID.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions