Seaside 书说:“在处理 http 请求时保存 [图像] 是您想要避免的风险”。
为什么是这样?它只是暂时减慢服务 http 请求的速度还是请求会丢失或会发生错误?
最佳答案
似乎这只是一个让事情变慢的问题。有this quite thorough thread在海边列表中,最相关的帖子是this case study电子商务网站:
Consequently, currently this is what happens:
- image is saved from time to time (usually daily), and copied to a separate "backup" machine.
- if anything bad happens, the last image is grabbed, and the orders and/or gift certificates that were issued since the last image save are simply re-entered.
And, #2 has been very rarely done-- maybe a two or three times a year, and then it turns out it is usually because I did something stupid.
此外,Smalltalk 的一大优点是运行快速实验非常容易。您可以下载 Seaside 并暂停其中一个示例的回调。例如:
WACounter>>renderContentOn: html
...
html anchor
callback: [
self halt.
self increase ];
with: '++'.
...
您会看到计数器正确递增,保存没有明显的不良影响。
关于smalltalk - 当我在处理 http 请求时保存 Pharo 图像会发生什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11070716/