Rank 2: Process
I’m facing an issue with the Realtime Stream Chunks Overloaded problem. I’m using the OpenAI chatcomplete API in my function and getting the response as streaming chunks. When I receive the chunks, I update a specific document on the DB and subscribe it in the client at every change. The issue I’m facing here is that updating the document for every chunk takes longer than getting all chunks without updating it. For example, if I get the chunks without updating the stream document for the real-time connection, it takes only 3 seconds. However, when I use Realtime, it takes about 13 seconds. Can I use another way to handle real-time without updating and writing the chunks in Appwrite, such as websockets or something else?