Live data from Hacker News

SPARQL Protocol for RDF

w3.org

31–40 of 53 posts

Re: SPARQL Protocol for RDF

#31

Earlier quoted context omitted.

GraphQL, though, is a bit of a lie nomenclature-wise. As I've experienced it, it's got nothing much to do with graphs, at least not in the sense that SPARQL deals with triples that form a graph. In this department I am really interested in TinkerPop [0]. I would love, some day, to spend some more time with triple stores, RDF and semantic technologies. [0] http://tinkerpop.apache.org/docs/current/reference/

You might really enjoy datomic (www.datomic.com). Everything is stored as entity attribute value time and you query with a dialect of datalog. You can check out www.learndatalogtoday.org to get a flavor.

Datomic, though, isn't Datalog syntax at all.

I've got nothing against Datomic, but can't help to think learndatalogtoday is outright false advertising by trying to capture "Datalog" as SEO term for a proprietary graph database which has nothing to do with Datalog/Prolog.

The point of Datalog is that it's a subset of Prolog syntax, implying that engines can be reasonably exchanged for one another. But this is only possible with real Datalog, or SPARQL for that matter.

Re: SPARQL Protocol for RDF

#32
post #14

Earlier quoted context omitted.

You just keep thinking that until you see the god awful mess of REST apis that happens when you need to make an endpoint for every single slightly different query.

Yeah, that's kind of how APIs have to work. It turns out it's not feasible or desirable to just let arbitrary people make arbitrary queries. SPARQL doesn't make it any more feasible, it just ignores feasibility.

> It turns out it's not feasible or desirable to just let arbitrary people make arbitrary queries.

GraphQL/Relay and Falcor are trying to make it feasible. And I think it's definitely desirable from a consumer point of view, at least.

Re: SPARQL Protocol for RDF

#33

Anybody can share some light on companies that uses semantic web technologies? Currently at university have a semantic web class but I am finding it difficult where the use case are to create value for business or startup.

I believe Schema.org uses (/can use?) linked data that e.g. Google can again use to provide more relevant information about your content: https://developers.google.com/schemas/

Re: SPARQL Protocol for RDF

#34
I love SPARQL, although I often say it causes problems for developers but solves problems for organizations.

I know I am not in the average developer sphere, but working as a data provider to the wider public (ok scientific public) SPARQL is fantastic. First is that classic rest+json give data but do not allow analytics. Second is that SPARQL has federation. While CPU time wise it is inefficient for scientists its saves them months trying to get a local copy of the db setup.

SPARQL implementations are reasonably efficient and certainly do not need to be less efficient than SQL stores (even if they often are). However, as it is a query language not an implementation it can behave completely different. i.e. it can have great K/V performance with relatively poor analytics e.g. Marklogic or Oracle NoSQL SPARQL. or poor K/V perf but good analytic e.g. virtuoso or Oracle Semnet on its RDBMS. You can switch implementation and have completely different performance characteristics without needing to redo your data model etc...

As lead developer for the public facing rest and sparql endpoints of the UniProt consortium I know which is cheaper to run, SPARQL by an order of magnitude even if it uses more hardware.

Even inside the consortium developers who should have easy access to our SQL databases use our public SPARQL endpoint because it is easier to do so. That includes developers who have been writing SQL for decades and are not afraid of an explain plan. Opening a webpage is just quicker than getting SQL developer started and requires a whole lot less of tunneling.

Also a 1.5Tb on disk database such as sparql.uniprot.org is not going to be fun in all cases. The equivalent spread over the different production SQL databases is no fun either and no smaller (in this case actually federated until recently with oracle links, now some are postgres).

Re: SPARQL Protocol for RDF

#35
post #21

Earlier quoted context omitted.

Triple-stores can, but don't necessarily, layer on top of SQL databases. Jena has (had?) a triple-store engine that used JDBC to store the triples in a traditional relational database, but it's been deprecated for years in favor of a specialized engine designed specifically for storing RDF. I can't speak for other triple-stores as Jena is what we use, but I can say that comparing SPARQL queries against Jena TDB to SQ…

comparing SPARQL queries against Jena TDB to SQL queries on MySQL or Postgres is like comparing apples and kangaroos. In the sense that apples rot and Kangraroos are amazing animals which can do just about anything? Because otherwise the comparison seems completely apt. Jena works for RDF data. But the OP is correct in their broader point that RDF is rarely a good choice and SPARQL is a pretty horrible solution for q…

