Hi all,
is there a possibility for an add-on to receive signals/events from ‘somewhere in the internet’?
Background:
Think of a service several instances of my add-on interact with (could e.g. be a DLT system like ethereum).
The add-on can connect (e.g. via web socket - the endpoint of the service is known) and request the execution of a service (e.g. post a transaction to be executed in the DLT system).
Execution is asynchronous and may take some time.
After a while, the execution is done (e.g. transaction made it in the block) and the add-on needs to know.
A bad solution would be to poll the service provider (or e.g. search the mined blocks) for the add-on to recognize.
A better solution (e.g. implemented for ethereum /solidity) are events the service provider issues when the service was done.
My question now is: how could the add-on receive a message/signal/event from the service provider?
I so far could not solve this.
I can connect via webSocket to the service provider, but opening this communication channel is necessarily unidirectional as we need an endpoint, and nowadays a certifcate for secure communication.
The opened channel times out (at least for me relatively quickly (10s no answer from service provider)- any hints appreciated) and it probably makes no sense to keep a channel open for lets say 30minutes.
Once closed, the service provider can not send a message (e.g. service done) to the app.
Any hints how to solve this without letting the add-on poll?
Thx
Alex