Interacting contract with a web service

ripulripul Member Posts: 9

I am pretty new to Ethereum and DApp. I am just familiarising myself with the relevant technologies. I have been able to install and run the Geth client in a testnet and interact with it using the web3.js library.

I am just wondering if there is any way to write a contract that has the following use-case:

1) Call the contract using the web3.js library with some data from a web-service (let's say: WS-1).

2) Once invoked, the contract will process the data based on its logic.

3) The result will be submitted to another web-service (let's say: WS-2) which will store the result in a DB and sends back a response to the contract.

4) Based on the response, the contract will submit a response back to WS-1.

I know it is possible to accomplish Steps 1, 2 and 4. I am just not sure how to accomplish the Step 3.

Any suggestion or pointer will be highly appreciated.

Thanks in advance.



Sign In or Register to comment.