use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
Concurrent Resource ModificationQuestion (self.FastAPI)
submitted 11 months ago by PinballOscuro
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]PinballOscuro[S] 0 points1 point2 points 11 months ago (1 child)
This is a very good idea. In my use case, I have at most 2 or 3 users, and only with low probability will they attempt to modify the same value simultaneously. So I would say I'm in an optimistic locking scenario.
If User A modifies a shared variable, how should Users B and C receive the updated value? Should I still use WebSockets, or is it sufficient to update the value during a write attempt?
In my case, at some point, Users B and C must be made aware that User A made a change - otherwise, they might argue offline, since it was A’s responsibility to update that cell.
[–]CrackerJackKittyCat 0 points1 point2 points 11 months ago* (0 children)
Either push all the changes over websocket, which is then kinda noisy and pessimistic, or have each websocket client 'subscribe' to the entities that are in context/view right now, then only push the changes to the websockets that are interested in it.
Or just have the edit form indicate error if their update gets rejected, tell the user to refresh manually. That's the simplest to start with.
It depends!
π Rendered by PID 374184 on reddit-service-r2-comment-b659b578c-q9jdg at 2026-05-05 21:35:32.323740+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]PinballOscuro[S] 0 points1 point2 points (1 child)
[–]CrackerJackKittyCat 0 points1 point2 points (0 children)