From: Ben Giddings Date: 2007-01-18T08:06:30+09:00 Subject: Re: local interprocess communication ideas. On Jan 17, 2007, at 17:30, James Mills wrote: > So, I have an embedded ARM proc with about 200MHz, and I want this app > to feel as responsive as possible. The GUI and controller will both > run on this machine. When a button on the GUI is pressed, the command > is sent to the controller, the controller sends a command out of the > serial port, and an action is taken. How responsive are we talking about here? Do you need "twitch" video game type responsiveness (tens of ms) or something less? Unless you need twitch video game responsiveness, I'm pretty sure anything over the local loopback would be fast enough. I've written CGIs that ran on the webserver of an ARM-based embedded device, and despite the overhead of a *real* network between me and them, they seemed very responsive. If you need tens-of-ms type responsiveness, you might want to use some shared memory. This couldn't be done natively in Ruby, but it would be pretty easy to write some simple C, write a Ruby extension, and use it that way. Keep in mind that in my experience, you'll never be able to get any better than say 20ms responsiveness, since that's the task-switching overhead inherent in using Linux (and I assume other OSes would be similar). You *could* get faster by writing kernel extensions, but that's even further from a pure Ruby implementation. Ben