Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Rishabh Malhotra
    @Rishabh-malhotraa

    @Rishabh-malhotraa Yes, it's described in the awareness tutorial in docs.yjs.dev. It works the same as the codemirror editor.

    To what I understand after reading the docs, you have to just edit a portion for y-monaco adapter and I can take the code-mirror adapter as a reference, right?

    Raviteja Lingineni
    @rlingineni
    I was wondering if there were any exposed methods to use yjs kind of like sockets? For example, I want to mark that a button was pressed by all users
    Should I set a key called numClicks on the "awareness" object, and use 'change' event to capture changes
    or is there a better way I can go about it?
    ilovedesert001
    @ilovedesert001
    ERR_DATA_CHANNEL
    Has anyone encountered this error while using webRTC ?
    image.png
    ilovedesert001
    @ilovedesert001
    @dmonad
    This may seem to be a bug.
    When adding a large amount of data with transaction, it cannot be synchronized through webRTC .
    Will Hawker
    @whawker
    interesting, how "large" we talking?
    ilovedesert001
    @ilovedesert001
    image.png
    1000 ok , 8000 not working
    image.png
    Will Hawker
    @whawker
    hmmm, quick Google suggests max maybe 16kb? https://stackoverflow.com/a/35381583/2039219
    ilovedesert001
    @ilovedesert001
    I thought webRTC would send in chunks internal .
    ilovedesert001
    @ilovedesert001
    In lib0, is there a function to merge two(or more) unit8arrays ?
    ilovedesert001
    @ilovedesert001
    solved
    Large unit8array, first split them and sending one by one
    Rishabh Malhotra
    @Rishabh-malhotraa
    @dmonad Thank you so much for creating and maintaining yjs, previously for my hobby project I was using some other method for conflict resolution(OT) and faced some annoying bugs, but now I switched to yjs and everything works like a charm πŸ™Œ πŸ₯³.
    If anyone is interested in what I made:
    Source code: https://github.com/Rishabh-malhotraa/caucus
    Hosted on: https://caucus-app.herokuapp.com/
    ilovedesert001
    @ilovedesert001
    Great job
    Kevin Jahns
    @dmonad
    @ilovedesert001 This is tracked in the y-webrtc issues and there is already a fix by another user. But I can't integrate that fix yet
    Cool stuff @Rishabh-malhotraa Thanks for sharing! Also feel free to post this into discuss.yjs.dev
    Will Hawker
    @whawker
    Opened yjs/y-prosemirror#54 if anyone is available to review?
    1 reply
    ilovedesert001
    @ilovedesert001

    @dmonad
    hi , this is the one you mentioned .
    https://github.com/yjs/y-webrtc/pull/25/files ,

    It looks like he has completely switched to a new webRTC library , that maybe cause more problem .

    I added three new message types , and send yjs original message in a for loop .

    rtc.png
    rtc2.png
    Nick Odumo
    @nodumo

    Hi all, I am using YJS with TipTap.
    I ran into an issue where if I set the the value of the editor I end up broadcasting an append when the user enters the note..
    this.editor = new Editor({ content: content })

    Has anyone ran into issues with setting the initial state of the tiptap editor and then connecting to a provider?

    Will Hawker
    @whawker
    could it be Prosemirror trailing node behaviour? Automatically adding a paragraph to the end?
    Will Hawker
    @whawker
    I mean, I'm happy to open a PR, just don't know the implications of CRDT and Sets with their unique values behaviour
    Kevin Jahns
    @dmonad
    @whawker, I like the idea. First, you'd need to add a set encoder & decoder to https://github.com/dmonad/lib0/blob/b4f9a4865996093c3867e5e1e6ce0b9923fc8976/encoding.js#L445 (and the decoding library respectively). Make sure to write some tests for it encoding empty and large sets. Next, you can add Set to the above function and update the documentation. Even such a small change might involve a lot of work.
    Charanjit Singh
    @charanjit-singh_gitlab
    how to access connection that updated the document in updateHandler on update?
    Charanjit Singh
    @charanjit-singh_gitlab
    Where can I find implementation of emit('update' ....?
    in Y.Doc
    Ulion
    @ulion
    @dmonad encountered a specific ydoc deadloop (take very long time to load) on the other side of y-websocket, the source side is fine, but the receive side (no other provider) will dead loop (looks like), the sync message is 600k size. for such case, what shall we do to figure out what caused this?
    Ulion
    @ulion
    ζˆͺ屏2021-06-25 δΈ‹εˆ3.49.12.png
    ζˆͺ屏2021-06-25 δΈ‹εˆ3.48.49.png
    ζˆͺ屏2021-06-25 δΈ‹εˆ3.47.30.png
    random debugger break got above stacks, what can I help to dig this out?
    Ulion
    @ulion
    after digging my log, it is probably caused by huge amount of repeat insert and remove element in certain place of a specific array caused by multiple clients operation dead loop. so now although the clients dead loop op is stopped, but the ydoc is still quite hard to load due to that large amount of repeat insert/delete/insert/delete ops happened before.
    Kevin Jahns
    @dmonad
    @ulion Concurrent insertions at the same position have a rather bad runtime behavior. But loading such a document after all conflicts have been resolved should still be fast. So how much time does it take to load that document?
    Ulion
    @ulion
    @dmonad it does not finish the load, at least for a few minutes.
    and cpu 100%
    I can confirm the op storm happened there, probably for 20+ minutes between 2-3 clients, so there would be large amount of insert/delete ops on the specific array.
    Kevin Jahns
    @dmonad
    Do you use any code pre-processors (e.g. babel, typescript with enabled polyfills, ..)
    ?
    Ulion
    @ulion
    yes, the final code use that. and currently it's in dev mode.
    Kevin Jahns
    @dmonad
    That could be a reason. Some polyfills for binary data are ridiculously slow. I experienced a similar issue before.
    Could you maybe share the document?
    First you should try whether the document still needs several seconds to load without polyfills.
    Ulion
    @ulion
    I think I can share the ydoc to you, via a specific websocket url.
    Kevin Jahns
    @dmonad
    Could you also download it? E.g. by calling Y.encodeStateAsUpdate(ydoc) on the loaded ydoc.
    Ulion
    @ulion
    @dmonad PM sent you the link.