[Seaside] saving an image while serving
Nevin Pratt
nevin at bountifulbaby.com
Mon Apr 18 17:25:13 UTC 2011
>
>
>> I just didn't get Nevins approach. On the one hand he has everything in his
>> image on the other hand he can "pull back in data" after experiencing a
>> crash. That doesn't fit in my head. Nothing more I wanted to know.
>>
> I don't know how Nevin does the "pull back in data" but if you wan't an idea
> to start visualizing that happening think a SIXX dump being read in a fresh
> image. There is even a guy that worked on a way to do that streaming the XML
> to dump big data.
>
> Another idea is ReferenceStream.
>
>
Remember, the primary data I "pull back" is inventory control data. In other
words, if the image crashes, the inventory needs to be adjusted for the orders
that were placed since the last image save. So, the question is: how is this done?
To answer that, please remember that the website sends emails for every order
placed. For each order, it sends a total of six different email accounts the
order details-- one is an email to the customer with their order confirmation,
and five of them are internal Bountiful Baby email accounts used for various
control purposes (incidentally, we also run our own email server, so any emails
sent to any internal email account never leave our internal network-- not that
it would matter, though).
For those "control" emails, it is trivial to have the website include a simple
URL in the email sent to one of the control accounts that, when clicked, replays
the order.
So, if the image crashes, I go grab the last backup image (which is usually just
a few hours old). I note the timestamp on the backup, and then I look at the
orders that were generated since that time. And then a few clicks later-- it's
all re-entered.
Folks, remember, if your Seaside application is sending emails every time it
does something that effects the data in the image, those emails *become* your
log history record. And, it is trivial to include whatever URL you want in one
or more of those emails to accomplish any kind of data replay you need. So,
just grab the last backup, click on some emails, and you are back in the game.
It is so darn simple, it's crazy. :-)
And it works. Just fine. Plus, I rarely need it, because it is so darn stable
anyway.
We actually also have a similar interface for our Endicia program for generating
shipping labels, customs forms, and package postage. The website includes a
different (but simple) URL in the email it sends to the email control account
going to the label/postage computer. While sitting at the label/postage
computer, folks click that link in the email, and the label (with postage) is
automatically generated for that order. All via a URL in the email. And,
(almost) nothing is ever hand-entered.
Nevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110418/63b6b029/attachment.htm
More information about the seaside
mailing list