I need to have 2 (or maybe 3) continuously running "facets" of a program in Ruby - a communications thread, a render thread and maybe a caching thread.
The idea is the rendering thread shows a slide-show (whose definition is read from file) and all slides are retrieved from a remote HTTP server by the communications thread. The rendering must be continuous and without stops (hence the probable need for caching). The file may change over the course of the program's lifetime and thus need re-parsing (on the fly).
I would like to send messages between the "facets" like when the comms thread gets a whole "chapter" of the show, the render thread could start before waiting for the whole show to be downloaded, for example, and so on.
Should I use Ruby threads or DRb? How can I pass messages between the threads?
Thanks for any feedback!