Hi!
(1) The results do not seem to be correct. The example
query related to
films returns 55 results, while on the official endpoint it returns 128.
It seems that this is not because of missing data, but because of wrong
multiplicities (the correct result has several rows repeated multiple
times). Is there an implicit DISTINCT applied in this service somewhere?
Are there any other changes from the normal SPARQL semantics?
You mean the results on
http://ldfclient.wmflabs.org/ or the results
returned directly from the endpoint?
Note that
http://ldfclient.wmflabs.org/ is just a demo. It's not a
production service, it's just a showcase of what can be done using LDF.
So it's possible SPARQL implementation there is somehow buggy or
different from others. I think it relies on
https://www.npmjs.com/package/sparqljs and
https://www.npmjs.com/package/ldf-client - however I can't really vouch
on what happens in that code. I'll try to see where the differences come
from, but not sure it's worth spending too much time debugging a demo
service. If however something is wrong with the patterns themselves that
would be a serious issue.
This example is just a demo of how pattern fragments enable to take
SPARQL work out of the server to the client. It's not intended as a
production SPARQL service :)
(2) It is really slow. The sample query took 55s on my
machine
(producing only half of the results), while it takes 0.2s on WDQS. I am
afraid that hard queries which would timeout on WDQS might take too long
to be used at all.
Well, comparing it to WDQS is not really fair :) It's a JS
implementation of SPARQL, running running in your browser and loading
data over the network. Still 55 s it too much - it finishes in around
10s for me. Maybe your network is slower?
I think if it is run on real hardware on stronger JS or Java engine
though it might be faster. Also, I'm sure there are other LDF clients,
such as Java one:
http://linkeddatafragments.org/software/
However, I would still like to try it with one of our
harder queries.
Can I use the service from a program (my harder queries have too many
results to be displayed in a browser -- this is why they are hard ;-)?
Yes. Please tell me if something goes wrong. You may want to use
non-browser client though.
Ideally, I would like to use it like a SPARQL service
that I send a
request to. Is this possible?
Not for this one. This is a triple pattern service, by design - it can
be used by a client-side SPARQL implementation but it does not include
one. Including full SPARQL implementation into it would be contradictory
- the whole point of this is to shift the workload to the client, if we
shift it back to the server, we're back to the regular SPARQL endpoint
with all the limitations we must put on it. However, I'm pretty sure
something like Client.js or Client.java mentioned above can do SPARQL
queries - it's how the demo works.
--
Stas Malyshev
smalyshev(a)wikimedia.org