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

curdling.web.Server doesn't work in multi-process environment #53

Open
suzaku opened this issue Nov 6, 2013 · 5 comments
Open

curdling.web.Server doesn't work in multi-process environment #53

suzaku opened this issue Nov 6, 2013 · 5 comments
Milestone

Comments

@suzaku
Copy link
Contributor

suzaku commented Nov 6, 2013

I'm trying to reuse curdling.web.Server to set up a curdling server in a WSGI app engine:

args = Namespace(curddir=curddir, user_db=None, debug=False)
server = Server(args)

After one of the worker handles an upload, it updates its server.index.storage, while the index.storage of the other workers stay the same.

@clarete
Copy link
Owner

clarete commented Nov 6, 2013

Thanks for the report! I'm about to release a new version with improvements in the overall stability of the installer and a handful of other bugs, but I feel like refactoring the indexer will be the thing for the next release.

If you can think of any quicker solution for your problem, we can just take a short path for now and than iterate on the server component in the next release (after refactoring the indexer).

@suzaku
Copy link
Contributor Author

suzaku commented Nov 7, 2013

@clarete I'm considering making the indexer configurable in the Server class. Then I can use a subclass of Index, storing the storage dict in memcached, which can be accessed across multiple processes and machines.

@suzaku
Copy link
Contributor Author

suzaku commented Nov 7, 2013

@clarete Maybe I'll also need a distributed lock to replace RLock.

@clarete
Copy link
Owner

clarete commented Nov 7, 2013

@suzaku Your idea sounds amazing to me. However, I'm still trying to kill some very basic bugs in other areas so I might take a while to be able to work on the server.

The bright side is that I won't even touch that code for a while, which means that you can just go ahead and implement that if you want. I'll certainly be happy to apply the patch.

I can help in one thing or another about tests, since we should definitely start adding the web module to the coverage check.

Thank you for your report and the valuable ideas you gave so far.

@clarete
Copy link
Owner

clarete commented Nov 7, 2013

Just a heads up, you should take a look in our Milestones. I targeted this feature to the version 0.6.0 but I'd certainly be happy to change that milestone if I had someone else working on that.

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

2 participants