So I've been using Smalltalk for about 6 months now (Squeak and Pharo), mostly doing data analytics, and I'm about to start my first Seaside app. So my question to all you Smalltalkers out there is, what is your favorite persistence solution? I've been looking at Magma, GOODS, and GLORP. I'm a long-time python hacker, so I get ORM, but it seems like Magma or GOODS would be a better solution, since they seem object-oriented.
A quick note: I want to scale my app across multiple VM's, so just saving data to the image wont really work.
Thanks!
If you want to scale across multiple VMs, you might want to to take a look at GemStone/S.
Be aware, however, that GemStone is a proprietary, commercial product. So, you will have to pay for it. However, the pricing model is generally designed in such a way, that if you need a bigger edition then you will generally also have the users to pay for that edition. The prices start out at 0 $ for the 4 GiByte disk / 1 GiByte RAM / 1 CPU version.
Another thing to note is that GemStone Smalltalk is its own dialect, so your Squeak code will probably not run unmodified, but should be fairly easy to port. (For example, the GemStone engineers have created an adapter that allows you to load Monticello (Squeak's version control system) packages into GemStone/S, also they generally make sure that Seaside runs.)
So, what is GemStone? Basically, it's a distributed VM with automatic object persistence. It's easiest to explain compared to a normal Smalltalk VM. If you have two Smalltalk VMs running side-by-side, each of them has its own Object Memory (i.e. the thing the garbage collector manages). And that Object Memory is in RAM. In GemStone, all VMs in a cluster share the same Object Memory and it lives on disk, not in RAM. So, you don't need a database, not even an object-oriented one, because your objects are "just there", everywhere, all the time.
(That's only a very simplistic description. For example, the heap is not really shared across VMs. That wouldn't make sense, you wouldn't want to replicate every temporary object you create across the network. Instead, you have a global repository object (basically, a dictionary) and just like the garbage collector will start at some well-known root object and then keep all objects that are reachable from there, and delete those that aren't, GemStone will start at the global repository object, and persist/replicate only the objects that are reachable from there.)
GemStone also has database-ish features, so access to the global repository is wrapped in ACID transactions, and there is a SQL-inspired but Smalltalkish query language.
GemStone has a nice appliance that they call "GLASS" (for GemStone, Linux, Apache, Seaside and Smalltalk) analogous to the well-known "LAMP" (Linux, Apache, MySQL and PHP). GLASS includes the gratis edition of GemStone with Seaside preinstalled and everything setup with Apache running on top of Xubuntu, everything neatly packaged into a VMWare disk image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With