Skip to content
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

多进程设计-数据同步一致性问题 #6

Closed
ipengyo opened this issue Mar 5, 2018 · 1 comment
Closed

多进程设计-数据同步一致性问题 #6

ipengyo opened this issue Mar 5, 2018 · 1 comment

Comments

@ipengyo
Copy link

ipengyo commented Mar 5, 2018

@jzyong 大神你好,简单的看了一下代码,发现 大厅进程 与 游戏逻辑进程 都会同时持有玩家同一个字段的数据 比如 金币 在内存中 那么 这样区分 如何做到 2个同步一致性呢,比如 在大厅获取了金币 处理充值 等等其他的事情,而 游戏逻辑是不知道的。

@jzyong
Copy link
Owner

jzyong commented Mar 5, 2018

数据存redis,数据在一个服务器处理然后通知另外一个服务器,或者加分布式锁

@jzyong jzyong closed this as completed Mar 5, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants