David Kimura PRO said almost 4 years ago on Google Maps API with StimulusJS :
 You might be able to take from this episode and piece things together. It uses ActionCable and Stimulus together along with RailsUJS and ActiveJob.  https://www.driftingruby.com/episodes/realtime-client-updates-from-background-jobs-with-stimulus