ruby - Rails application notify changes in local embedded system -


i need display status of embedded system on webpage updates automatically.
idea use thread in infinite loop looking changes on system

loop   old_status = status   status = board.request_status()   if old_status != status     # notify change connected browsers   end   sleep 1 end 

and notify users faye in episode 260 of railscast.

i've tried using simple thread inside model , sidekiq, need run independent rails application yet still being able communicate it.

does have idea on how can it? i've been researching past week without success

useful information:

rails version

%> rails -v   rails 4.2.3 

ruby version

%> ruby -v ruby 2.2.2p95 (2015-04-13 revision 50295) 

uname -a

%> uname -a     linux server 4.0.8-2-arch #1 preempt tue jul 14 18:45:50 mdt 2015 armv6l gnu/linux 

i'm pretty new rails.
in advance


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -