David Kimura PRO said about 5 years ago on Real-time posts with Action Cable in Rails 6 :
Check out https://www.driftingruby.com/episodes/realtime-client-updates-from-background-jobs-with-stimulus It uses a whole combination of things. StimulusJS, ActionCable, ActiveJob, AJAX, etc.