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 Thursday, 26 March 2026 15:32:32 UTC