-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync API #104
Comments
Hi, what kind of synching are we talking about? Is the callbacks support not enough to sync changes in the local graph(s)? Thanks. |
Right. I meant sync as in "no callbacks". |
Got it, a synchronous API. You're right about the possibility of building a synchronous version of the API for the in-memory store. That was the case for the first version of the library that was implementing a synchronous engine for the non-persistent store and an asynchronus one for the persistent one. However the public interface was still asynchronous because in the execution of queries you have to interact with asynchronus code: a parser in a load query, an AJAX request loading a remote graph, etc. In the new version, I removed the asynchronous engine because it was increasing the complexity of the code a lot. It's really easier to mantain just a single asynchronous engine conected to the sync memory index/lexicon or the async IndexDB index/lexicon. It would still be possible with some refactoring to provide an API that would accept both, a callback and return the value at the same time if the result is available, but it would only work with the in-memory implementation and certain SPARQL queries. |
Would it be possible to provide a ( possibly restricted ) sync API to work with in-memory stores?
The text was updated successfully, but these errors were encountered: