sirixdb / sirix

SirixDB is an an embeddable, bitemporal, append-only database system and event store, storing immutable lightweight snapshots. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach.
https://sirix.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 251 forks source link

Issue #537 #726

Closed ElenaSkep closed 3 weeks ago

ElenaSkep commented 3 months ago

A websocket client detects the changes made in a database/resource and sends them to a websocket server.On the console where you run sirix you can see the change that was made. What you can do is create a Websocket server (we created one with node.js) which receives the changes from the db and can broadcast them to all connected clients (we implemented those also with node.js). It should be noted that we do not provide the code for the server and the clients that we used to run it.

welcome[bot] commented 3 months ago

Thanks so much for opening this pull request and for helping to improve SirixDB 🚀

ElenaSkep commented 3 months ago

I would like to state that in JsonNodeTrxImpl.java our changes are 28 lines (2732-2759) and the rest of the code is the same.

JohannesLichtenberger commented 3 months ago

A direct websocket dependency sadly doesn't make much sense, as sirix-core along with other bundles should be usable without a server.

Instead, we already have the sirix-rest-api where a new route should be added along with authorization checking for read permission and along with a simple pub/sub mechanism. We have to figure out if we can add a method, which is not leaked into the API to get the updates instead of hardcoded in the method, which writes the changes to disk.

So, instead of the NodeJS based backend you used we already have a server based on Vert.x and Kotlin in sirix-rest-api. Can you implement this over there as a separate route as mentioned before (instead of the websocket client we'd be on the server already)?

ElenaSkep commented 3 months ago

Thank you for taking the time to look at our idea. With the addition of websockets the sirix-core will function as before and the only difference is that the message will be able to be broadcasted .The websockets don’t interfere with the way sirix-core functions. Regarding to the sirix-rest-api it relies heavily on keycloak which still causes problems with running it.

JohannesLichtenberger commented 3 months ago

Well, it seems as of yesterday the tests fail due to a docker image issue again. I guess it's finally time, that we have to update Keycloak and to get it up-and-running again.