The inline includes that Varnish does is synchronous for the client, but asynchronous in your backend, your backend sees multiple requests.
I am interested in your pusher+sidekiq implementation, it is a good idea, but it might be a lot of work :)
The inline includes that Varnish does is synchronous for the client, but asynchronous in your backend, your backend sees multiple requests.
I am interested in your pusher+sidekiq implementation, it is a good idea, but it might be a lot of work :)
1. Client sends a request via Ajax to a rails controller and simultaneously opens a private pusher channel to wait for a response.
2. Controller returns a response immediately and fires-off a sidekiq job.
3. The sidekiq job does the heavy lifting and pushes the results back via pusher (it can be JSON data, or a rendered partial).
4. Client receives the response via the pusher channel and shows it on the page.
Would love to see a write-up/notes/gist that demos this.