From: ian dacek Date: 2007-01-19T10:14:30+09:00 Subject: Re: local interprocess communication ideas. gwtmp01@mac.com wrote: > > On Jan 18, 2007, at 12:06 AM, ian dacek wrote: > >> James Mills wrote: >>> So, with all of that info, what does the community recommend for a >>> lightening fast interprocess communication method? >>> >> Depending on the size of your messages, why not use UDP and your own >> simple message format? You'd eliminate the overhead of TCP, not to >> mention the bloat of XML. You could send the data for the serial port >> with a header or Ruby code prepended, then interpret the header or >> eval the code... > > The TCP overhead is there for a purpose. UDP is an unreliable > protocol. Packets may get dropped, duplicated, or reordered. If your > application is OK with that, great, but if not then you are going > spend a lot of time designing what basically amounts to TCP (sequence > numbers, retransmission strategies, and so on). That's generally true of UDP, especially between two remote hosts bridged by a router. However, going between two ports on the localhost should actually net something along the lines of a memory copy, depending on the behind-the-scenes networking implementation. -ian