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.
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
latestAccessTimeof each sessiondatasetwill need to be the UUID provided by NextGraph so, for the AuthAccountService, we will need to store somewhere this UUID.