#29 Minimally represent idle users

Closed
opened 8 months ago by j3tracey · 0 comments

When designing mnettools, we encountered the problem of how to create a group with n users when there are m < n users also trying to create a group with n users. To address it, we pad out the n - m remaining users with idle users, who don't interact with the group at all.

I think when I wrote this, I assumed the idle users would receive messages from the group and give delivery receipts, and simply never send a message themselves, but thinking about this more, I believe that isn't happening because the idle user never establishes a TCP connection for that group. This means we're never sending/receiving those messages/receipts, and that there's a memory leak in the server keeping those messages around that will never be delivered. We should fix this, but we should do it in a way so that we don't have to manage all the useless threads for this user, just create a single thread on the client that gets messages and sends delivery receipts.

When designing mnettools, we encountered the problem of how to create a group with *n* users when there are *m* < *n* users also trying to create a group with *n* users. To address it, we pad out the *n* - *m* remaining users with idle users, who don't interact with the group at all. I think when I wrote this, I assumed the idle users would receive messages from the group and give delivery receipts, and simply never send a message themselves, but thinking about this more, I believe that isn't happening because the idle user never establishes a TCP connection for that group. This means we're never sending/receiving those messages/receipts, and that there's a memory leak in the server keeping those messages around that will never be delivered. We should fix this, but we should do it in a way so that we don't have to manage all the useless threads for this user, just create a single thread on the client that gets messages and sends delivery receipts.
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.