I have been researching online a lot, and I have hit a roadblock.
My current situation is that I have a hash inside my blockchain, and this would reference a file that will return this from off chain. My question is that would using IPFS and Storj even be possible using Hyperledger Composer? If so, how would the integration process work? My case right now would require the use of Hyperledger due to its architecture over Ethereum, so it is much preferable to use Hyperledger.
Besides this, I would also like to create a custom front end. Is it possible to work on custom CSS and code, for example, using Angular?
yes - firstly see storage options discussed in this thread -> Best practice to save files in blockchain -
In Composer you could store the hash as a string on an asset in your model etc etc and you can retrieve via IPFS client search etc once you've got your asset (eg by name or ID) etc .- lastly see this announce for current status of Composer FYI
Related
For the past few days i am trying to learn blockchain, more specifically in using hyperledger fabric
However, while i am quite familiar building centralized app, i am so new in grasp this whole new concept, and got some question in mind i haven't found answer, yet.
If its decentralized, does the script will run as desktop background process in every machine connected to the network through internet?
Since
no way it could be "decentralized" if its hosted on 3rd party server
blockchain platform seems could seamlessly write/read local files, which certainly not possible at the case of hosted in 3rd party server
existing blockchain application (i.e bitcoin) written for desktop (c++)
If it does desktop process, in the case of creating website interface to run the application, do we need API to communicate? And if so, how the API could be made to communicate between all machine in the network?
Moreover in the case of storing sensitive data like password, since its stored locally in every machine, does it means we will rely only on encryption being used? I assume common AES256 will work? Or need multi layer encryption (as in XMR) to make it harder for people trying to decrypt those sensitive information?
Any input is greatly appreciated. Thank you in advance!
I'll answer your questions for Hyperledger Fabric since that's what you tagged this post for.
Presumably the "script" you mean is chaincode, the blockchain back-end part of the decentralized application. It runs on endorsers (part of Fabric peers), specifically all endorsers that are specified in the endorsement policy and have installed the chaincode. The endorsement policy specifies how many endorsers need to agree for chaincode transactions to go through, i.e. 3/5. These peers can be hosted by multiple organizations in different places, that's why it's decentralized.
You need to use the Hyperledger Fabric SDK to communicate with your chaincode (get data, send transactions).
Decentralized apps don't really use user-password combo for identity management. Users have public/private keypairs which they need to keep locally. Only if you want to encrypt the private key you'd need a password for the user to decrypt it locally. You use the private key to sign transactions and to authenticate with the network (which determines your access rights, i.e. user vs admin)
I can recommend the Fabric paper as a learning resource
Also check out the docs, they cover many of your questions
I would recommend first taking a step back and finding out what are the best use cases for Web3 vs Web2. There are a number of projects that seem to have been shoehorned into using Web3 when they could have been created more quickly and efficiently using
Web2 technologies.
Ask yourself these questions before jumping on board the decentralized Web3 bandwagon:
Is an Immutable Ledger the Best Fit for Your Back-end?
Does Your Back-end Work Best as Decentralized Computing?
Do You Need Scalability or High Transaction Volumes?
Only when you understand the problem you are trying to solve, can you determine the best technologies for the job.
To help answer the above questions, you can use the following article as a resource: https://www.scalablepath.com/back-end/choosing-web3-for-software-project
I am just a beginner in HyperLedger Composer and Fabrics.
Following IBM tutorial under 'https://www.coursera.org/learn/ibm-blockchain-essentials-for-developers'
I have one quick question:
How to create a File Server using Hyperledger Composer?
Is it possible now or not?
any feedback will be very helpful.
Using Composer and Fabric as a File Server would be unusual, and due to the nature of Fabric as a Distributed Ledger, it may well perform badly as a File Server.
There are other Questions and Answers in Stack Overflow about storing images etc using base64 encoding, such as this one.
Depending on your use case, it may be more appropriate to store some hash of the file on the Fabric enabling you to prove the validity of the file, whilst storing the file itself on a dedicated File Server.
With the nature of technology, saving a file in hyperledger fabric and using it as a file server would not be a good strategy.
You Hash the original file and Use hyperledger fabric to store the Hash value and other data you need for the system and to Validate. But you should use a different server to Store the Files.
Something similar to this would work I guess: A Sample System Design : Image
Any changes, updates or a version change, you store the new file in the server, create the new hash and add the data in to new entry in hyperledger fabric.
I'm using Hyperledger Composer and Hyperledger Fabric to implement a blockchain application. Here, there is a requirement to publish images of a certain asset in the network. According to my knowledge, it's not a good practice to use images in a blockchain network. Any suggestions to achieve this requirement?
It depends on the further application of the your chained data.
Maybe instead of images you can put inside SHA-2/SHA256 of these images.
If you don't store them on the blockchain, you're back to a centralized solution. Depending on your needs, that might be acceptable, or not. If you need to store it on the blockchain, you might use the url:data format, which lets you store them as strings, but any modern browser would be able to display them without additional code.
I am developing a micro money-lending platform where I am using hyperledger -composer to model the business network, but I am getting stuck on how to implement the payment processing system in my solution as hyperledger-composer doesn't have any currencies associated with it.
How can I do this?
Hyperledger Fabric might not be the best tool for this task. If you want to use it, you can use it just like a relational database, with your users as Participants, other entities as Assets etc etc. But you can't use it for passing money from one person to another -- you'll have to use other means.
I have been working on hyperledger fabric for some time. But I don’t understand where hyperledger composer comes in place . I do understand that it helps in visualizing the logic and transaction. But what I don’t get is how do you integrate it with fabric network? what does it create? Is it chaincode if not then what?
The Compose runtime is chain code that executes the business network archive artefacts created by the end-user.
Perhaps this will help?
https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/
The tech answer is that Hyperledger Composer is an abstraction layer over Hyperledger Fabric.
The practical answer is that it is awesome. Think how Angular and hundreds of other frameworks make web programming easier.
It is a framework where you can write your blockchain in Javascript and specify your data objects in an easy to understand text file. Throw in some querying, ACL stuff and pathways to use some nice opensource tools that let you do things like generate a Web API automatically and play around in a web environment without installing anything.
We are using it for the Integra Ledger Legal blockchain. (www.integraledger.com). I just spent the day working in it.