Can EOSIO smart contracts communicate externally, say, to some external (preexisting) web-service?
I suspect the answer is no, as this would violate determinism, among other guarantees.
What is the proposed solution to integrate this with some preexisting service? Any time a user performs some action where an external call is required, is the flow as follows?
- Smart contract stores this request in the database.
- (*) Service must periodically poll the smart contract, to check if there is any work to be done.
- If work is found, perform the work, and transact the result back to the smart contract, which writes confirmation to the database.
- The user polls the smart contract, until the work is complete, in which event the result is finally returned.
(*) Furthermore, if one cannot modify the service, one must also host their own intermediate proxy service to perform the polling.
Is this correct? Should any additional considerations be made, such as either party waiting for the block to become irreversible, or regarding the polling strategy?
Are there any alternatives? Is there some way for my service to "receive callbacks"? Or some way to "register a native plugin"?