documentcloud / cloud-crowd

Parallel Processing for the Rest of Us

Home Page:https://github.com/documentcloud/cloud-crowd/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLite3 as default DB?

delagoya opened this issue · comments

Instead of MySQL?

Um, sure. You mean for the test DB? Sounds fine. Do you think it would be appropriate for a production DB for this use? Stepping down this path means creating a whole suite of db management tools in 'crowd', I think -- perhaps something we should stay agnostic about.

no not appropriate for production. Ah, I just looked at the rake task for creating the test DB and it is MySQL specific.

Well the good news about the SQLite3 driver is that if you connect to a file db that does not yet exist, it will be created on the fly. Hence

crowd load_schema

will still work with a database.yml file that has:

# This is a standard ActiveRecord database.yml file. You can configure it 
# to use any database that ActiveRecord supports.

:adapter:  sqlite3
:database: cloud_crowd.db

I'm sorry -- scratch the previous comment -- I'm still half asleep. You mean in database.yml... The central database (and work queue) is the only real bottleneck that prevents a CloudCrowd installation from scaling. I think it's proper to have the more robust MySQL be the default database adapter. You know what they say about defaults ... they never get changed.

That's good news -- here's the plan. MySQL stays default in config.yml -- I'll add a commented-out bit about SQLite for development, with the simple sqlite configuration. For testing, SQLite will be the default, and I can get rid of that rake task.

sounds good.