Hyperledger fabric in IoT application


Nikos Karamolegkos
 

Hello everyone, I am new to BC and hyperledger. I would like to deploy a BC to an existing IoT network. I have not decide yet the architecture of the BC network (peer, orgs, etc) but I am thinking to deploy some peers in a raspberries which already act as IoT gateways (GWs) and receive sensor data. Also, in GW I would install the fabric client application to update the ledger (with the IoT data). The idea is the data to be distributed in all GWs acting as peers. Is this a good approach for start or should I have the BC network in the backbone?

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Chris Gabriel
 

Hi Nikos,
It really depends upon the use case. In mine, I use a raspberry pi as a server of IoT sensor data that gets polled for its data by an IoT gateway in Node Red, but the peers are running in the cloud in Kubernetes. I use the Fabric CA to issue identities for each org in the network and also assign each IoT device an identity from the CA as a security practice. Demo here:

https://youtu.be/rGHI8-tpzX0

On Apr 15, 2021, at 6:53 AM, Nikos Karamolegkos <nkaram@ics.forth.gr> wrote:

Hello everyone, I am new to BC and hyperledger. I would like to deploy a BC to an existing IoT network. I have not decide yet the architecture of the BC network (peer, orgs, etc) but I am thinking to deploy some peers in a raspberries which already act as IoT gateways (GWs) and receive sensor data. Also, in GW I would install the fabric client application to update the ledger (with the IoT data). The idea is the data to be distributed in all GWs acting as peers. Is this a good approach for start or should I have the BC network in the backbone?

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)






Chris Gabriel
 

Hi Nikos,

In general, each party involved in any transaction should be in its own org. With that in mind, it is not a good idea to have only one org as this creates multiple problems (single point of failure, endorsement, trust, and defeats the business purpose of having a blockchain). When I think about Fabric network structure I always begin with the use case. Fabric networks are best implemented in B2B scenarios but you can also implement them in B2C or C2C (as of now, my view is that B2B scenarios is where Fabric really shines).

Implement Fabric networks where:
B2B transactions are occurring between two or more parties.
There is a need for a transparent auditable view of what happened when transactions are executed.
There is a contractual relationship between parties where the terms of the paper contract between them cam be executed in smart contracts.
Each party on the network has its own peer(s), Certificate Authority or other means of managing identities.

Note that these are suggestions for a starting point as there are many ways to think about this.

Example:
Company A (org1) and Company B (org2) need to transact with each other and you want to implement a Fabric network.
Both companies have their own peer nodes and certificate authorities (just like the test-network).
The orderer can be implemented by any of; a trusted third party, Company A, Company B, or each can have their own orderer.

I hope this helps.
Chris

On Apr 19, 2021, at 5:26 AM, Nikos Karamolegkos <nkaram@ics.forth.gr> wrote:

Hello, thank you for your help. My problem is that I can not decide how to set my organizations. Is it good to have a single organization with multiple GWs as clients application to update the data on the ledger?

Thank you very much,

On 15/4/21 3:52 μ.μ., Gmail wrote:
In short, a good place to start in a dev environment is to have one peer and one certificate authority per organization. Very similar to the Fabric Test Network. On that same YouTube channel I have a tutorial on how to deploy fabric certificate authorities on Kubernetes that contains a public GitHub repo that you can clone and practice with. Hope this helps,
Chris

Sent from my iPhone

On Apr 15, 2021, at 7:45 AM, Nikos Karamolegkos <nkaram@ics.forth.gr> wrote:

Hello, thank you for the fast response. Is the code or any paper available? Can you describe the BC architecture (number of orgs, peers, apps,users). I don't know how to decide how many peers to use. I am trying to build a use case.

On 15/4/21 3:17 μ.μ., Chris Gabriel wrote:
Hi Nikos,
It really depends upon the use case. In mine, I use a raspberry pi as a server of IoT sensor data that gets polled for its data by an IoT gateway in Node Red, but the peers are running in the cloud in Kubernetes. I use the Fabric CA to issue identities for each org in the network and also assign each IoT device an identity from the CA as a security practice. Demo here:
https://youtu.be/rGHI8-tpzX0
On Apr 15, 2021, at 6:53 AM, Nikos Karamolegkos <nkaram@ics.forth.gr> wrote:
Hello everyone, I am new to BC and hyperledger. I would like to deploy a BC to an existing IoT network. I have not decide yet the architecture of the BC network (peer, orgs, etc) but I am thinking to deploy some peers in a raspberries which already act as IoT gateways (GWs) and receive sensor data. Also, in GW I would install the fabric client application to update the ledger (with the IoT data). The idea is the data to be distributed in all GWs acting as peers. Is this a good approach for start or should I have the BC network in the backbone?
--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)
--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)
--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)