I have a rails application which caches data from external service and also converts it to json. External service uses it's own protocol based on RPC convention.
Basically i need a background worker which keeps a connection alive by pinging back and forth using that protocol. When the rails app sends jobs to it, the worker translates it to queries for an external service and transmits converted json data back to application. Application then caches it and transmits it back to user.
The different approach is to use sidekiq and connect/disconnect on each job. This is inefficient.
I need some advice on this topic. Maybe even a different approach. Thanks in advance!
Set up a pool of connections to be used by the jobs running within Sidekiq.