#29 Minimally represent idle users

已关闭
j3tracey9 月之前创建 · 0 条评论

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.
登录 并参与到对话中。
未选择里程碑
未指派成员
1 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。