[KimDaBa] I'm giving up on the SQL backend - unless you can help one way or the other

Jesper K. Pedersen blackie at blackie.dk
Fri Jul 22 08:28:31 BST 2005


The code is actually in SVN trunk now. I decided to keep the interfaces I 
made, so future work could gain from that - I do actually consider trying 
another XML parser (hoping for better speed), and make that a separate 
backend.

First to get started, you need to configure kimdaba using --enable-sqldb. All 
the code specific to SQL is found in the sqldb sub directory.

sqldb/setup is a script for setting up a mysql db with the right tables - you 
may need to mess with the script to get it working. Currently kimdaba just 
assumes root access to the db, so that is something that needs fixing.

Once you've set up the db, you would may convert your own XML db to a mysql db 
by choosing convert backend from the maintenance menu.

The entrance to understand the code is the class SQLDB found in sqldb/sqldb.h, 
this is the interface a backend must implement.

This is what needs more work:
- missing handling of member groups (currently I think it just reads them all 
in at startup (SQLDB::loadMemberGroups) but that is of course no good if 
someone else changes a member group. Actually the class MemberMap needs to be 
made into a virtual class that subclasses can implement in the same way as 
had happend to CategoryCollection.

- Looking at the code I suspect that handling of Md5map in sqldb needs some 
fix up too.

- the datebar is now working when no categories has been selected, but when a 
category has been selected, then it needs to return only those items from 
that category. (see SQLDB::rangeCollection)

- Speed of the existing queries may in general not be too good.

- Implementing of a decent way to choose backend. Should someone get the SQLDB 
in a releasable state, then I can indeed work on that part.

- and last but indeed not least. Error handling. With a current DB, things may 
go wrong with each and every query. KimDaBa shouldn't just crash, instead it 
just offer the user to try and rerun the query, or unwind the effect of the 
query in some way.

Finally, notice I dont think the XML backend is backward compatible with 2.1, 
so if you save your index.xml file using the XML backend, then you might not 
be able to go back again, so please work on a copy of the file.

Kind regards
Jesper.

On Friday 22 July 2005 03:50, Evan Heidtmann wrote:
| I've been looking forward to the SQL backend. This is bad news!
|
| How far along are you? What still needs work?
|
| Can you please put your code up somewhere? I *might* be able to help
| with some coding over the next few weeks, but I don't want to commit to
| anything without at least taking a look at the code. I'm sure there are
| at least a few other potential developers lurking in the shadows who
| would like to see what you've written so far.
|
| Thanks for such a great piece of software!
|
| Evan Heidtmann
|
| On Mon, 2005-07-18 at 21:29 +0200, Jesper K. Pedersen wrote:
| > For many month I've been working on making it possible to use a SQL
| > backend for kimdaba. This has changed from being fun to being something
| > which is dragging energy out of me.
| >
| > In Danish we have a saying that at some point you gotta stop putting good
| > money into saving bad money. Which is the point I've reached now. This is
| > the point where I either stop with this now, or KimDaBa will likely not
| > survive.
| >
| > For me kimdaba is about fun programming, kimdaba *must* be something I
| > long to do when I'm at my daytime job programming, otherwise I could just
| > as well do overtime at my daytime job.
| >
| > If you think this is important enough for you as a kimdaba user, there
| > are two things you can do:
| >
| > 1) take over the SQL backend stuff. I've made a LOT of changes to kimdaba
| > overall, so it now is more appropriate for plugin in a new backend, so a
| > SQL backend would be possible to finish without touching too much of the
| > rest of kimdaba. (Yes I will be as paranoid about someone touching the
| > core kimdaba code as always, but you would get free hand in the SQL
| > backend part, and I would prioritize any patches from you to the rest of
| > kimdaba to get things working in the backend.)
| >
| > 2) you can make this into a day time job for me - well I'm not going to
| > quit my day time job, but getting money from kimdaba developing in the
| > evenings would nevertheless be a motivating factor. If you are interested
| > in this option write me a personal email, and we may discuss conditions.
| >
| > Kind regards
| > Jesper (Who will continue working on kimdaba for many years to come one
| > way or the other ;-)
| >
| > _______________________________________________
| > KimDaBa mailing list
| > KimDaBa at mail.kdab.net
| > http://mail.kdab.net/mailman/listinfo/kimdaba

-- 
Jesper K. Pedersen          |  Klarälvdalens Datakonsult
Senior Software Engineer    |  www.klaralvdalens-datakonsult.se
Prinsensgade 4a st.         |
9800 Hjørring               |  Platform-independent
Denmark                     |  software solutions




More information about the Kphotoalbum mailing list