Re: Eliminating inter-request race conditions

2022-01-08 Thread Nick Farrell
I thought I'd post a little update, as I'm fairly happy with my progress: Here's the repo's readme. I haven't actually pushed the package to pypi so don't try to follow the instructions yet, but any feedback on the README's content is very welcome:

Re: Eliminating inter-request race conditions

2021-12-31 Thread Carsten Fuchs
Hello, Am 31.12.21 um 11:31 schrieb Nick Farrell: > Correct. To be clear, I am not advocating this behaviour by default, but > making it as seamless as possible to enable when required, rather than > needing to attempt to hand-roll safe locking semantics each time it's needed. Thanks for the

Re: Eliminating inter-request race conditions

2021-12-31 Thread Nick Farrell
Good to hear from you Carsten. Thanks in advance for your comments. I'll see what I can address now: > > > *2)* Not being able to safely lock a model/queryset beyond the lifetime > of the request. > I don't quite understand this. It sounds like pessimistic locking? Correct. To be clear, I am

Re: Eliminating inter-request race conditions

2021-12-31 Thread Carsten Fuchs
Hi Nick, I've thought a bit more about this, but it seems that my requirements are different from yours: E.g. I don't need the client-side validation and especially don't want the complexity that goes with it; on the other hand, I need something that also works with formsets, not only with

Re: Eliminating inter-request race conditions

2021-12-28 Thread Nick Farrell
Thanks for the reference Carsten. I believe the approach I am taking, regarding optimistic locking, is superior to what is proposed in that thread. Specifically: - there is no need for a special version field to be added to the model - because forms only update specific fields in the associated

Re: Eliminating inter-request race conditions

2021-12-28 Thread Carsten Fuchs
Hi Nick, maybe this is a case for optimistic locking? Does the thread at https://groups.google.com/d/msg/django-users/R7wJBTlC8ZM/MIzvYkWyCwAJ help? Best regards, Carsten Am 27.12.21 um 06:36 schrieb Nick Farrell: > Hi all. > > I've been using Django for quite a number of years now, in

Eliminating inter-request race conditions

2021-12-27 Thread Nick Farrell
Hi all. I've been using Django for quite a number of years now, in various ways. Most of the time, I find myself needing to create custom solutions to solve what appears to be a very common problem. During the Christmas downtime, I decided to scratch this itch, and am putting together what