Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader Writer #434

Open
Admia1 opened this issue Jul 18, 2021 · 0 comments
Open

Reader Writer #434

Admia1 opened this issue Jul 18, 2021 · 0 comments

Comments

@Admia1
Copy link

Admia1 commented Jul 18, 2021

There is some reader writer problems when you develope a web application, for example a django application witch sells tickets and the problem become more complicated when you need to add cache to your application.

user_A request for available tickets user_B changer available tickets, but user_B's response posts first and empty dirty cache but user_A' response old data will dirty cache while caching the response data.

I like to have some reader writer function or decorator to stop multiple writers or a writer and a reader executing webservice+cache to stop such problems to take place.

it can be implemented by locks a counter.

I think there is 2 policies to face this on reader writer problem wait for readers to stop then let the writer do his job or don't let readers go in while there is a writer waiting or executing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant