You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rendering with ActiveJob & ActionCable would allow for long performing background jobs to push view content when finished.
Rough Flow:
Render async called in view, which also creates ActionCable client subscription
Controller action immediately queues background job for processing
When job completes, content is broadcasted to client
Client inserts content into page from the subscription success callback
Use Case:
We have some long running queries in our admin interface around reporting. Since this is internal, it's not that big of a deal that a response takes 10 seconds, especially since it's only used a few times a day. We'd rather focus dev optimization effort on the customer facing part of the application.
However, this request can cause timeouts for the rest of the application, especially if requests are simultaneous. Pushing the processing to the background and rendering when ready would allow it be truly non-blocking for other requests.
The text was updated successfully, but these errors were encountered:
mnort9
changed the title
Feature idea: Render async with ActionJob & ActionCable
Feature idea: Render async with ActiveJob & ActionCable
Apr 7, 2020
Rendering with ActiveJob & ActionCable would allow for long performing background jobs to push view content when finished.
Rough Flow:
Use Case:
We have some long running queries in our admin interface around reporting. Since this is internal, it's not that big of a deal that a response takes 10 seconds, especially since it's only used a few times a day. We'd rather focus dev optimization effort on the customer facing part of the application.
However, this request can cause timeouts for the rest of the application, especially if requests are simultaneous. Pushing the processing to the background and rendering when ready would allow it be truly non-blocking for other requests.
The text was updated successfully, but these errors were encountered: