《超越交易的生活》实体-消息-活动模型的实践?

发布于 2024-09-17 10:26:05 字数 666 浏览 2 评论 0原文

假期期间,我阅读了 Pat Helland 的 “交易之外的生活”(是的,假期就是那么美好:)。简而言之,它主张将事务范围限制为单个实体,然后使用能够更新实体或在发生导致任务无效的更改时取消任务的“活动”组。

(例如,装运订单 A 需要一定数量的项目 1。装运订单和项目存储为实体并具有自己的活动。装运订单 B 在 A 完成之前随项目 1 的最后一个一起装运。项目 1 的活动取消装运订单 A .)

我原以为我正在打印 Dynamo 论文,所以如果我在这里将两者混为一谈,请原谅我。我见过很多受 Dynamo 和 BigTable 影响的“NoSQL”项目,特别是它们如何通过键和分区数据来寻址实体。我想知道这个实体-消息-活动模型是否影响了其中任何一个?

或者,更具体地说,如果我在 HBase、Cassandra、Riak 等中有一个跨越多个实体的操作,我是否需要自己实现一个 Activity(更多的是应用程序中的设计模式) ,或者是否有某种现有的框架?或者他们是否做了其他完全让整个问题变得毫无意义的事情?

谢谢!

Over vacation I read Pat Helland's "Life Beyond Transactions" (yes, vacation was that good :). To sum it up briefly, it advocates limiting the scope of transactions to a single entity and then using groups of "activities" that have the ability to update the entity or cancel a task anytime a change takes place that would make that task invalid.

(E.g. Shipping Order A requires some amount of Item 1. The Shipping Orders and Items are stored as entities and have their own activities. Shipping Order B ships with the last of Item 1 before A finishes. The activity for Item 1 cancels Shipping Order A.)

I had thought I was printing out the Dynamo paper, so forgive me if I conflate the two here. I've seen quite a few "NoSQL" projects influenced by Dynamo and BigTable, particularly in how they address entities by keys and partition data. I was wondering if this Entity-Message-Activity model has influenced any of them?

Or, to put it in more concrete terms, if I have an operation in HBase, Cassandra, Riak, etc. that spans multiple entities, do I need to implement an Activity all by myself (as more of a design pattern in the application), or is there some kind of existing framework? Or do they do something else completely that renders this entire question moot?

Thanks!

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

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

发布评论

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

评论(1

夏夜暖风 2024-09-24 10:26:05

我可以仅从 Cassandra 的角度添加我的 2 美分(我没有使用其他可用的 NoSQL 引擎)。 Cassandra 主要设计为快速读写结构。 Twitter 是 Cassandra 的一个很好的用例(请检查 twitter 克隆 Twissandra

假设我正确理解了你的问题:是的您必须自己实施该活动。要了解 Column/SuperColumnFamilies 的建模,我建议阅读这篇精彩的文章 WTF 是超级专栏吗?

干杯!

I can add my 2 cents here just from a Cassandra point of view (I haven't used the other NoSQL engines available). Cassandra is primarily designed to be a fast read-write structure. Twitter is a great use case for Cassandra (check the twitter clone Twissandra for this)

Assuming I have understood your question correctly: yes you will have to implement the activity yourself. To understand the modeling of Column/SuperColumnFamilies I would suggest reading this great article WTF is a SuperColumn?

Cheers!

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