How newham/fabric-iot works
Main Components
• Blockchain Network Environment – This encapsulates all the fabric-specific components configured in the “network” directory. It includes:
• Certificate Authorities (CA)
• Orderers and Peers (the blockchain nodes)
• Docker containers launched via numerous docker-compose files (e.g., docker-compose-ca.yaml, docker-compose-cli.yaml, etc.)
• Infrastructure scripts for generating certificates and config artifacts (see crypto-config.yaml, configtx.yaml, and related shell scripts)
• Chaincode (Smart Contracts) – Found in the “chaincode” directory (Golang implementation). This layer implements business logic for access control (multiple modules like AC, DC, M, PC, etc.).
• Client Application – Found in the “client/nodejs” directory. This client is used for enrolling users, invoking smart contracts, and managing interactions with the blockchain.
• Testing and Simulation – Although secondary, the “test” folder indicates components for consensus (Kafka, PoW) and TPS testing, showing experiments to validate performance and consensus mechanisms.
Relationships and Interactions
• The blockchain network itself is constructed via Docker containers (as managed in the “network/compose-files” directory). Represent these containers collectively as a “Dockerized Fabric Network” block.
Architectural Patterns & Technologies
• Fabric-based Distributed Ledger: Emphasize that the project follows the Hyperledger Fabric architecture including certificate issuance, membership services, channel configuration, and chaincode lifecycles.
• Smart Contract Design: Show that chaincode is modularized (several Go packages for different functions such as access control, policy management, etc.) following a typical chaincode deployment model.
• API & Client Integration: The Node.js client uses the Fabric SDK to interact with the blockchain, making the design clearly a full-stack blockchain application.
• Dockerized Microservices Deployment: The network is set up with Docker-compose files that structure components as individual containers.