Hello,
I am writing a Flask app that uses RDFLib to interact with a back end RDF store. I am testing with two different setups, one using the SPARQLUpdateStore connector and one using the Sleepycat one.
At the moment I am initiating the store connection in the Flask app initialization phase; which means that the connection stays open across requests, as long as the application is not restarted.
with the SPARQL/HTTP connector this seems to have no negative effect; with the Sleepycat connector performance degrades visibly after each request. I don't notice that with the SPARQL connector.
If I open and close the Sleepycat connection with each request, even a very simple operation operation on a small database takes more than 1 second.
I have two questions: 1) Is it best to open and close the Sleepycat connector after each request, or leave it open? And 2) Shall I use different strategies if I want to use the Sleepycat and SPARQL connectors interchangeably?
Thanks.