ruby - How to dynamically and efficiently pull information from database (notifications) in Rails -


I am working in Rail application and need a solution below.

I am taking some time consuming processes in the background using the Sidekiq and saves related information in the database. Now when each process is completed, we will get the Would like to show the notification in a different area that the process is complete .

Therefore, the information sector needs to actually pull things from the back (this information area will be available in every page) and show it dynamically, I thought Ajax should be an option . But, I do not know how to trigger it for a particular area or there is another option through which the client can efficiently obtain dynamic content from the server without much traffic.

I know that this will be a broad topic that tells about it. But any relevant information will be appreciated. Thank you :)

You are viewing an endless connection (either using SSE or Websockets) You are looking for "live" connectivity:

>

"Live" functionality works by opening a connection between your app and server Rail is an HTTP request-based framework, which means that it only sends answers to the requests. Send the way of live data is to keep the response open (using a continuous connection), which allows you to send updated data from your time to your page

The way to do this is to use the front-end method to keep the connection "live", and there is a back-end stack to complete the updates. Front end will require either, that you will add to the use of JS

SEO and Websites basically give you access to the server beyond the scope of "normal" requests (they are >

This basically creates a third-party websocket service, for which you can push updates once B. It receives service update, it will send it to any channel that is associated with it.

I can split channels that broadcast it directly to use this service (they are) (I am not affiliated with them), as well as providing a super simple API

In addition, you should see the functionality of the rail

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -