A draft for a standard for desktop configuration

Jamie McCracken jamiemcc at blueyonder.co.uk
Tue Sep 13 02:50:26 EEST 2005


Dave Cridland wrote:

>>It can cause there's a local daemon present. The config system is 
>>like a traditional three tier client server database application 
>>where the clients (think GConf/KConfig) are very very thin, the 
>>middleware is a thicker daemon (which does all the validation and 
>>schema handling) and the backend is just a local database or a 
>>remote one or LDAP etc. Its a tried and tested design that is 
>>commonly used in enterprise software (like J2EE).
>>
>>
> 
> Except that the application already has to do validation and defaults.

Ah but we need to prevent garbage in the backend else we would not be 
able to serialize the variant in the first place. So first and foremost 
read and write validation is alreay happening automatically in the 
daemon whenever you load/save a value (and we cant turn it off!). If 
type mismatches occurs there then we cant serialize and the app wont be 
able to access the value - its as simple as that.

For example if I request the value of a rect (IE a struct containing 4 
ints) the daemon will need to read this from a DB as a string (say comma 
delimited as "1,2,3,4") and also read the type signature from the schema 
(for a dbus variant you need the type signature) then serailize that 
string into a struct containing four ints (which basically means passing 
the variant four ints to serialize). If the data from the DB did not 
contain four ints then we would not be able to serialize it ergo we 
would return an error instead of a rect.


-- 
Mr Jamie McCracken
http://www.advogato.org/person/jamiemcc/



More information about the xdg mailing list