当前位置: 动力学知识库 > 问答 > 编程问答 >

concurrency - Firebase - Avoid Mutliple Programs Writing to One Value

问题描述:

If I have multiple programs writing to one firebase value (e.g. PHP), how can I avoid concurrent errors?

Such as I have a firebase value totalUsers: 0 and each time someone loads index.php, it add's 1 to totalUsers.

But I want it to be 100% impossible for two users to open index.php at the same time causing it to only add 1 instead of 2.

Any reccomendations on how to approach this?

分享给朋友:
您可能感兴趣的文章:
随机阅读: