Coder Social home page Coder Social logo

composerfabric101's Introduction

How To: Getting started in Hyperledger Composer and Fabric

The purpose of this repository is to get you started working on Hyperledger Fabric framework which is an all- purpose permissinoes blockchain where you can desing a business logic, code smart contracts, build and deploy a network that will follow the business logic. Composer is a tool for rapid prototyping that allows you tom build proof of concept ob the business network and that can be deployed and tested on an online playground, locally or on a server. Composer is ment to be a tool for testing and addoption but it is recomended tha in development to work directly on Fabric.

This How To will guide you to the documentation and tutorials of both Fabric and Composer and propose some exercises to get you started. It is based on the work we have been doing on Blockchain for Open Science and the git repo and a number of side projects that we have worked on over the last two years.

Material

In this repo you can find three presentations that I prepared for a tutorial I gave on Blockchain at the Biohackaton in Paris in November 2018 This is a good stating point for our main project which is the scholarly wallet, the other presentations are a summary of the Fabric framework and the Composer tool.

Composer

The best place to get started is to look at the oficial documentation

  1. First use the online tutorial, the Composer-Playground and follow a couple of examples: my-basic-sample or deploy some of the other samples like the marble or bond network. The playground will give you the understanding og the elements that make up a business model, for example the participants, the assets and the transactions. Understand the business model and the business logic of the transactions that are coded using JS.
  2. You can complement your undertanding of the examples with the presentation Introduction to Composer or go directly to the Playground Tutorial
  3. You can export any business network archive (*.bna) that can be deployed onto a running fabric network.

Fabric

After you play around with the on-line tutorial you might want to perform a local installation of the development enviorment. Currently you have the official documentation that is supporting version 1.2 and version 1.4 (latest and first long term support release).

  1. Follow the installation instructions, this includes the pre-requisites
  2. After pre-requisites are installed and verifies, you can bootstrap any version of fabric using bootstrap.sh, follow the intructions
  3. Once installation is complete you can start a basic network locally for version 1.2 and version 1.4 and deploy a *.bna file that contains the business logic of your network. This *.bna was previously build using composer language.

Working with Fabric and Composer

The blockchain for open science project is currently focused on building a scholarly wallet that can track the provenance of different types of research objects that are intermediate inputs in the research process. So far we ahved designed the business logic using composer and then deploy this logic onto the most basic network in Fabric using Fabric version 1.2.

  1. The business logic behind the first version of the scholarly wallet is denoted as bforos. You can upload the file '[email protected]' to composer playground and follow the readme file.

  2. Instructions to deploy this business network onto Fabric

  3. Instructions to deploy the business network onto Fabric and start a frontend application using Angular

Working only with native Fabric

We are currently looking into the design the business logic directly using native Fabric, this is an important step to go beyond a proof of concept. The most recent version of Fabric (version 1.4) has an excellent example to do this base on the PaperNet: Comercial Paper Tutorial

  1. I wrote my own summary of this tutorial

  2. It would be an interesting exercise to build a Composer example that follows the Comercial Paper Tutorial. Although there are already somo examples that consider a bond network or letters of credit (see Playgroud examples), however the idea is to build an example that shows the transition from Composer to native Fabric. I already started to do this. The model file is done (*.cto) still need to do the business logic.

composerfabric101's People

Contributors

ccastroiragorri avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

bangpradyumna

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.