I was migrating ChatRoom to Loro #1173 and was blocked because we can no longer send append commits. We had a custom ChatRoom.rs plugin that created these (server side!) commits to inform the client that a chatroom has a new msg. I never liked this approach, because it only works for chatroom. In tables, we just re-query when things change... In Folder, we have a parent->child relatiosShip (subResource) because we want to show children in the sidebar, and we need this to update in real time.
In short: we have a lot of hacky solutions for something that should have been a more fundamental architectural solution: support live queries.
We already have websockets, we have should_update calls for queries, we have a whole clever atom based indexing pipeline... In other words, most of the foundational work is done.
- I think we'll need a new
/ws message, SubscribeQuery, so the server can store a map of clietns and the queries they want to follow
- The results of a query should be a loro
List so the server can efficiently add things in the right place.
I was migrating ChatRoom to Loro #1173 and was blocked because we can no longer send
appendcommits. We had a customChatRoom.rsplugin that created these (server side!) commits to inform the client that a chatroom has a new msg. I never liked this approach, because it only works for chatroom. In tables, we just re-query when things change... In Folder, we have a parent->child relatiosShip (subResource) because we want to show children in the sidebar, and we need this to update in real time.In short: we have a lot of hacky solutions for something that should have been a more fundamental architectural solution: support live queries.
We already have websockets, we have
should_updatecalls for queries, we have a whole clever atom based indexing pipeline... In other words, most of the foundational work is done./wsmessage,SubscribeQuery, so the server can store a map of clietns and the queries they want to followListso the server can efficiently add things in the right place.