-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现一个能监听数据变化的数据同步模块 #3
Labels
enhancement
New feature or request
Comments
现有的 sharedata 或 sharetable 能 满足 这种需求吗 ? |
打算采用 |
需要考虑的问题
不过我觉得 这种方案 还是 可以接受的 |
消息同步不及时的问题是需要考虑的,比如 agent 已经不存在了,推送消息的时候忽略掉即可,写逻辑时考虑这份数据是不实时的就没啥问题。 玩家频繁上下线的问题可以通过另外的方案处理,比如这种方案: |
嗯 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这里有介绍了几种同步数据的模块
https://github.com/cloudwu/skynet/wiki/ShareData
但是缺少一种能够监听数据变化的情况。
比如有个记录玩家在线状态的表:
当玩家下线后:
其他服务能有接口监听到这个下线事件:
The text was updated successfully, but these errors were encountered: