views:

479

answers:

3

--edit--

What application development frameworks/component models for Linux and Mac OS X are analogous to Windows Communication Foundation & COM, which provide high level IPC mechanisms for manipulating/communicating with software applications?

By high level communication model I mean RPC, publish/subscribe, etc.

I'm writing software for interaction devices which can be bound for manipulation of computation and data within some software. So far instance, I may have a control panel with physical sliders which are bound to various cells within a spreadsheet loaded in Excel, Calculate or Numbers. I have ways to sense events originating from the device, but the interaction subsystems(X11, Explorer, etc.) aren't extensible to handle new types of interaction events, so I need to capture and transport my own events to and from the software to which they're bound.

Also most of the applications I'd like to control cannot be modified to respond to these new types of events. And simulating hot-keys and shortcuts sequences aren't expressive enough, although it would take advantage of existing interaction subsystems. This is why I'm interested in platform specific frameworks, so I can take advantage of pre-existing hooks to control software in the wild.

Since this is for user interaction, it needs to have low latencies. I'd like to have the option of stateless, asynchronous communication also.

I've thought about this question and I realize I needed to ask two questions. One is about high level IPC, and the other is about object component models which allow you call methods on a software object.

--original question--

What communication/component frameworks provide functionality most similar to Windows Communications Foundation on Linux and Mac OS X?

My research group is beginning to develop some type of application development framework for interactive applications which involve new types of devices to manipulate/interact with software applications. We want use an adapter pattern to provide abstractions for device/device application/application or device/application communication so that software built with this framework will be portable across the 3 major OS platforms.

+1  A: 

The nearest cousin would be libsoap and equivalent SOAP libraries in your language of choice.

chaos
Cousin is a little too much, SOAP is only a small part of WCF. But if what corntoole really wants is just some communication, SOAP might be a good way.
OregonGhost
The SOAP answer kinda leaves me wanting; maybe as a message format, but I'm more concerned about low-latency communication mechanisms, preferably with high-level semantics like a publish/subscribe model.Also I'm interested in communication that hooks well into the OS interaction stack so I can control/interact with software that I can't modify with a finer granularity than simply simulating hotkeys and keyboard shortcuts.Maybe I'm not asking the right question.
corntoole
+3  A: 

Here is a list of guides related to networking on Mac OS X It covers different levels of networking from low level socket communications up http://developer.apple.com/documentation/Cocoa/Networking-date.html#doclist

It covers:

  • Core Foundation networking functions to work with low-level BSD sockets.
  • Cocoa stream classes to read data from and write data to streams.
  • Web Services client-side frameworks available in Mac OS X.
  • Bonjour in Cocoa or Carbon applications.
  • URL Loading System to manipulate URLs and transfer URL contents
  • Distributed Objects Programming - communication between Objective-C objects in different threads or different processes

Otherwise Mac OS X is fully Posix compliant unix system so you will find similar IPC system as found on Linux.

Or maybe you are after Mac OS X System Services, system that allows one application to access functionality of another application. Application advertise the services they provide. For more details read linked Apple documentation.

stefanB
Like I said earlier I wish I could accept more than one answer. On the Mac side, there are a multitude of IPC mechanisms. As far high-level communication models, there are Notification services:http://developer.apple.com/documentation/UserExperience/Conceptual/PreferencePanes/Concepts/Managing.html#//apple_ref/doc/uid/20000703-102786Considering the degree to which various Mac apps are scriptable via AppleScript, there has to be a well-defined application model which can be transformed in a straight-forward manner.Either way I have some good leads.
corntoole
I went ahead up-voted this one since I had been tagged with the answer. That seems fair.
supercheetah
+3  A: 

If the Linux apps are modern enough, you might be able to take advantage of D-Bus. It's the offspring of DCop from KDE primarily, and, to a lesser extent, Bonobo from GNOME, so if it's older, you might look one of those things up. Of course, that assumes that it uses one of those toolkits.

If it's even older than that or uses a toolkit without any high-level IPC (e.g. Motif (I think)), you may end up having to resort to pipes, sockets, fifos, and anything else I might have forgotten. That assumes, of course, that the app has some kind of hooks for that stuff.

supercheetah
I wish I could accept two answers since the answers by both supercheetah and stefanB combine to answer my question. I think I should have posed this question as two separate questions, one for Mac and another for Linux. The D-Bus wikipedia article provides the best reasons why D-bus is what I'm looking for on Linux.http://en.wikipedia.org/wiki/D-Bus#Architecture- OS <-> application communication- pub/sub communication model- capability to expose functionality as service
corntoole
+1 ................
stefanB