#29 Minimally represent idle users

닫힘
j3tracey9 달 전을 오픈 · 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명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.