Closed sschulz-t closed 3 years ago
If I understand your proposal correctly, I think that was one option we discussed before choosing the hybrid approach.
There were some challenges with implicit data collections:
However, I think the approach is quite elegant and the aforementioned challenges may be overcome, so it's worth discussing its applicability.
While thinking about using the MongoDB or the internal CouchDB instead of the currently used mysql db I did some investigation how fabric internally uses the CouchDB. I was wondering if it is possible/a good idea to use the private data feature of hyperledger to replace the offchain db adapter. We could use an implicit collection and transient data. Note that I do not want to set up a shared collection between two parties, every party has their own. This will also require to add a (random) seed to the data in order not the same hash on the network twice.
Sebastians idea of using the offchain-db-adapter to cache the data only temporarily until the application "fetches" the new data would also be useful in this case. The data would reside in the private data collection only for a short amount of time and would get purged. When I understand the mechanisms correctly, the data is only held in the couchdb of the owner and could thus be erased. One could also use the "blocks-to-live" as some kind of self destruction feature. Even if there is a security issue with unauthorized access to data, this would only affect the temporary data and not the full history.
This is just a thought, i might miss some implications ;)
A good read (just for reference): https://medium.com/@kctheservant/private-data-and-transient-data-in-hyperledger-fabric-46b5258f391e