如何使用NoSQL(Cassandra)实现客户端身份验证解决方案?
我目前正在考虑如何使用 NoSQL 解决方案实现 Web 应用程序的身份验证。我在此遇到的问题是,大多数NoSQL解决方案(例如Cassandra、MongoDB)可能存在延迟写入。例如,我们在节点 A 上写入,但不能保证写入同时出现在节点 B 上。这与 NoSQL 解决方案背后的方法是合乎逻辑的。
现在一个想法是你不进行二次阅读(所以一切都会经过大师)。这可能适用于 MongoDB(您实际上有一个主节点),但不适用于 Cassandra(所有节点都是相等的)。但我们的应用程序运行在世界各地的多个独立点,因此我们需要多主控能力。
目前我不知道 Cassandra 的解决方案可以更新数据并确保后续读取(对所有节点)确实有更改。那么,如何在 NoSQL 解决方案之上构建身份验证,使身份验证请求(读取)可以并行出现在多个节点上呢?
感谢您的帮助!
I am currently thinking of how to implement an authentication for a web application with a NoSQL solution. The problem I encounter hereby is that in most of the NoSQL solutions (e.g. Cassandra, MongoDB) have probably delayed writes. For example we write on node A but it is not guaranteed that the write is appearing on node B at the same time. This is logical with the approaches behind the NoSQL solutions.
Now one idea would be that you do no secondary reads (so everything goes over a master). This would probably work in MongoDB (where you actually have a master) but not in Cassandra (where all nodes are equal). But our application runs at several independent points all over the world, so we need multi master capability.
At the moment I am not aware of a solution with Cassandra where I could update data and be sure that subsequent reads (to all of the nodes) do have the change. So how could one build an authentication on top of those NoSQL solutions where the authentication request (read) could appear on several nodes in parallel?
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于 Apache Cassandra:
这是在应用程序端管理的。具体针对您的问题,这取决于您如何设计 Cassandra 实现、跨 Cassandra 节点的复制因子以及应用程序在读/写方面的行为方式。
With respects to Apache Cassandra:
This is managed on the application side. To your question specifically, it comes down to how you design your Cassandra implementation, replication factor across the Cassandra nodes and how your application behaves on read/writes.