Re: Event bus use case (& intro)

Hi Danny, welcome here!

Thanks for joining us and for explaining the projects you are working on.

Reading the history of emails, which isn't that long, will give you some 
good insights I believe, on what can be done for CRDT of RDF.

Generally, the local representation of a CRDT is often a DAG (Directed 
Acyclic Graph).

You can use a "bus" to transport each node (an operation) in this 
"graph" (not to be confused with an RDF graph), but the synchronization 
mechanism is not as trivial as gossip, because you will need to respect 
the partial causal order.

In my work, I use a causal reliable broadcast in the form of a pub/sub. 
https://docs.nextgraph.org/en/network/#pubsub


other sync protocols exist out there.

Some use an event stream, like LDES, but they only deal with inserts of 
triples, never delete, which makes the whole thing much more simple, as 
it is then monotonic. https://semiceu.github.io/LinkedDataEventStreams/


For the mapping of RDF and SPARQL into and from javascript or typescript 
objects in the front-end, I use LDO https://ldo.js.org/


Hope this helps,

Cheers,
Niko

On 08/06/2025 12:49, Danny Ayers wrote:
> I've got a quasi-use case, implementation target pattern for RDF-CRDT. 
> I've not caught up with the list archives yet, thought I might as well 
> dump this here while it's fresh in my mind.
>
> Where I'm coming from: I've been looking at browser apps with two 
> things in mind - front end for various server-oriented systems; apps I 
> want to use myself.
>
> ## History
> A few years back I played around with an architectural pattern I 
> called "SPARQL Diamonds" for interactions between browser and a SPARQL 
> store. This was intended for a bunch of different task-specific apps 
> (blog engine, wiki, outliner, bookmarker...) that all address a common 
> heterogenous graph. The apps had a browser-local, non-RDF data model. 
> User content from forms or whatever would be templated into SPARQL 
> UPDATE queries, any pulls from SPARQL SELECT would be templated from 
> JSON results into the app's model. Client, server with templaters in 
> between, diamond shape. It worked nicely for what it was.
>
> More recently I decided to reboot all this. In the interim PWAs have 
> become a thing, RDF in the browser is viable, etc etc.
>
> ## Now
> I've wound up sticking together the regular user (me)-oriented bits in 
> to one app "Squirt" [1], RDF/SPARQL editing in another, "Atuin" [2] 
> and other bits designed for specific server-ish things I'm working on 
> elsewhere [3]. They use RDFJS/RDF-Ext under the hood. All very much 
> in-progress, nothing particularly usable right now.
>
> So *anyway*...
>
> ## Event Bus
> I've been hopping between Node.js and vanilla browser JS (with npm, 
> webpack, vitest). A mechanism that seemed to make sense is an event 
> bus I could use in either. So I made a quick & dirty lib - "evb" [4]. 
> Even though there's very little to it, I've published it as an npm 
> package to try and keep some consistency across the things I make.
>
> It occurred to me that I was missing a trick with inter-app comms. I 
> googled RDF CRDT...and here I am.
>
> I'm thinking that a potential app setup would be to use an event bus 
> internally, with a single source of truth dataset(s) being replicated 
> across CRDT. From 1.000 metres they do look kinda similar. Thoughts?
>
> ## Intro
> I'm Danny Ayers, @danja in some other places. Homepage at [5]. Located 
> in Italy, dog called Claudio. I've been around semweb tech a while, 
> occasionally involved in W3C groups. Also have some history around 
> this other AI, have recently been looking at ways of encouraging 
> symbiosis between LLMs and the Rather Enormous Global Graph Augmented 
> Environment.
>
> Cheers,
> Danny.
>
> [1] https://github.com/danja/squirt

> [2] https://github.com/danja/atuin

> [3] https://github.com/danja/tensegrity

> [4] https://github.com/danja/evb/

> [5] https://danny.ayers.name

>
> -- 
> ----
>
> https://danny.ayers.name <http://hyperdata.it/danja>
>

Received on Sunday, 8 June 2025 10:06:26 UTC