GOODS "is an object oriented fully distrbuted database management system using an active client model." It is also described as a "language-neutral object database" with client interfaces for C++, Java and Perl. GOODS is written by Konstantin Knizhnik.
Avi Bryant developed a Squeak client for GOODS that allows transparent storage of Smalltalk objects. The client is now maintained for Pharo, Squeak and VisualWorks by David Shaffer and is hosted on SqueakSource3.
GOODS works over TCP and Unix domain sockets. However, the GOODS documentation doesn't actually describe how to configure for the latter. There is, however, a hint in the main configuration file "goodsrv.cfg":
In addition to the main configuration file, there is database-specific configuration file, which I've named "test.cfg", that looks like this:
This matches the configuration format:
Meaning, for test.cfg, I'm specifying one storage server, and it listens on TCP port 60060 on localhost.
But what about the Unix domain socket path? To find out, I set the server.remote.connections parameter to 0 and try it out:
What happened? Looking around, it is found that GOODS has created a Unix domain socket at "/tmp/localhost:60060". Yes, ":60060" is part of the socket's path name. Cute. Trying to use a more descriptive name like "goodsock" or whatever fails with "bad address". Hitting the GOODS source, unisock.cxx shows that that unix_socket_dir is hardcoded to "/tmp/", and that the file name format has to be "string:number".
Oh well. I've abstracted the procedure to obtain a Unix domain socket address from a path string from my previous post as follows:
However, asking for a Unix domain socket address for "/tmp/localhost:60060" causes primGetAddressInfoHost:blah:blah: to fail. Bummer.
Okay, it is easier to modify GOODS since I've been browsing its source, then to get well-acquainted with SocketPlugin. So, at line 107 of unisock.cxx, make this change:
The commented out line is the original. "hostname" is "address" minus the colon and port number that comes after it.
Rebuild GOODS, change the path in test.cfg to say "goodserver:60060", restart, and we see that the Unix domain socket is now called "/tmp/goodserver" and "NetNameResolver addressForSocketPath: '/tmp/goodserver'" duly returns a SocketAddress instance.
Next, load the Squeak/Pharo GOODS client from SS3. Subclass KKSqueakTCPSocketTransport as KKPharoIPCSocketTransport, with the single method:
Some other corresponding modifications are needed, such as in KKDatabase and KKConnection. Finally, in workspace, run this:
And it works!
Running "self logout" in the KKDatabase instance explorer from above results in additional output from GOODS: