Reputation: 170
I did a small POC on blockchain using Hyperledger Composer and deployed a BNA file created using Hyperledger Playground on IBM Bluemix Container. The Angular sample app created by yeoman gave me an option to connect to the REST API exposed for the business network.
My question:
Is this architecture (i.e. BNA deployed on IBM bluemix container along with Nodejs app as an user-interface interacting with composer exposed REST API) being used as a standard for blockchain solutions to companies?
If No, what exactly does a blockchain solution consist of in terms of technology stack and architecture at an high level?
Upvotes: 4
Views: 196
Reputation: 1
Hyperledger Composer is a framework for building blockchain business networks, and it has gained popularity in various industries for creating blockchain solutions.
Lets see the technical aspects of using Hyperledger Composer for enterprise solutions,
Modeling Business Networks
Hyperledger Composer allows developers to model their business networks by defining assets, participants, and transactions. This modeling capability is crucial for representing the complex relationships and interactions within an enterprise on the blockchain.
// Example Hyperledger Composer modeling
namespace org.example
asset Product identified by productId {
o String productId
o String name
o Double price
}
participant Manufacturer identified by manufacturerId {
o String manufacturerId
o String name
}
transaction Order {
o Product product
o Manufacturer manufacturer
o Double quantity
}
Smart Contracts
Smart contracts, written in Hyperledger Composer's scripting language (JavaScript), encode the business logic governing the interactions between participants in the network. These contracts are executed on the blockchain, ensuring transparency and immutability of transactions.
/**
* Sample Hyperledger Composer smart contract
*/
function onOrder(order) {
order.product.quantity -= order.quantity;
order.manufacturer.balance += order.product.price * order.quantity;
updateProduct(order.product);
updateManufacturer(order.manufacturer);
}
The above-mentioned technical features make Hyperledger Composer a popular choice for building blockchain solutions in various industries.
Upvotes: -1
Reputation: 756
Containers are fine. If you are going IBM Cloud make sure you are using Kubernetes to make like easier and that you load balance your REST server as they document.
IBM is pushing their managed Blockchain as a service which cost 1k a month. They have an admin which takes care of a good chunk of the work. The main problem is that for the Integra Ledger, we use Hyperledger Composer and the Blockchain as a service does not support CouchDB yet which is a big issue for Querying.
IBM has promised a set of Docker containers designed to connect to Blockchain as a Service. I plan on running the initial nodes on Blockchain as a Services and am expecting a mixture of nodes running containers or forking out the 1k a month for the managed service.
Upvotes: 1