IPC with Squeak
Bert Freudenberg
bert at freudenbergs.de
Wed Jan 2 21:45:56 UTC 2008
On Jan 2, 2008, at 22:10 , Michael Haupt wrote:
> Dear all,
>
> here's a little scenario for which I can imagine an implementation
> that I don't like, though.
>
> A process is talking to a running Squeak VM/image, sending it
> requests. Squeak responds. Through what channels could both requests
> and responses be sent?
>
> I can imagine using networking (sockets), but since the process and
> Squeak VM will surely be running on the same machine, that seems a
> little bit exaggerated. Are there other ways of doing IPC with Squeak
> that exist in the form of a loadable package? (Or would they have to
> be implemented?)
Which platforms do you need to support? IPC is inherently platform-
dependent.
Sockets aren't all that bad I'd say, it's a standard way of doing
IPC. Ian's new Socket Plugin supports all socket families so you do
not have to use network sockets. Has not been tested on non-Unix
platforms yet AFAIK, though.
Another possibility would be using pipes - I had the OLPC image
communicate with a Python wrapper via AsyncFile for a while (we now
switched to the DBus plugin).
And OSProcess lets you connect processes via stdin/stdout.
How would you do it if you were coding in C?
- Bert -
More information about the Squeak-dev
mailing list
|