Non-Equivalent Retries

Greg Young <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CAC9RQtiiXHXk0Q_snKY-Ovqh0dLHv+u6s=8TK-3mQ1VbVbLXEA@mail.gmail.com>
I have been having some discussions lately with people about retries
in a restful system and whether or not its appropriate for the caller
to specify that it is a retry.

The specific situation is that in a particular kind of post we can be
very expensive to assure idempotency. A retry flag on retries would
make us hit this expensive logic only if it were actually a retry.

I can see both sides of the discussion. Setting a retry flag on a
retry actually makes it a new message not a retry of the existing one.
However there would seem to be many places where knowing something is
a retry can be valuable (we have another place where over our custom
TCP protocol if we retry from a master node to another node we mention
"by the way we think he might be dead" which can speed up the finding
of dead master nodes.

Back to the specific situation. What would happen is the client could
still retry in a normal form but would receive a lower idempotency
contract (eg it doesnt break say a browser use case, you just get a
lower contract if you don't understand the concept of a retry). In
particular retries are assured to be idempotent for a period of time
where as if you can specify that its a retry we can give pure
idempotency.

Thoughts?

Cheers,

Greg

-- 
Le doute n'est pas une condition agréable, mais la certitude est absurde.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.