rdf

Steven Deobald 2020-10-13T04:46:03.082200Z

Not sure why I wasn't expecting to find the Stakeholders list under Community. :woman-facepalming: Thanks! I'd love to know about more LOD projects... understanding the surface area will help make more informed decisions as the project plods forward.

Steven Deobald 2020-10-13T04:52:04.082400Z

rdf4j .... offers an easy-to-use API that can be connected to all leading RDF database solutions. -- I'm still finding this whole space a bit confusing. It seems like Jena actually does all the database work itself (maybe?) but RDF4j relies exclusively on a third-party triplestore? https://en.wikipedia.org/wiki/Comparison_of_triplestores sheds a little light on the situation but I'm still a bit unclear who/what is writing data to disk in these different setups. šŸ˜‰

2020-10-13T08:16:00.090800Z

@steven427 Ok I asked some friends and colleagues about some of the bigger projects in the heritage/museums/library/arts/humanities space hereā€™s some more: The british museumā€™s catalog (this is the one I remembered but couldnā€™t quite find): https://www.britishmuseum.org/collection/object/W_1892-0516-351-a (looks like theyā€™ve hidden or removed their public sparql endpoint, but the structure of the collections is clearly SKOS - I have it on good authority theyā€™re also using cidoc that I mentioned in the thread) Another big one The library of congress: https://id.loc.gov/ Europeana ā€” which is a huge cross europe collaboration to connect the european heritage sector, through various projects based around linked data etcā€¦ https://pro.europeana.eu/ e.g. see here for one of their many big projects: https://www.europeana.eu/en try searching for e.g. ā€œvan goghā€ or historiana here: https://historiana.eu/ plus many othersā€¦ Also the British Library: https://bnb.data.bl.uk/ Also all UK legislation is represented/managed as a repository of linked data, giving URI identifiers for everything on the official site here: https://www.legislation.gov.uk/developer/uris

2020-10-13T09:02:32.093500Z

Ok asked another friend who works for a client of ours who used to work at the BBC on their linked data platforms > 4 years agoā€¦ This is what he said about heritage orgs that he knows of who ha(d|ve) linked data projects in the UK at least: > BBC themselves, The National Archives, British Museum, National Library Wales, National Library Scotland, Rijksmuseum, Getty (thesauri for artists, geography and others), Wellcome, Archaeology Data Service, Peopleā€™s Collection Wales, Science Museum, University of Manchester Image Collection, Tate Gallery, BFI Archive Collections, Natureā€¦

2020-10-13T09:04:52.095600Z

BBC was a big one obviouslyā€¦ their news publishing and editorial processes uses linked data so journalists can cross reference articles and topics/articles when writing them, and also IIRC the olympics, and I think football coverage was/is done on linked dataā€¦ though I could be wrong about the footy.

Steven Deobald 2020-10-13T10:40:57.097100Z

@rickmoynihan This is a great list! Thanks so much for taking the time to compile this. Before it's lost to the sands of Slack-is-the-worst-service-possible-for-something-like-Clojurians (:face_with_rolling_eyes:) do you know if this channel is logged somewhere?

2020-10-13T10:43:46.097300Z

Itā€™s logged here: https://clojurians-log.clojureverse.org/rdf

šŸ™ 2
quoll 2020-10-13T18:34:51.104Z

@simongray Sorry I was not online yesterday. Iā€™ve only just seen your comments now. In general, I like @samirā€™s responses. "foo" and "foo"@en are different literals. In fact, for RDF 1.0, there were 3 distinct types of string: ā€¢ "foo" was a Simple Literal ā€¢ "foo"^^<xml:string> was a Typed Literal ā€¢ "foo"@en was a simple literal with a Language Tag All 3 were distinct, and I canā€™t tell you the grief this caused. It was a relief when RDF 1.1 was introduced and gave all simple literals (that didnā€™t have a language tag) a datatype of xml:string. Those with a tag are now rdf:langString

šŸ‘ 1
quoll 2020-10-13T18:36:26.105800Z

In terms of SPARQL stores, there are requirements on correctness, but performance may be terrible. In general, Jena worked hard for correctness, but typically did so with naĆÆve code. Over time, this was reimplemented for better performance.

quoll 2020-10-13T18:39:34.108400Z

Generally, most stores get indexed around triples, and not strings. The store I worked on (Originally called Tucana, then Kowari, and finally Mulgara) had the option to use a Lucene index on strings, and extended the query language to allow for Lucene lookups. But SPARQL was intentionally technology agnostic, so how you might implement string indexing is not considered.

quoll 2020-10-13T18:41:50.110500Z

For instance, a Patricia index may be used for all strings, and then any queries that include a regex could convert that operation into an index lookup. However, Iā€™m not aware of anyone who did that (we started on Tucana, but lost funding). Consequently, I think that most regex queries are managed exclusively as filtersā€¦ and that will never scale.

quoll 2020-10-13T18:46:14.113500Z

As for languagesā€¦ the idea of tagging is to provide semantics for a group of letters. The simple literal "chat" is just a sequence of 4 unicode characters. However, "chat"@en has a semantic that means a conversation, and "chat"@fr has a semantic that means a male cat. These semantics were considered important to capture

šŸ’Æ 2
simongray 2020-10-14T13:38:58.148200Z

I still find it weird and not every ergonomic that in a system where knowledge is otherwise defined using named relations, for some reason this particular information has to be hardcoded into strings. šŸ˜› but thank you for the in-depth history lesson.

simongray 2020-10-14T13:46:40.148500Z

@quoll btw Paula, if I may ask, what is the end goal of Asami? the readme says it is inspired by RDF, but it doesnā€™t really mention RDF otehrwise. If I wanted to use it as a triplestore for an existing dataset I guess I would have to develop code for importing RDF files and other necessary functionality?

quoll 2020-10-14T13:47:28.149400Z

Thatā€™s right, you would. Though I have an old project that would get you some of the way there

quoll 2020-10-14T13:48:55.149600Z

Ummmā€¦ the end goal. I only have vague notions right now. I can tell you why I started and where itā€™s going šŸ™‚

simongray 2020-10-14T13:49:06.149800Z

Please do šŸ™‚

quoll 2020-10-14T13:50:14.150Z

It was written for Naga. Naga was designed to be an agnostic rule engine for graph databases. Implement a protocol for a graph database, and Naga could execute rules for it

quoll 2020-10-14T13:51:08.150200Z

I thought I would start with Datomic, then implement something for SPARQL, OrientDBā€¦ etc

quoll 2020-10-14T13:51:47.150400Z

But I made the mistake of showing my manager, and he got excited, and asked me to develop it for work instead of evenings and weekends. I agreed, so long as it stayed open source, which he was good with

quoll 2020-10-14T13:53:27.150600Z

But then he said that he wanted it to all be open source, and he wasnā€™t keen on Datomic for that reason. So could I write a simple database to handle it? Sure. I had only stopped working on Mulgara because I donā€™t like Java, so restarting with Clojure sounded like a good idea (second systems effect be damned!) šŸ™‚

quoll 2020-10-14T13:54:24.150800Z

Initially, Asami only did 3 things: ā€¢ indexed data ā€¢ inner joins ā€¢ query optimizing

simongray 2020-10-14T13:54:46.151Z

hah, ok, so itā€™s mainly because your manager dislikes closed source software? That is a fantastic 1st world problem to have.

quoll 2020-10-14T13:55:03.151200Z

yup

quoll 2020-10-14T13:55:15.151400Z

But I did it in about a week, so it wasnā€™t a big deal

simongray 2020-10-14T13:55:20.151600Z

nice

quoll 2020-10-14T13:55:36.151800Z

The majority of that was the query planner

quoll 2020-10-14T13:56:21.152Z

you could argue that it wasnā€™t needed (Datomic doesnā€™t have one), but: a) Iā€™d done it before b) rules could potentially create queries that were in suboptimal form. Iā€™ve been bitten by this in the past

quoll 2020-10-14T13:56:44.152200Z

Some time later, he called me and asked me to port it to ClojureScript. So it moved into the browser

quoll 2020-10-14T13:57:07.152400Z

Since then, Iā€™ve been getting more requests for more features. Right now it handles a LOT

quoll 2020-10-14T13:57:31.152600Z

Thatā€™s when I started a new pet project (evenings and weekends)

simongray 2020-10-14T13:58:04.152800Z

It seems like a lot of work is happening in this space at the moment with Asami, Datalevin, Datahike, Datascript. Kind of exciting.

quoll 2020-10-14T13:58:17.153Z

This is for backend storage. It is loosely based on Mulgara, but with a lot of innovations, and new emphasis

quoll 2020-10-14T13:58:48.153200Z

Honestly, if Iā€™d known about Datascript (which had started), then I would have just used that

quoll 2020-10-14T13:59:24.153400Z

Anywayā€¦ I mentioned the backend storage, and several managers all got excited about it. So THAT is now my job

simongray 2020-10-14T13:59:34.153600Z

HAHA

quoll 2020-10-14T13:59:44.153800Z

And for the first time, theyā€™ve given me someone else to help

quoll 2020-10-14T14:00:29.154Z

Heā€™s doing the ClojureScript implementation (over IndexedDB)

quoll 2020-10-14T14:01:16.154200Z

Iā€™m doing the same thing on memory-mapped files. But itā€™s behind a set of protocols which makes it all look the same to the index code

quoll 2020-10-14T14:02:12.154400Z

I also hope to include other options, like S3 buckets. These will work, because everything is immutable (durable, persistent, full history, etc)

simongray 2020-10-14T14:02:34.154600Z

Do you see a future where a common protocol like ring can be developed for all of these Datomic-like databases? So much work is happening in parallel.

quoll 2020-10-14T14:02:56.154800Z

That was actually exactly the perspective that Naga has!

quoll 2020-10-14T14:04:14.155Z

The protocol that Naga asks Databases to implement is oriented specifically to Nagaā€™s needs, but it works pretty well

simongray 2020-10-14T14:04:31.155200Z

I see. So perhaps itā€™s just a question of willingness to integrate.

quoll 2020-10-14T14:06:11.155400Z

Well, the way Iā€™ve done it in Naga has been as a set of package directories which implement the protocol for each database. Unfortunately, Iā€™ve been busy, so I only have directories for Asami and Datomic

quoll 2020-10-14T14:06:18.155600Z

But they both work šŸ™‚

quoll 2020-10-14T14:06:27.155800Z

I imagine that it wouldnā€™t be hard to do Datascript

quoll 2020-10-14T14:07:09.156Z

The main thing that Datascript/Datomic miss is a query API that allows you to do an INSERT/SELECT (which SPARQL has)

simongray 2020-10-14T14:11:52.156200Z

I need to get some real work done before heading ā€œhomeā€ for today, i.e. moving from the desk to the sofa. Thanks for an interesting conversation. Iā€™m keeping an eye on Asami (and now naga). Really interesting projects.

quoll 2020-10-14T14:12:42.156500Z

Thank you

quoll 2020-10-14T14:13:13.157400Z

They look quiet right now because Iā€™m working on the storage branch

2020-10-14T14:57:06.157600Z

@quoll: Sounds like youā€™ve both had a very interesting career, and currently have a dream job. Most managers would never entertain the need to implement a new database; though it sounds like youā€™ve done it many times. :thumbsup: @eric.d.scott spoke here a while back about doing something that sounded similar; providing some common abstraction across RDF and other graph stores / libraries. I definitely see the appeal; but I donā€™t really understand the real world use case. Why is it necessary for your business? Swapping out an RDF database for a different RDF one can be enough work as it is (due to radically different performance profiles), let alone moving across ecosystems. Or am I misunderstanding the purpose of the abstraction; is it to make more backends look like graphs? Which is a use case I totally get šŸ‘Œ. Regardless Iā€™d love to hear more about your work

quoll 2020-10-14T14:57:41.157800Z

only twice: Mulgara and now Asami

šŸ˜‚ 1
quoll 2020-10-14T14:58:15.158Z

At work, there is no impetus to be able to swap things out šŸ™‚

quoll 2020-10-14T14:58:47.158200Z

but any libraries that use a graph database have motivation to do it

quoll 2020-10-14T14:59:09.158400Z

particularly if the library is supposed to have broader appeal than for just the team developing it

quoll 2020-10-14T14:59:51.158700Z

For instanceā€¦ there is no need for Asami to have a SPARQL front end, but itā€™s a ticket, because Iā€™d like to make it more accessible to people

2020-10-14T15:00:16.158900Z

yeah ok thatā€™s fair

quoll 2020-10-14T15:00:23.159100Z

Besides, if I donā€™t implement a SPARQL front end, it will be embarrassing!!!

2020-10-14T15:00:37.159300Z

lol

quoll 2020-10-14T15:00:50.159500Z

For anyone readingā€¦ I was on the SPARQL committee

2020-10-14T15:00:56.159700Z

I donā€™t know how you could live with yourselfā€¦ šŸ˜†

quoll 2020-10-14T15:01:12.160Z

exactly!

2020-10-14T15:01:23.160200Z

ahh well in that caseā€¦ I donā€™t know how you could live with yourself šŸ˜

2020-10-14T15:04:52.160400Z

If you donā€™t mind me asking, if you could re-live being on that committee, knowing what you do now, what would you do differently?

quoll 2020-10-14T16:12:21.160600Z

Well, it was a learning experience for me. A number of interests were on the committee to push the standard in a direction that most suited their existing systems. So rather than introducing technical changes, or working against specific things, I would have focused more on communication with each member of the committee. Not that I think I did a terrible job, but I could have done better

quoll 2020-10-14T16:19:41.160800Z

From a technical perspective, I would have liked to see a tighter definition around aggregates, with algorithmic description.

quoll 2020-10-14T16:20:48.161Z

But thatā€™s just because I find a bit of flexibility in some of the edge cases there. Also, having a default way to handle things, even if theyā€™re not the ideal optimized approach, would have been nice to have

quoll 2020-10-14T16:21:18.161200Z

That said, thatā€™s essentially what Jena sets out to do. They try to be the reference implementation, and they most certainly donā€™t take the optimized approach

quoll 2020-10-14T16:22:19.161400Z

The early versions of Jena saved triples as a flat list, and resolved patterns as filters against them šŸ˜–

quoll 2020-10-14T16:22:58.161600Z

Andy had some long conversations with me about Mulgaraā€™s storage while he was planning out Fuseki

quoll 2020-10-14T16:26:31.161800Z

Also @rickmoynihan: > Sounds like youā€™ve both had a very interesting career, and currently have a dream job Yes! I have certainly been spoiled! I honestly donā€™t know how I have managed to keep coming back to these things, but Iā€™m happy that I have. Of course, Iā€™ve done other things in the between, but even those can be informative (for instance, Iā€™ve had opportunities to work with both Datomic and OrientDB)

quoll 2020-10-14T16:26:58.162Z

Oh! I just thought of something I could have mentioned in the SPARQL committee that continues to frustrate meā€¦ transactions!

quoll 2020-10-14T16:28:30.162200Z

Itā€™s possible to send several operations through at once. e.g. An insert; an insert/select; a delete. But there are limits on what you can manage there. There are occasions where transactions are important.

quoll 2020-10-14T16:30:22.162400Z

Datomic is frustrating that way too, because Naga needs it. (I manage it by using a with database, and once Iā€™m done, I replay the accumulated transactions with transact)

2020-10-15T11:05:26.162600Z

@quoll: fascinating, I agree it would have been nice to have a standard for transactions.

quoll 2020-10-13T18:47:51.114200Z

Especially when the original intent of RDF was to provide semantic linkages (hence the name, ā€œSemantic Webā€)

quoll 2020-10-13T18:54:53.117100Z

Also, on some specific questions: > implemented languages as equality-distorting aspects of strings literals Languages change the value. You can consider that as ā€œequality-distortingā€, but it can be avoided. For instanceā€¦ > If I am to query for my own name in an RSF resource how should I refer to it? ā€œSimonā€@en, ā€œSimonā€@da, and 6000 other entries? Your query could include: WHERE { ?me foaf:name ?name . FILTER(str(?name) = "Simon") }

quoll 2020-10-13T18:55:57.117800Z

A good implementation (and Iā€™m not saying that your SPARQL store will be) could turn that FILTER operation into an index lookup

quoll 2020-10-13T18:56:43.118600Z

Jena never used to do that, but they may have updated lately. This might be an excuse for me to check in and see how Andy is doing šŸ™‚

samir 2020-10-13T19:21:53.126800Z

To push the argument further, the concept of equality is quite complex as you can see in https://clojure.org/guides/equality . RDF makes no special treatment regarding equality. AFAIK two terms are equal when they have the identical long notation. SPARQL being a query language makes some decisions regarding equality in some functions. To me it feels like a good compromise as the goal of the semantic web is to enable the articulation of arbitrary knowledge and data domains

2020-10-13T21:31:41.130600Z

this is a great example

2020-10-13T21:31:51.130800Z

Yeah itā€™s the lexical form that strictly speaking should be used, in combination with the datatype uri, lang string etc Though some stores will do some implicit coercions, e.g. stardog will by default canonicalise various numeric types e.g. xsd:bytes into xsd:integer unless you switch that off. https://www.w3.org/TR/rdf-concepts/#section-Literal-Equality