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

add crate support to db module #635

Closed
wants to merge 1 commit into from
Closed

add crate support to db module #635

wants to merge 1 commit into from

Conversation

mfussenegger
Copy link

this pr adds support for crate in the db module.

Main reason was to use it together with a module that persists messages to the db (see https://github.com/mfussenegger/willie/commit/9add80281790be7b2e63fcf21a1f90489fab410f - but that needs a little more work and should probably be more generic to work with other db backends too)

@tyrope
Copy link

tyrope commented Oct 4, 2014

As good at this looks. I've stated before that starting Willie5 we're only planning to maintain SQLite

CC: @embolalia

@lramati
Copy link
Contributor

lramati commented Oct 5, 2014

What about placing alternatives in -extras/alt-dbs? Except that each module
there would be a drop in replacement instead of supporting everything so far AND the new thing.
We already don't commit to maintaining -extras, so it would be on the contributor to keep it up to date with whatever changes we make in core

@mfussenegger
Copy link
Author

Ah that's unfortunate. Didn't read that before sorry.

Is the topic of dropping support for everything but SQLite up for discussion? Maybe with pulling in sqlalchemy as a dependency the maintenance burden could be kept pretty low.

@embolalia
Copy link
Contributor

I've talked about this a bit in #194 and elsewhere, but to answer it more specifically to this case:

The biggest reason to support only SQLite is that it's also the only one which, if the bot can start, you can basically guarantee that it will be available. You don't need to start daemons or have the right credentials, or even configure anything at all. (5.0 will use a default file in ~/.willie. It'll be configurable, but you won't have to think about it at all.) This enables us to make having a DB a hard requirement to the bot's startup, which in turn removes a lot of boilerplate error handling.

One problem with dependencies in general (there are a few other reasons I'd like to avoid deps when possible, but this is the big one) is that the burden of people not being able to figure out how to install dependencies is non-trivial, as is the burden of figuring out all the various screwiness involved in setting them up. (Like auth on postgres or unicode on mysql, not to mention getting psycopg2 or mysqldb installed, both of which can be a pain in certain cases.) Willie isn't just for coders, and it's been a goal since the start to keep it as friendly as possible with as little technical knowledge as possible. SQLite, being available by default in 2.7, fills that role perfectly.

Moreover, Willie is an IRC bot, and scalability has never been a goal. Honestly, by the time you need more performance than SQLite, Willie itself will probably be choking. It may be that you want to connect it to the database of some other application which actually does scale well, but that's well outside the scope of the built-in db.

@embolalia
Copy link
Contributor

TL;DR, thank you, but this isn't within the scope of the project.

@embolalia embolalia closed this Oct 6, 2014
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

Successfully merging this pull request may close these issues.

4 participants