Generic Bridges

Bruce Cohen cohenb at gemstone.com
Wed Dec 9 18:36:55 UTC 1998


"C. Keith Ray" <ckray at pixera.com> writes:
>> Does anyone on this mailing list have experience implementing distributed 
>> objects in smalltalk?

Yes, we've done that a lot here at GemStone.  We ship a client-server
product whose server VM is our own Smalltalk, and whose client can be
ours, VisualWorks, or VisualAge (we still support existing customers
with VSE clients as well).  Almost all the distribution infrastructure
code is in Smalltalk, the C code is of two kinds: methods that were
ported to C for speed, or low-level communication and process control
code that already existed in our system.

>> It seems those techniques could also allow calling into specific squeak 
>> objects from outside squeak.

Many (most?) Smalltalk implementations have a 2-way primitive interface,
C -> Smalltalk and Smalltalk -> C.  I've wanted to implement an OO <->
OO primitive interface (both C++/Smalltalk and Java/Smalltalk have been
discussed here), but there was never enough business justification for
us to spend the time.  Objective-C would be a good choice, I think.

Calling into Smalltalk is really no harder than implementing a
performInSmalltalk: methodName withArgs: argArray method in the source
language which translates to perform: in Smalltalk.  The harder parts are
figuring out how to map static types, how to handle exceptions, and
making your debugger not blow its brains out when it sees a mixed
language stack.
-----------------------------------------------------------------------------
"'Bother,' said Pooh, as he called in an airstrike."
-----------------------------------------------------------------------------
Bruce Cohen,                               |  email: cohenb at gemstone.com
GemStone Systems, Inc.                     |  phone: (503)533-3602
20575 NW Von Neumann Drive                 |  fax:   (503)629-8556
Beaverton, OR USA 97006                    |  web:   http://www.gemstone.com





More information about the Squeak-dev mailing list