Git Product home page Git Product logo

ghas-results / loadtesting-the-blockchain-network Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm/loadtesting-the-blockchain-network

0.0 0.0 0.0 97 KB

WARNING: This repository is no longer maintained :warning: This repository will not be updated. The repository will be kept available in read-only mode.

Home Page: https://developer.ibm.com/code/patterns/load-test-your-blockchain-network/

License: Apache License 2.0

Java 100.00%
ibm

loadtesting-the-blockchain-network's Introduction

WARNING: This repository is no longer maintained โš ๏ธ

This repository will not be updated. The repository will be kept available in read-only mode.

Load testing the Blockchain Network

This pattern is continuation of the Leveraging cache and MessagingQueue to scale Blockchain Network . In this pattern, we are going run java programs to load test our blockchain network i.e. to send request to blockchain network and to check for results of request execution. MongoDb is used to keep track of statistics for the load testing.

Included Components

  • Hyperledger Fabric
  • Docker
  • Hyperledger Fabric SDK for node.js
  • Mongodb
  • Java

Application Workflow Diagram

Application Workflow

  • Run the ExecutionApp and ResultGenerator java program in separate terminals
  • View the execution results in mongodb

Prerequisites

  • Maven

Steps

docker run -p 27017:27017 -d mongo
  • Issue a git clone https://github.com/IBM/loadtesting-the-Blockchain-Network.git
  • Verify the executionURL, resultURL urls from ExecutionApp.java and ResultGenerator.java.
  • Make sure your are connecting to correct mongodb instance and dbName are same in ExecutionApp.java and ResultGenerator.java.
  • Open terminal and run the following commands to setup the project
mvn compile
  • Now run the test result loader Application
mvn exec:java -Dexec.mainClass="secretApp.testApp.ResultGenerator"
  • In a new terminal,run the execution cli app
mvn exec:java -Dexec.mainClass="secretApp.testApp.ExecutionApp"
  • If required, you can scale the number of task execution containers by navigating back to the network directory and running the following command:
docker-compose -p "fitcoin" up -d --scale fitcoin-backend=<No of containers>

For eg:

docker-compose -p "fitcoin" up -d --scale fitcoin-backend=3

Note: To view the results you can download robomongo/ Robo 3T. Currently, ExecutionApp is configured to send enroll request for user types, query request for user state and invoke request for generating fitcoins which can be modified according to the requirements.

Additional Resources

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

loadtesting-the-blockchain-network's People

Contributors

ljbennett62 avatar ishangulhane avatar imgbotapp avatar stevemart 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.