in reply to Adding idempotency to the monastery

It happend to me a few times where I ended up making duplicate post (I felt so ashamed ;/). I guess injecting a special 'unique' requestID for each potential post may be one good way of avoiding adding a duplicate post. However, i'm not sure if it would work for all cases. For example, for some of my lenghtier posts I would type my message up in xemacs and copy/paste it over to 'new node' form for posting. This also is helpful when perlmonks.org post process breaks in the middle of its job (such as when the server is timed out or etc). In such cases, I simply go back to empty form and repeat my copy/paste/submit steps. There was one particular occassion where I produced a duplicate post that way.

My thinking is this could have been eliminated had the server checked whether I had already made a post bearing, say, similar title within a short time span (say 1 hour or so). I'm not sure if this check should 'cause any further server loads, from where I sit it shouldn't ;-).

Also, there's yet another issue that may crop up with hidden form fields. This is especially true for server scripts/pages that are marked to never be cached. In this case, hitting 'Back' button would still cause the page to refresh (effectively loosing previous data). Therefore, we might have to consider including the requestID value right inside the URL. This way the URL is always there, and everyone is happy ;).


"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
  • Comment on Re: Adding idempotency to the monastery