<mxCell id="XAy0RjqfLc8c8spvn7cI-1" value="会话redis (hash)<br><br>_s&nbsp; 单聊<br>_g&nbsp; 群聊<br>_c&nbsp; 频道&nbsp; &nbsp;<br><br>key&nbsp; &nbsp;field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;val<br><br>uid&nbsp; &nbsp; fid_s:unread&nbsp; &nbsp; = &gt;&nbsp; &nbsp;5<br>uid&nbsp; &nbsp; fid_s:msg&nbsp; &nbsp; &nbsp; &nbsp; = &gt;&nbsp; &nbsp; msg<br>uid&nbsp; &nbsp; fid_s:update_time&nbsp; = &gt; time<br>uid&nbsp; &nbsp; fid_s:lask_ack&nbsp; &nbsp;= &gt; msgId<br>................<br>eg:<br>1&nbsp; 2_s:unread =&gt; 3<br>1&nbsp; 3_s:unread =&gt; 4<br><br>去申请消息Id时候的会话Id为 (uid_fid_s /_g /_r 等)消息同步库会使用zset 存全部的消息并使用 msgid排序<br>每天对于有活动的会话ID需要保存起来,6小时清理一次消息长度(分批进行清理)<br><br>用户的会话信息每天3点清理一次,30天未活动的<br>(用户多的情况下,分批运行)<br><br>" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
0 commit comments