[PROPOSAL] Update to schema architecture

Francis J. Lacoste francis.lacoste at Contre.COM
Mon Sep 17 16:06:21 CEST 2001


Hello,

Egon's requirements for implementing the user_session functionality made
me consider another time the schema part of our architecture.

Currently, we have the following modules

Lire::DlfSchema 
* Specify the schema of a DLF file. 
* Configured through a XML file (www.xml, email.xml) conforming to the
  LDSML (Lire DLF Schema Markup Language).
* 2dlf script outputs DLF in that type of schema

Lire::DerivedSchema
* Special module that adds fields to a schema. (For example, adds 
  browser, lang, os, etc. fields computed from user_agent field).
* Fields are specified by the module using the Lire::Field module.
* Those DLF are generated by the module when needed by lr_dlf2xml.
* To each DLF record in the source DLF (www)  correspond a record
  in the derived-schema DLF.

I propose the following changes :

- Rename Lire::DerivedSchema to Lire::ExtendedSchema (which I think is
  more appropriate)
- The fields of the ExtendedSchema would also be specified in a XML file.
     * Add a extended-schema element to the LDSML DTD.
- Add a Lire::DerivedSchema. This would define another schema which is
  derived from the data of another one, but wouldn't necessary share any
  fields with it (like Lire::ExtendedSchema). That schema would also be
  defined in an XML file. 
- Lire::DerivedSchema and Lire::ExtendedSchema would have a name of the 
  form <superservice>-name, i.e. www-user_session, www-user_agent, 
  www-domain, etc.
- Removed the derived-schema from the LRSML. The schema to use would be
  taken from the superservice attribute.
- Modify lr_dlf2xml to support ExtendedSchema and DerivedSchema

This would look like that :

Lire::DlfSchema -- Lire::ExtendedSchema
     \
      \-> Lire::DerivedSchema

Which means that :  

Lire::ExtendedSchema extends a Lire::DlfSchema in the horizontal direction
(adding fields to a DLF record)

Lire::DerivedSchema derives from a Lire::DlfSchema in the vertical direction.
This means that it generates a different schema from the data of the orignal
Lire::DlfSchema. 

Of course, we can imagine a DerivedSchema deriving an ExtendedSchema, or
an ExtendedSchema extending a DerivedSchema.

Concrete examples from the www superservice

Lire::DlfSchema  ---> Lire::ExtendedSchema
www              ---> www-dir, www-domain, www-user_agent
     \
      \->  Lire::DerivedSchema
                www-user_session

Comments ? Have I forgot something ?

-- 
Francis J. Lacoste
francis at Contre.COM
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/development/attachments/20010917/557c39f3/attachment.bin 


More information about the Development mailing list