-
Notifications
You must be signed in to change notification settings - Fork 12
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
Initial High Level spec including Dataset interface #95
Conversation
|
||
**Static/Factory methods:** | ||
|
||
- `static Promise<Dataset> import (Function factory, Stream stream)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the factory
parameter again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it forwards data factory which dataset should use https://github.com/rdfjs/representation-task-force/issues/79 but LowLevel API defines factory as Object with multiple methods not Function
I think we should clarify how Store and Dataset relate to each other. I think sometimes the same object might need to have both Store and Dataset interface... Related - rdf-ext-archive/discussions#21
Maybe Dataset could expose LowLevel Stream interfaces with properties
|
This gitter comment brought to my attention one of the distinctions between Dataset and Store https://gitter.im/linkeddata/rdflib.js?at=580e26dc684ccefd38a081fa Stores could do indexing, but Dataset would just provide more lightweight inteface for a set of quads, in many cases more convenient to use than a raw stream of quads. |
Isn't a Store an implementation of a Dataset then? |
As I understood @dmitrizagidulin rdflib.js would not implement distinct Store and Dataset. |
I think some sort of easy-to-use abstraction for dealing with sets of quads being passed around between functions is necessary. I find that one of the hardest thing to do in RDF land is creating the equivalent of simple objects like We experimented with (de)serialising RDF data to instances of a custom wrapper around N3's Store that adds chain-based features like
but felt that it still becomes too complex. We're now looking at a more descriptive approach via something like In any case, I think the API between Dataset and Store should be kept as different as possible to make life easier for implementors. |
@jacoscaz Indeed, simplerdf was actually the final trigger to get the RDF/JS work started. If all low-level libraries implement this spec, then simplerdf can be compatible with all of them. |
Can you explain a bit more? |
Besides conversation in rdf-ext-archive/discussions#21
We also had some discussion with @bergos during TF calls about possible requirement for Store interface anticipate using it for stores that provide interface to remote servers (LDP, SPARQL, Triple Patter Fragmetns ...) Which will have different requirements to Dataset which to my understanding supposed to just represent set of quads available in memory. |
This is where libraries can take their own approach to simplifying the process, such as with creating/inserting triples.
Like this? The output is shown here. I'll be releasing this w/ next version of graphy. |
@jacoscaz @blake-regalia Without specific application needs I cannot really judge what's required, but why not just JSON-LD? Like: {
"@context": {"@vocab": "http://example.com/"},
"@id": "http://example.com/s",
"power": true,
"dimming": 7
} |
I would like to shift the discussion, if and how we add it to the spec, to a later time and focus now on the stream interfaces. Of course everybody who want's to use or implement the API is invited to discuss technical details. This is not about about an application specific high level API like SimpleRDF or other mentioned libraries. We can make a wiki page for it and an issue to discuss it, but let's not mix topics here. |
@niklasl @blake-regalia yes, we're also experimenting with pre-compacting JSON-LD documents down to plain old JSON objects using shared contexts before passing data from RDF-aware components to non-RDF-aware components. |
How do we want to proceed here? |
If we decide to merge it let's create right away an Issue (or PR if someone feels up to it) which clarifies similarities and differences between Store and Dataset |
Can please everybody cast your vote to go with this proposition as initial draft for the high-level spec? This will lay the ground for the future topics discussed in #123, https://github.com/rdfjs/representation-task-force/issues/108, #100, #98. |
In favor of the new Dataset Spec, I would like to close this PR. |
This is mainly an entry point for other PR. The
Dataset
interface is a copy of the wiki page without the context, questions and links to RDF-Ext.