Satellite-im / Warp

Interface Driven Distributed Data Service
MIT License
15 stars 4 forks source link

raygun: process each conversation in its own task #601

Open dariusc93 opened 3 weeks ago

dariusc93 commented 3 weeks ago

Currently, each conversation has a stream that it would process in its own task, but would send to the data received to the current task to be processed as the stream is polled in the current task. This allows for conversations to be process within the task in FIFO manner. While this works great as it is now, it may slow things down it comes to expanding to large subset of conversations or if there is. The best solution here would be to have each conversation in its own respected task as it was before and process them specifically for that conversation, updating the document accordingly.

Note:

dariusc93 commented 2 days ago

When it comes to community-style conversations and how there may be "channels", we could possibly have them be processed in the single task for that conversation, or have each channel be its own task (up to a specific limit of course). Ideally, it would be better to have the task handle all the channels or sub-conversations processing, but this would be split into a separate issue.