This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Store configuration in database

-12

Votes
3
15
Tags: settings settings settings
(comma "," separated)
dodosoft
Registered Member
Posts
19
Karma
0
About the fsync bug Theodore wrote:
"[...] The final solution, is we need properly written applications and desktop libraries. The proper way of doing this sort of thing is not to have hundreds of tiny files in private ~/.gnome2* and ~/.kde2* directories. Instead, the answer is to use a proper small database like sqllite for application registries, but fixed up so that it allocates and releases space for its database in chunks, and that it uses fdatawrite() instead of fsync() to guarantee that data is written on disk. [....]"

What about it?
Can't find a place where it's discussed...

Last edited by bcooksley on Fri Mar 27, 2009 9:33 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This would be possible by creating a KConfig backend, then configuring KDE to use it ( somehow )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Brandybuck
KDE Developer
Posts
203
Karma
0
OS
If you get a corrupted database, you lose everything. It happens under Windows. Plasma crashed last night (again) and messed up its configuration. Thankfully it only messed up Plasma configs. If it had been a binary database handling everything, I would have lost all configuration. Theodore is a kernel developer, not a GUI or application developer. His expertise lies elsewhere. There's absolutely no reason why an application can't have its own configuration file.


Don't look back! (Or you might see the giants whose shoulders we stand on)
User avatar
neverendingo
Administrator
Posts
2136
Karma
17
OS
And don't forget the ease of modifying single text files like it is currently used.


New to KDE Software? - get help from Userbase or ask questions on the Forums
Communicate.
Image
dodosoft
Registered Member
Posts
19
Karma
0
Well, working with a database (f.e. sqlite) is
- faster than working with many single files (undisputable)
- safer: sqlite is transactional, a database is the state of art in terms of data recovery and consistency.

Well, I understand that one might want to edit the .config manually, but i suspect this happens for a short type of settings.
Who changes a panel position editing a text file?

Last edited by dodosoft on Fri Mar 27, 2009 5:12 pm, edited 1 time in total.
User avatar
neverendingo
Administrator
Posts
2136
Karma
17
OS
Another example:

Suppose compositing in kwin is enabled, but the session doesn't start up anymore. You need to disable the compositing section in the kwinrc file.
On command line very fast and easy.


New to KDE Software? - get help from Userbase or ask questions on the Forums
Communicate.
Image
Kryten2X4B
Registered Member
Posts
911
Karma
4
OS
dodosoft wrote:Well, working with a database (f.e. sqlite) is
- faster than working with many single files (undisputable)


Well, I would say that depends. Somehow I doubt most programs would need to work with more than one or two rc-files. And a user is unlikely to do something like "update whatever_field in kde4 where uuid=0;" or something similar.

dodosoft wrote:Who changes a panel position editing a text file?


Probably few, but plain textfiles are much more convenient if something goes astray. I don't want a replication of the potential of a corrupted registry in KDE (or a kconf, it's bad enough to have gconf for gnome-apps).


OpenSUSE 11.4, 64-bit with KDE 4.6.4
Proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It doesn't matter anyway, since it is possible to have many different backends to KConfig, although only one exists at this time.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
mutlu
Registered Member
Posts
75
Karma
0
OS
It is not at all obvious that the way Ext4 does things is actually good. There is an ongoing (and quite entertaining) discussion on the Linux kernel mailing list. For a summary and especially Linus's criticism, see http://www.h-online.com/open/Kernel-dev ... ews/112937


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]