y-crdt / yrb-actioncable

An ActionCable companion for Y.js clients.
https://y-crdt.github.io/yrb-actioncable/
MIT License
43 stars 5 forks source link

yrb-actioncable sync awareness #97

Open deantheboss opened 4 months ago

deantheboss commented 4 months ago

The awareness development is only left as a TODO, so it is impossible to track when the client side disconnects from the socket. I was wondering if you are aware of this issue and if so, are you planning to develop it, and if not, can I raise a pull request for it?

eliias commented 4 months ago

@deantheboss You usually implement Awareness client-side (https://docs.yjs.dev/api/about-awareness), but you can also access the content of the Awareness CRDT on the server. yrb has an implementation of the same data structure as well, so if you want to access the information you can → https://y-crdt.github.io/yrb/Y/Awareness.html.

The awareness development is only left as a TODO

Can you point towards the file where you found the TODO? I think it might help to add an Awareness example, but I do not necessarily think this needs to be implemented in the library.

can I raise a pull request for it?

Always welcome.

deantheboss commented 4 months ago

@deantheboss You usually implement Awareness client-side (https://docs.yjs.dev/api/about-awareness), but you can also access the content of the Awareness CRDT on the server. yrb has an implementation of the same data structure as well, so if you want to access the information you can → https://y-crdt.github.io/yrb/Y/Awareness.html.

thank you for reply.

The awareness development is only left as a TODO Can you point towards the file where you found the TODO? I think it might help to add an Awareness example, but I do not necessarily think this needs to be implemented in the library.

it's on https://github.com/y-crdt/yrb-actioncable/blob/main/gems/yrb-actioncable/lib/y/actioncable/sync.rb #50