CouchDB support

9 views
Skip to first unread message

Tommy

unread,
Jul 12, 2010, 5:52:27 PM7/12/10
to Caffeine For Linux
So, I don't know if this is something we want, but I figured it would
be a cool thing to hack on - so I implemented CouchDB support into
Caffeine. That means that the "blacklist" (why is it called
"whitelist" in the code, when it's actually a blacklist?) is moved to
a document-oriented database that can be synced between desktops using
Ubuntu One.

I've just been hacking on it for two hours, so I'm sure it's still
buggy as hell, but my initial testing seems to show that it's working.
If you guys want to check it out, I'll be creating a branch for it in
a bit.

I don't know how well supported DesktopCouch (the CouchDB API I'm
using) is in other distributions, but it's been out for like 8 months
now, and I know there have been lots of talk of having it installed by
default in loads of distributions. Applications such as Gwibber
already make use of it.

Let me know what you think. I'll add the branch in a bit.

Tommy Brunn

unread,
Jul 12, 2010, 5:57:41 PM7/12/10
to caffeine-...@googlegroups.com

Tommy Brunn

unread,
Jul 12, 2010, 6:02:49 PM7/12/10
to caffeine-...@googlegroups.com
Heh. Slightly embarrassing, but it turns out it doesn't work if there
isn't a record in the database already. Working on it though, so
hopefully I'll fix it before I got to bed.

Tommy

unread,
Jul 12, 2010, 6:09:04 PM7/12/10
to Caffeine For Linux
Alright. It should be fixed now. It was a fairly simple fix. I was
just being dumb there for a moment.

Brad Smith

unread,
Jul 12, 2010, 8:12:34 PM7/12/10
to caffeine-...@googlegroups.com
That's a neat idea. Keeping it in a DB means that we could add other
fields, like a checksum of the executable (to be sure we have exactly
the right one), or a time to activate for specific executables. I
can't exactly think of what the application might be for these extra
fields, but I'm sure there must be something.

Brad

Tommy Brunn

unread,
Jul 13, 2010, 3:32:06 AM7/13/10
to caffeine-...@googlegroups.com
A checksum of the executable might not be a great idea, since the
binaries can be updated and thus have their checksums changed. But sure,
we could save other stuff in there as well if we wanted to. It's a bit
funky (the documentation is the worst I have ever seen) to work with
though.

One thing that we definitely need to change is that currently the old
whitelist is imported into the database (if it's not already in there)
every time Caffeine is run. That should probably be part of the
post-installation stuff, rather than something that is run as part of
Caffeine. Otherwise the same processes would be imported every time you
start up, even if you removed it from the database.

Reply all
Reply to author
Forward
0 new messages