问题
I am new to Hyperledger Fabric and would like to understand these terms with a real-world use case.
Let's say we are building a Healthcare Blockchain Network with multiple Hospitals.
Each Hospital has its own set of Doctors and Patients.
For simplicity lets assume there are two hospitals, Hospital A and Hospital B. So does this mean Hospital A is one organization and Hospital B is another Organization?
In this case, what is a peer? Are participants (Doctor, Patient etc) individual peers?
Please correct my understanding of the Hyperledger Fabric Environment. I researched through the internet and I could not find a simple explanation of these terms which are related to the real world. All the explanations are technical, especially in the official Docs.
回答1:
I think you are right. But it depends on the level of functionality you want to provide as an application.
First of all yes, a Hospital can be an Org.
Secondly, coming to the main functionality Peers are the ones that have a business logic/ Chaincode and a database(ledger). So, in your case
- Peers can be Doctors because every doctor has there own (database) patients and (business logics) like psychiatrist, Cardiologist etc.
- Peers can be like receptionist of a hospital that has all the records of all the patients and doctors stored as a state.
While the patients are basically the application users. So it completely depends on how you want to shape your network. There can be many scenarios that you can think of like using Private data to store details like pricing or patients reports etc. ;)
回答2:
A hospital can be an Org.
An organisation conceptually is an entity which has access to channels ( ledgers ) and can issue identities to participants so that every transaction's source is clear and identifiable.
Channels are basically ledgers, ways to organise and secure data. Organisations join channels and thus get access to certain ledgers. Then they give certain access rights to individuals based on categories for example. A doctor could have a higher level access, meaning they can read patient information, but patients cannot access someone else's data. All this is controlled with clear rules.
Doctors, patients etc. ( basically any identifiable individuals ) are participants.
Think of peers as computers which help run and maintain the network and can also verify and endorse transactions. They also provide a way to interact with the network and you can build APIs which then you can use to write / read data to and from your network.
来源:https://stackoverflow.com/questions/54711075/in-hyperledger-fabric-what-is-an-organization-and-peer