#29 Minimally represent idle users

Закрыто
9 месяцев назад открыта j3tracey · комментариев: 0
Justin Tracey прокомментировал 9 месяцев назад

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 участников
Загрузка...
Отмена
Сохранить
Пока нет содержимого.