I’m not sure if there’s a limit on how many dbs a browser can have I’ve been curious about this as well. In regards to the numerous indexeddb entries, it’s true that every indexeddb provider you create will result in a separate database. You would also need to extend WebsocketProvider to understand this new message type, as well. Then I use the same websocket connection to perform the sync operation on that subdocument. In my case, I just added a new message type called “subdocumentSync” that included the id of the target subdocument. One way to do this is to extend the y-websocket server message protocol, found here, to include a message type for subdocuments. That being said, it’s not terribly hard to add multiplexing support to sync many subdocs over a single websocket connection. The example code then wires up a new provider for the subdocument.Īs it stands now, you would need a websocket provider and separate websocket connection for each subdocument. For example, in the code on this page, at the bottom you can see an event is fired when a subdoc is loaded. Y-Websocket does not explicity support subdocs, but rather treats them exactly the same as any other YDoc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |