IPC with Squeak
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Jan 3 00:03:44 UTC 2008
The os-x carbon vm uses shared unix memory (various flavours of that)
to share a semaphore flag, some coordinates and the squeak screen
The semaphore was needed to prevent race conditions on dual processor
machines when squeak is updating the screen buffer, and the browser
frantically tossing draw commands to the browser display surface.
Actually the details on how to setup the shared memory space is in
typical unix fashion clouded with man pages that don't say how it
actually needs to be coded.
If not done just quite right, then it doesn't work, so just look at
the squeak VM mac os source.
For this usage it didn't make sense to shove 180MB a second thru a
pipe or socket so that you could have 1024x768 60 fps drawing in the
On Jan 2, 2008, at 1:45 PM, Bert Freudenberg wrote:
> 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-
> 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 -
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Squeak-dev