Hi Jiri,
On Fri, Nov 21, 2014 at 2:46 PM, Jiří Sedláček
<
yirie.se...@gmail.com> wrote:
> Just notifying that we used the retry solution after all. POSTs are (in our
> case) almost always idempotent. When not then nothing really bad happens so
> we can live with it.
>
Cool. Thanks for sharing it!
Depending on the task, it's often also possible to make non-idempotent
queries idempotent, by first creating a "cookie" that is put in redis
or memcache, and checking it before doing expensive operation.
"cookie" expire time should be equal to total time request can be
repeated, so usually kinda couple of tens of seconds. The downside is
more complex handing of the operation on client, and working with
redis/memcache. The upside however is that it handles not only retries
between zerogw and workers, but also network failures between client
(browser) and zerogw.
--
Paul