[gmpi] Re: Req 76,78

  • From: David Olofson <david@xxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Tue, 8 Feb 2005 13:17:19 +0100

On Tuesday 08 February 2005 12.28, Didier Dambrin wrote:
[...]
> The evidence is that interprocess communication sucks & is not
> efficient, no one does that unless there's no other choice.

That's the kind of programming style you learn when you're stuck with 
a broken OS... Perfectly understandable, of course; theory is 
irrelevant when you need to get the job done, and the "right" tools 
are unavilable or broken.

Either way, if the OS provided IPC sucks for one reason or another, 
there is (usually) shared memory and (always) lock-free 
synchronization.

You *will* need synchronization of one form or another when doing it 
in the same process as well - even if it's implicity by means of your 
code being inherently thread safe.


Now, before you say "doesn't work over networks"; high end NICs that 
emulate shared memory have been in use for many years. "All" it takes 
is that the NIC detects writes to it's mapped memory areas and 
transmitts changes automatically, instead of the usual "please send 
this buffer of data over there". That can be implemented in software 
on most OSes, regardless of networking hardware, but that's not 
nearly as efficient as the high end hardware solutions, 
unfortunately. (Well, that depends on what kind of memory management 
hardware and latency requirements you have, of course. Still, there's 
extra work to do, while true shared memory NICs do it all in hardware 
once they're initialized.)


> And that all it does is make coding a lot harder.

And you can avoid the synchronization issues when you're in the same 
thread...?


> It might be very clever under OSX or linux, I have no idea. But it's
> totally not under windows.

So we're assuming that Windows will remain broken forever.

Fine; then we'll just roll our own local IPC solution based on shared 
memory (Windows does have *that*, I hope...), lock-free 
synchronization and/or whatever reasonably useable IPC APIs there 
are.

Can't do much about communication accross networks that way, but well, 
maybe Windows in it's current state, is just not the right platform 
if you want to build processing farms or control outboard devices 
with high bandwidth requirements. Are we going to ditch the whole 
idea because one platform is currently broken and can't do it very 
well...?


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: