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

Database Page Stores do not work with farm mode #24

Closed
paul90 opened this issue Nov 26, 2014 · 4 comments
Closed

Database Page Stores do not work with farm mode #24

paul90 opened this issue Nov 26, 2014 · 4 comments

Comments

@paul90
Copy link
Member

paul90 commented Nov 26, 2014

All the database based page storage options do not work correctly when the server is run in farm mode. This is caused by each of the servers in the farm get started with the same database configuration. So, they are all accessing the same data.

An issue is raised for this issue in each of the storage option repos.

@WardCunningham
Copy link
Member

Yikes. Is this a consquence of fedwiki/wiki-server#79?

Did this ever work? Is this an oversight in our handling of parameters or a fundamental flaw in our new way of handling requests to farms.

@paul90
Copy link
Member Author

paul90 commented Nov 26, 2014

Discovered while looking at Docker, now I understand what was preventing that from working as expected. So, using the currently published version of the wiki and wiki-server packages - so using the pre- fedwiki/wiki-server#79 version of the code.

From a quick glance I am don't see how the database page stores ever worked in farm mode. There is nothing in the code, as far as I can see, to indicate how pages for different sites within a farm should be stored.

@WardCunningham
Copy link
Member

Ah. Whew. We do no harm by moving forward with @nrn and my refactoring. However it would be a good time to look into this and maybe expand the db interface if appropriate.

This would seem to be an issue of multiple keys: site and slug.

I remember reading in LevelDB documentation that keys could be formed by concatenation in such a way that a single db could hold a file hierarchy. They explained how one could coax that db to produce a list of files in one directory, or in our case, slugs in one site. For SQL one would just use two keys and set up indices appropriately. I don't know how this would be handled in other key-value stores.

Now I understand why you wrote an issue for each storage module.

@nrn
Copy link
Member

nrn commented Nov 26, 2014

The levelDB one is actually ok, it bases it's db location on argv.data, which is modified per wiki by farm.coffee.

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

3 participants