Search code examples
smalltalkgemstonesmalltalkx

What is **the** way to interconnect two Smalltalk(s)?


If I would like to interconnect two Smalltalks, namely Smalltalk/X with GemStone/S, what approach would you recommend? I would like to have an application in Smalltalk/X with persistent objects in GemStone/S.

Prior to any development I tried to investigate the issue. I have found some open-source implementation done - I like to learn from others mistakes so I don't repeat them.

I have found an implementation for Pharo - gt4gemstone - Glamorous Toolkit for remote work with Gemstone/S.

I have found also from James Foster - Jade which achieves more as it is an

Alternative Development Environment (IDE) for GemStone/S that runs on Microsoft Windows.

Where would you recommend to start? Would it be to read the gt4gemstone or Jade and then come up with similar way to interconnect Smalltalk/X with GemStone/S?


Solution

  • Glad to hear of your interest in GemStone (one of my passions!). The key to interoperability with GemStone is to provide a wrapper for the GemStone C Interface (GCI), a C library used to connect to GemStone. This is the method used by every GemStone client (whether C, Smalltalk, or something else) to communicate with the system.

    For a Smalltalk example, see GciLibrary* and GciSession in Jade.

    For a couple other recent examples that might be cleaner starting points, see GciForJavaScript, GciForPython.

    For an older (ruby) example see gemstone_ruby.

    So, I'd suggest that you investigate what Smalltalk/X has for a Foreign Function Interface (FFI), then follow the examples above to connect to GemStone.