> And if you add the "standardized fields" thing it also matches the REST interface+RDBMS+SQL comparison the OP made.

The standardization in REST is basically "read stuff" and "write stuff". For everything else you're supposed to look up the API docs and write a specialised client.

I can query a SPARQL endpoint for a list of people and their friends, sorted by age - without knowing anything about that endpoint. I can also merge results from different endpoints without worrying whether they use slightly different data formats.

Re: SPARQL Protocol for RDF

#36
post #14

Earlier quoted context omitted.

You just keep thinking that until you see the god awful mess of REST apis that happens when you need to make an endpoint for every single slightly different query.

Yeah, that's kind of how APIs have to work. It turns out it's not feasible or desirable to just let arbitrary people make arbitrary queries. SPARQL doesn't make it any more feasible, it just ignores feasibility.

> It turns out it's not feasible or desirable to just let arbitrary people make arbitrary queries.

It turns out where and why exactly?

Re: SPARQL Protocol for RDF

#37

Anybody can share some light on companies that uses semantic web technologies? Currently at university have a semantic web class but I am finding it difficult where the use case are to create value for business or startup.

Yes, for example at Wallix, we created awless.io a CLI for AWS, that uses RDF (https://github.com/wallix/triplestore) to model cloud data. So far this linked data has help us since it is loosely coupled and has graph-like properties.

Re: SPARQL Protocol for RDF

#38
post #35
post #21

Earlier quoted context omitted.

comparing SPARQL queries against Jena TDB to SQL queries on MySQL or Postgres is like comparing apples and kangaroos. In the sense that apples rot and Kangraroos are amazing animals which can do just about anything? Because otherwise the comparison seems completely apt. Jena works for RDF data. But the OP is correct in their broader point that RDF is rarely a good choice and SPARQL is a pretty horrible solution for q…

> And if you add the "standardized fields" thing it also matches the REST interface+RDBMS+SQL comparison the OP made. The standardization in REST is basically "read stuff" and "write stuff". For everything else you're supposed to look up the API docs and write a specialised client. I can query a SPARQL endpoint for a list of people and their friends, sorted by age - without knowing anything about that endpoint . I ca…

"Standardized fields" here meant columns in a relational database, things you can index and look up quickly. "Birth date" would be such a field that you'd hope would be standardized, for example.

> I can query a SPARQL endpoint for a list of people and their friends, sorted by age - without knowing anything about that endpoint.

No you can't. I am certain that you can't.

To do this, you would need:

- A social networking service that uses SPARQL

- People to actually use that service

- Knowing the schema that would represent things like "friend" and "age"

- A model of permissions that indicates that somehow you're allowed to know the age of people's friends (seriously, how are you allowed to know this, that's creepy)

- A way to express that permission alongside your SPARQL query, which probably means you need to expand the query to include a representation of your identity and permissions

- A way for the SPARQL endpoint to authenticate that you have that permission (you will definitely need to look up API docs for this, as it will involve sending some sort of crypto token out-of-band)

- A container format for the RDF responses you get that can express things like "you don't have permission for that query"

Re: SPARQL Protocol for RDF

#39
post #36
post #14

Earlier quoted context omitted.

Yeah, that's kind of how APIs have to work. It turns out it's not feasible or desirable to just let arbitrary people make arbitrary queries. SPARQL doesn't make it any more feasible, it just ignores feasibility.

> It turns out it's not feasible or desirable to just let arbitrary people make arbitrary queries. It turns out where and why exactly?

Denial of service.

Re: SPARQL Protocol for RDF

#40

Anybody can share some light on companies that uses semantic web technologies? Currently at university have a semantic web class but I am finding it difficult where the use case are to create value for business or startup.

Facebook Open Graph crawlers use RDF in HTML head-meta elements conveying data about authors of web pages. Similarly, Google Corporate Contacts extracts RDF from web pages (but can also use JSON microdata). W3C's newly published open social standard is based on RDF (as JSON-LD) I believe. RDF and SPARQL has lots of uses in libraries and bibliographic apps such as citation managers, as well as in publication of open d…

Does Facebook now actually do RDFa-compliant processing for OGP? Back when OGP was introduced they didn't. https://lists.w3.org/Archives/Public/www-archive/2011Apr/006...
Post reply on HN