[aida] Image as a database (was Re: About observee)

Stefan Schmiedl s at xss.de
Tue Jun 5 20:28:49 CEST 2007


On Tue, 05 Jun 2007 11:40:42 +0200
Janko Mivšek <janko.mivsek at eranova.si> wrote:

> Have you already considered a Smalltalk image as a database?

Yes. That would be sooo good ...

> 
> Smalltalk image contains live objects too besides to compiled code.
> And those live objects can be your app data. You can snapshot (save)
> an image from time to time to save your "database".

That's what I'm doing right now with my ruby webapps, with one caveat,
described next.

> Question arise: is such database safe? What if your image crash in
> the middle of a hour between snapshots?

More important: How can I get to the data in case of
- system failures
- VM crashes
- updates

I was caught unaware once, when Dolphin 5 refused to load an object
serialized with Dolphin 4. So nowadays I wear suspenders in addition to
a belt and *also* serialize my application data in a neutral form, in
case of the ruby apps it's YAML. About once an hour or so. And mail the
backups to a remote machine. Yes I'm paranoid about my clients' data :-)

> 
> This could be a problem is image would crash frequently. But from 
> experience so far a VW  is very stable and above mentioned image is 
> running for months without stop and it never crashed so far. Even if
> it will, we loose only one hour of data, which is acceptable for all
> but very specific apps.

This touches upon an area that I have no experience with, but need to
deal with sooner than later: Changing a remotely running application in
VW. One of the charming properties of IOWA is that you can change the
page related files and they will be reloaded (more or less) immediately.
If I'm living in an image-centric world, I guess I'll have to find a
way to periodically check for updated packages and file them in. I
wonder how often I will manage to break things there .-)

> 
> So, I recommend you to reconsider your image as a sole database and 
> you'll be suprised and ask yourself why you didn't come to that idea 
> before :)

I would, if I could, but I cannot, you know. The current project gets
the bulk of the working data from a MSSQLServer database and, sadly,
needs to save it's "own" data back into this thing. I'm currently
undecided if it makes sense to try and fit Glorp to the messy database
schema or if I'm having a better outlook with reinventing some smaller
wheels.

BTW: AIDA behaves quite well, only I'm making *stupid* errors ... like
adding an element to self instead of the collecting WebElement.

s.


More information about the Aida mailing list