I have an ordinary HTML website and backend server phoenix. Both HTML and Phoenix run in a different server.
My HTML site display price from different sites. From my HTML site, I will connect to Phoenix Server using the Phoenix channel.
When the form is submitted on my HTML site. It will send an event through the phoenix channel.
On the server-side, I need to fetch the prices for a particular item from 15 different websites. I will run all these 15 API calls in a Task Module.
Now what i want is each API call response time differs.
I want to push the price asynchronously through the Phoenix channel as the response comes to the client.
So on the client-side, I can display price as I receive. Instead of making the client wait until I receive all the prices.
can someone give me insight on how to achieve the asynchronous push on the Phoenix channel from the server-side to the client?
Your help is greatly appreciated. Thanks