Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuming
/
developer-docs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
echo
2016-04-12 20:08:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0692e9a6587350644220a98287ef511e6ae4cb62
0692e9a6
1 parent
1dc4254c
Updated 远程教学之消息顺序保证机制 (markdown)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
远程教学之消息顺序保证机制.md
远程教学之消息顺序保证机制.md
View file @
0692e9a
...
...
@@ -20,4 +20,7 @@
*
当收到的消息符合预期顺序的时候,直接处理该消息,处理完毕后更新期待的消息序号,然后检查缓存队列中是否有期待的消息序号,如果有则拿出来继续处理,重复执行本条逻辑直到缓存队列中没有期待的消息序号为止。(处理队列中缓存信息的时候,需要设置一定的时间间隔,以防止两个相邻动作执行过快,破坏画面的动画效果和预期的结果)
*
当接收端根据接收的信息创建一个新的学习页面后,清空队列中之前页面的动作消息,从队列中查看是否有先于页面到达的第0个页内动作信息,有则处理,没有则等待动作消息到达。
*
切换页面的时候,重置期待页内消息序号。
*
结束课程的时候,重置期待学习页序号,页内消息序号,清空队列。
\ No newline at end of file
*
结束课程的时候,重置期待学习页序号,页内消息序号,清空队列。
### 待解决的问题
*
如果预期的消息迟迟未到,例如超过10秒,接收方应该向发送方重新请求预期的消息。(需要发送方保持一个当页的发送队列,以备接收方再次请求的时候,再次发送该消息,发送该消息的时候,应该保持原来的序号)
\ No newline at end of file
...
...
Please
register
or
login
to post a comment