[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Re: Hello list
From: |
Nicolas Petton |
Subject: |
Re: [Help-smalltalk] Re: Hello list |
Date: |
Sun, 23 May 2010 15:32:36 +0200 |
Hi guys,
> So if any of you could write a blog post about how to use images for
> GST apps that would be really great.
Sure, I can do it, but I think our use of images is pretty specific to
web applications.
I'll try to write more details in a blog post, but the basic idea is
that we load all our packages and save the image with a bash script like
echo "PackageLoader fileInPackage: '...'. ObjectMemory snapshot:
'foo.im'" | gst
This way we can start gst with all our packages very quickly.
Then we start the image with loaded packages with gst-remote.
We don't use the image itself as persistence, instead we save all our
data in binary (using ObjectDumper) or xml format. This means we always
have all our data loaded in memory and that we save the entire database
each time. We can afford it since we don't have too much data, and for
small applications I think it works fine. Of course if you have 40Gb of
data, it may not work for you.
Another interesting use of images for us, since we have one image and db
per website, is to stop gst-remote and make a snapshot (this time with
all data loaded) when all sessions expire. Then we would restart them
for the next request. We didn't try it in production yet, but our
experiments seem quite conclusive.
Cheers,
Nico
signature.asc
Description: Ceci est une partie de message numériquement signée