Giter VIP home page Giter VIP logo

ghareeb-falazi / scip-casestudy-2 Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 54.36 MB

A case-study that shows how the Smart Contract Locator (SCL), the Smart Contract Description Language (SCDL), and the Smart Contract Invocation Protocol (SCIP) can be used in combination to support the integration of heterogeneous multi-blockchain setups into client applications.

License: Apache License 2.0

Shell 14.52% Dockerfile 1.01% Java 33.44% JavaScript 7.08% TypeScript 20.47% CSS 2.65% HTML 17.83% Solidity 3.00%
scip docker fabric supply-chain-management ethereum blockchains scl scdl case-study demo

scip-casestudy-2's Introduction

Unified Integration of Smart Contracts through Service Orientation - A Case-Study

Introduction

A case-study that shows how the Smart Contract Locator (SCL), the Smart Contract Description Language (SCDL), and the Smart Contract Invocation Protocol (SCIP) can be used in combination to support the integration of heterogeneous multi-blockchain setups into client applications.

The following picture highlights the distributed system that is invloved in the case study: Arch.png The system focuses on a retailer enterprise that is connected to two supply chains (one for seafood products and one for dairy products). The two supply chains are managed by two blockchains (Ethereum and Hyperledger Fabric). Access to the blockchains is provided by two SCIP Gateways, which can be activated using SCIP messages addressed at appropriate SCL addresses. We will create the various components of this system, bring it up and then run a sample the client application against it. The sample client application allows the various roles presented in the figure to update the corresponding blockchains with supply-chain-related actoins. Furthermore, it allows the end-customer to query the provenance of a given fish package or a milk carton.

Prerequisits

  • Active internet connection :)
  • Docker with Docker-Compose
  • Git bash (for Windows users)
  • The ports 4200, 7050, 7051, 7054, 8080, 8081, 8082 8545 must be avaialable at the host machine.

Setup

  • The following instructions assume you are using Windows. Otherwise, ignore the requirement that you need to run the commands using git bash, since bash will be readily available for you.

  • Using git bash, navigate to the AutomateSetup directory, and run the shell script Start.sh, i.e.,

    > cd AutomateSetup
    > ./Start.sh
    

    This will pull/create the necessary docker images, execute the docker-compose file to bring up the various docker containers needed, and deploy the Ethereum and Fabric smart contracts. If you manually change one of the involved Dockerfile's, please use the option fresh when running the previous command, i.e., run:

    > cd AutomateSetup
    > ./Start.sh fresh
    

    This will execute docker-compose build --no-cache before executing docker-compose up -d.

  • When the script is fully executed, you can proceed to the Demo section below.

  • At the end, you can bring down the network with the command

    > ./Stop.sh
    

    You can also remove BAL and ganache-cli images by combining the previous command with the rmi option as follows:

    > ./Stop.sh rmi
    

Demo

  • After the Start.sh script is successfully executed, open the browser to http://localhost:4200.
  • Use the UI to add fish-catching entries to the blockchain, and then add further entries that refer to shipping the fish, packaging them, distributing packages to retailers, registering packages in retailers' inventory, and selling them. Behind the scenes, SCIP Invocation messages are sent to a SCIP Gateway that translates them into Ethereum trnasactions in this case.
  • Finally, use the Provenance tab to query the provenance of a fish package. Behind the scenes, multiple SCIP Query messages are sent to a SCIP Gateway to retrieve all the events relevant for the corresponding fish package and the contained fish.
  • A Video of this demo is available on Youtube Video Screenshot

Notes

  • The crpyto artifacts for Fabric are already generated. If you need to generate them again use the script generate.sh. Then you need to update the keyfile name mentioned inside the docker-compose file (in the ca service specification).

scip-casestudy-2's People

Contributors

ghareeb-falazi avatar v-yussupov avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.