与 CQRS 结合使用时,哪对 DBMS 提供最快的读/写速度?

发布于 2025-01-07 19:37:29 字数 157 浏览 0 评论 0原文

如果我要采用 CQRS 和事件溯源之类的技术,那么人们会推荐什么作为单独读写的最佳技术?

理想情况下,建议的解决方案应该是开源的。我并不太关心复制/镜像等功能,因为我打算通过事件源来实现其中大部分功能。

我听说 Cassandra 适合写作,Membase 适合阅读?

If I were to adopt CQRS with something like Event Sourcing, then what would people recommend as the best-in-breed technologies for individually reading and writing?

Ideally the proposed solution should be open source. I'm not overly concerned with features like replication/mirroring, since I intend to implement most of this via Event Sourcing.

I've heard Cassandra can be good for writing, and Membase for reading?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城 2025-01-14 19:37:29

乍一看,这听起来有点像预先优化。在许多情况下,如果传统的 RDBMS 满足您的要求,那么采用该解决方案是最简单/最好的选择,因为开发和运营团队拥有丰富的工具以及熟悉程度。即便如此,如果您正在寻求高写入性能,Cassandra 是一个绝佳的选择。

所有这一切中的另一个警告是您的开发模型很可能使用阻塞 IO。这意味着真正的瓶颈不一定是数据库,而是执行插入的方式。例如,如果您可以将写入批量到单个调用中并让另一个线程继续工作,您将看到更高的性能。

但回到我的第一点,这听起来像是预优化。您确切知道系统中哪些工作流程“慢”吗?你知道哪些需要优化吗?我们都想要一个“快速”的解决方案,但您确实需要问自己哪些工作流程和用例需要“快速”。

At first glance, this sounds like a bit of pre-optimization. In many cases, if a traditional RDBMS meets your requirements, it's easiest/best to go with that solution because of the abundance of tooling and familiarity from development and operations teams alike. Even so, if you're looking for high write performance, Cassandra is an excellent choice.

Another caveat in all of this is that your development model is most likely using blocking IO. This means that your true bottle neck isn't necessarily your database, but how you're performing inserts. For example, if you could batch up writes together into a single call and have another thread continue working, you'll see much higher performance.

But going back to my first point, this sounds like pre-optimization. Do you know exactly which workflows in your system are "slow"? Do you know which need to be optimized? We all want a "fast" solution, but you really need to ask yourself about which workflows and use cases need to bee "fast".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文