Re: async

Hi Samu,

You may want to have a look at the RDF/JS stream spec: https://rdf.js.org/stream-spec/

This spec was created before the dataset spec.

One of the goals of the dataset spec was to simplify the use of sources when you don’t need asynchronicity.
But if you do need it, then Source/Sink/Store are better candidates.

Within our Comunica query engine (where async data retrieval of remote sources is very important),
we heavily rely on these stream-based APIs,
as the sync-oriented Dataset would lead to performance issues.

Kind regards,
Ruben Taelman



On 25 Mar 2026, at 22:47, Samu Láng <langsamu@hotmail.com> wrote:

Why are none of the methods in RDF/JS asynchronous and could we make them such?

In a recent discussion of the Solid Open-source Tools group<https://hackmd.io/_jbi_VaRRP69YjJEBdxeDg#RDFJS-Async> (whose members tend to be heavily invested in both RDF and JavaScript), I had asked whether I was the only one struggling with the lack of asynchronicity in RDF/JS. Specifically I mean asynchronicity in the sense of the `async` and `await` keywords in JavaScript, of methods that return `Promise`s. As an implementer of software that adheres to the RDF/JS: Data model specification and the RDF/JS: Dataset specification, I frequently come up against the problem of using synchronous methods like `DatasetCore.match` in contexts that favor it nowadays like network IO and background processing.. My fellow implementers/users of RDF/JS reported that they struggle with the same issue and tend to go through hoops to make RDF/JS work in 'modern' context.

My question is generic and open: Was there any thought given to this? Was it discarded? Or have we just come some way since? How would we go on about adding asynchronicity to RDF/JS? Is there history worth reading about the topic?

I have searched the mailing list and GitHub for relevant information and haven't found any. I apologize if I'm reopening a long dormant debate and would appreciate pointers to previous discussion.

Received on Thursday, 26 March 2026 07:53:15 UTC