I am going to create a big project. Using GCP and Rails I'm willing to create management system for a company. Investigating I've managed to solve some problems that I figured out while creating de design of the arquitecture.
This is my schema. (The Core API runs in Rails too)
However I haven't be able to solve this one. I want to have live updates (like it is done with Hotwire). As it's difficult to explain my problem, I'll give some examples.
The Admin Actor wants to create the Invoices for all the clients. The frontend rails calls the backend api to start that job. The backend api adds the job to the Cloud Tasks Queue. The Cloud Task Worker executes it. If some User Actor is connected to their panel, I want to update their invoice with without having to refresh it manually.
However the CloudTask only creates the pdf, inserts it into de db. I need to have some way to communicate backwards, and I don't think callbacks are the best idea... Maybe redis? How could implement that to Hotwire?. Or I could just with stimulus auto refresh the page...
I want to use Hotwire but I don't know how.
Thank you very much.
Apologies for my English, I'm Spanish.