Re: async

As I understand from a private conversation @Samu Láng<mailto:langsamu@hotmail.com> was after an async Dataset/DatasetCore interface.

I would suggest @Samu Láng<mailto:langsamu@hotmail.com> propose this interface in a PR to the RDF/JS repo - and details can be discussed in-line there.

Kind Regards,

Jesse Wright
DPhil Computer Science
Jesus College
[cid:8c7a6eb1-a8b9-4f32-913e-70aae54eb113]

mailto:jesse.wright@cs.ox.ac.uk
https://www.cs.ox.ac.uk/people/jesse.wright/
https://www.linkedin.com/in/jesse-wright-49823a132/
Book a meeting: https://cal.com/jesse-wright-zdbdal/public
Mobile: +44 7862 381 515
WhatsApp: +61 468 669 019

My work day may look different than yours. Please do not feel obligated to respond outside of your normal working hours.
________________________________
From: Jacopo Scazzosi <jacopo@scazzosi.com>
Sent: Thursday, March 26, 2026 3:32 PM
To: Samu Láng <langsamu@hotmail.com>
Cc: public-rdfjs@w3.org <public-rdfjs@w3.org>
Subject: Re: async

Hello Samu,

I’m the maintainer of quadstore [1], which also implements the RDF/JS Stream interfaces.

> Samu: I hear you, but the streams are not "asynchronous" in the way that you expect in JavaScript.

The Stream interfaces have been modelled on a subset of Node’s Readable interface. To that end, it should fall well within the expectations of anyone working with streaming.

However, I do agree that streaming is not the only form of asynchrony and that RDF/JS currently lacks something in-between the low-level streaming interface and the high-level synchronous interfaces. Quadstore itself offers helper methods such as .get() [2] and .put() [3] precisely because a lot of use cases are better served with a simpler, Promise-based API for exchanging arrays of quads while accommodating for the asynchronous nature of the store.

Best,
Jacopo.

[1]: https://github.com/quadstorejs/quadstore
[2]: https://github.com/quadstorejs/quadstore?tab=readme-ov-file#quadstoreprototypeget
[3]: https://github.com/quadstorejs/quadstore?tab=readme-ov-file#quadstoreprototypeput


> 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 (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 Monday, 30 March 2026 19:48:11 UTC