Re: Lightweight IPC for scripting

Miles Egan <[email protected]> Sun, 07 Sep 2003 08:59:36 -0700
Newsgroups gmane.lisp.clump
Message-ID <[email protected]>
Daniel Barlow wrote:

> - designed for 'scripting': sending fairly high-level commands to
>   applications.  For example, you might send 'mute' or 'play tracks
>   3-6' to your cd player; you might send 'load foo.png, add label at
>   (100,100), save it' (that's three commands) to a graphics editor,
>   or you might send 'gnus' to your emacs
>  
>
This is an interesting idea.  Certainly a lot more appealing than CORBA 
or some other IPC monstrosity.

Do you think you'd have to introduce the notion of an object model at 
some point or would it be enough to provide some kind of opaque object 
handle and let each application define the commands to which it would 
respond?  It seems like you'd want to be able to iterate through 
collections, at a minumum.

> - talks to the apps that you can see on the screen (as opposed to the
>   apps running on your machine, or local network, or local filesystem,
>   or under your uid, or ...).  We achieve this by communicating via 
>   X properties; this also gives us security (or as much security as
>   the user already has, which may not be the same thing) via xauth
>  
>
Do you want to restrict it to X apps because the security concerns are 
simpler?  A simple IPC mechanism like this could also be useful for 
chatting with daemons.

> - implementationally lightweight: shouldn't be more than a few
>   screens of code to implement; certainly shouldn't require buying
>   into some large library or framework.
>  
>
I'll have a look.  Sounds cool.

Devil's advocate question - couldn't you do something like this with a 
more conventional (to the unwashed masses) infix syntax with a simple 
yacc/bison grammar?  I guess it wouldn't matter if it's not something 
people use interactively, but people's allergies to parentheses might 
drive them to add a little extra weight for a syntax they find more 
palatable.

miles