2

Quick questions.

1) If I perform a Transaction, when that result of that transaction returns, are all peers updated? Or will the other peers eventually reflect the change of the transaction?

2) How do peers update their state? From what I understand, Peers have direct access to storage, and is their own cache. So when they don't have what you're asking for, I guess they just retrieve it from storage. How do peers know when their information is out of date?

3) How much does the choice of storage/backend matter? Since db's like MySQL and the like were optimized for a server/client relationship, wouldn't it be possible to create a Datomic-optimized storage solution? Or wouldn't it be worth it?

4

1 回答 1

5

1) 唯一保证已更新的对等点是请求交易的对等点。其他人最终会看到变化。如果您的应用程序需要对等协调,则需要使用阻塞(sync connection t)功能来实现。有关更多信息,请参阅datomic-docs

2) 交易者向所有连接的节点广播新的变化。对等点状态由来自交易者的新颖性和他们直接从存储中检索的数据段组成。同样,该sync函数可以与交易者通信以确保对等方阻塞,直到调用之前写入的所有交易sync都可用。大多数其他功能不与交易者或区块进行通信。

3)如果您的系统不需要巨大的写入可扩展性并且您的应用程序数据往往适合内存,那么特定存储服务的选择通常是无关紧要的,当然,它们的操作能力(备份、管理工具等)除外。 ) 这与 Datomic 无关。请参阅存储后端如何影响 Datomic?更多细节。

于 2013-11-09T17:14:09.947 回答