简体   繁体   English

区块链/ IPFS用于应用程序之间的数据共享

[英]Blockchain/IPFS for data sharing between applications

I am going deploy multiple(30+) applications for multiple customers in different cloud environments (AWS, Azure, google cloud, etc) and let them share data with each other. 我将为不同云环境(AWS,Azure,谷歌云等)中的多个客户部署多个(30+)应用程序,并让他们彼此共享数据。 My plan is to use Blockchain/IPFS sort of technology where each customer keeps a copy of the data, and any changes to those data are propagated to all the nodes. 我的计划是使用区块链/ IPFS技术,每个客户都保留一份数据副本,对这些数据的任何更改都会传播到所有节点。

The data can be categorized into two types: 数据可以分为两种类型:

Public data of each customer are shared and accessed by all applications directly. 所有应用程序直接共享和访问每个客户的公共数据

Private data of each customer are encrypted with the customer's public key before stored and the cipher can be accessed by all applications. 在存储之前,使用客户的公钥对每个客户的私有数据进行加密,并且所有应用程序都可以访问密码。

Does this sound like a viable solution ? 这听起来像一个可行的解决方案吗? IPFS seems to be a good candidate for data storage, but not sure which database works well with IPFS. IPFS似乎是数据存储的理想选择,但不确定哪个数据库适用于IPFS。

You can use the Ethereum blockchain to store the IPFS hash tied to each customer. 您可以使用以太坊区块链来存储与每个客户关联的IPFS哈希。

Each IPFS hash references a piece of data. 每个IPFS哈希都引用一段数据。 The data it's referencing can be public in plain text, or public but encrypted with their public key. 它引用的数据可以是纯文本公开的,也可以是公共的,但使用公钥加密。

Each customer would have a unique public address which will function as a unique identifier. 每个客户都有一个唯一的公共地址,它将作为唯一标识符。 In the Ethereum smart contract, you'd map each customer public address to a list of IPFS hashes, which reference their data. 在以太坊智能合约中,您将每个客户公共地址映射到IPFS哈希列表,这些哈希值引用其数据。 You'd also set up event triggers in the smart contract methods. 您还可以在智能合约方法中设置事件触发器。

Any participant can subscribe to the smart contract events and act on the updated information. 任何参与者都可以订阅智能合约事件并根据更新的信息进行操作。

Anyone can read the IPFS hashes tied to a customer. 任何人都可以阅读与客户相关的IPFS哈希值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM