Chat App Bandwidth Problem
The problem is that the game consumes a lot of bandwidth because of the chat and the problem is, a new action (new message or a reaction to any message) triggers a fetch, and I believe all clients who uses the above query, re-fetch the most recent 50 chat messages. Normally, I want to fetch all chat messages, I limited it to 50 because of this bandwidth problem.
I believe there should be a better way to fetch the chat messages for me. I have checked the paginated queries, however I could not figure out how to implement it for this problem. Mainly, I want to fetch all chat messages for a game, but I do not want it to re-fetch everything when a new message comes. (I believe Convex does not only send the changes but sends the result of the query as a whole). Convex caches the result of the query but the problem is not the cache, it is the bandwidth. I had to start a premium account even in the development stage and if I can not solve this problem, the game will not scale well.
For example, if I can paginate somehow and it seperates the whole chat into bundles of different queries than it will only consume bandwidth for small bundle changes. Any suggestions?
