0

I want to build a micro service that receives information with HTTP(flask) and puts it on the blockchain (Tendermint).

I have done some research and finally landed an bigchainDB.

It also makes use of flask and Tendermint and flask is run as a deamon/process.(https://github.com/bigchaindb/bigchaindb/blob/master/bigchaindb/start.py)

This is the first time I'm seeing such a setup and it confuses me a bit.

Tendermint(https://tendermint.com/) has a ABCI (application block chain interface) that run a server this makes it not possible to run flask at the same time.

I tried to run both flask and tendermint server at the same time. tendermint with the help of the package(https://pypi.org/project/abci/) but flask blocks the ABCI process or ABCI blocks the flask process.

One of the core functionality is that the HTTP clients has to have shared data with the ABCI service that will communicate with tendermint node.

The action of posting data to a certain end point should trigger an event in the ABCI that will edit the state and deliver it to the blockchain.

Does anybody have suggestions how to implement this or other resources that explain how to tackle this more in depth?

dante
  • 39
  • 6
  • if they use the same port then change port for one of them. If both have to be avaliable on the same port (ie. `80` - standard port for `http://`) then it may need proxy server like `nginx` and then they will need different subdomain - ie. `flask.domain.com`, `tindermint.domain.com` or different path `domain.com/flask`, `domain.com/tindermint` – furas Nov 05 '19 at 12:56
  • The problem is i need the http to invoke actions on the tendermint server. I wanted to run it in a single application that will communicate to the tendermint node. – dante Nov 05 '19 at 13:29

1 Answers1

0

Maybe wrapping both endpoints into a new common endpoint that performs actions on both. So a new server that makes it's own queries to each of the other two endpoints.

okwme
  • 740
  • 1
  • 7
  • 19