Hi Chris,

I attached a small flow example. This is the general idea of the new system. The old system works exactly the same - only on filesystem with a bad query design.

After writing this example down I noticed (thanks to the lessons of my old database prof) that the refkey is only a compressed primary index of the first table which includes no own data. So we should put the both tables together:

key
objecttype
objectstatus
objectkey
serverid
status

I think a single table is the best maintainable datastructure at all. Looks simple, human readable and easy to test and debug. Usually the simplest design is the fastest one in the future (after adding all necessary features). I don't want to optimize the design to early.

So Chris, how about this small modification?

I like it mainly because I can scan it with my own simple cronjobs ;)

Greetings Michael
--
_______________________________________________________________

Michael Bell                    Humboldt-Universitaet zu Berlin

Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 2704       Unter den Linden 6
[EMAIL PROTECTED]   D-10099 Berlin
_______________________________________________________________
1. CA node
----------

==> dataexchange.xml only know a CA and RA/pub server.

==> cert issued
==> APPROVED_REQUEST 256 (update of an approved CSR)

==> maintenance command started
====> create new entry in dataexchange_object
    key          ::= 1024
    objecttype   ::= REQUEST
    objectstatus ::= APPROVED
    objectkey    ::= 256
====> create new entry in dataexchange_log
    key          ::= 4094
    refkey       ::= 1024 (foreign key to dataexchange_object)
    serverid     ::= 1    (for the RA/pub server)
    status       ::= EXPORT

==> export command started
====> scan dataexchange_log for all item with status==EXPORT
====> export all items
====> set all exported item to status::=PENDING in dataexchange_log
    refkey       ::= 1024 (foreign key to dataexchange_object)
    serverid     ::= 1    (for the RA/pub server)
    status       ::= PENDING
====> export all commits where status==IMPORTED
====> upgrade all states IMPORTED to COMMITED_IMPORT
====> build the complete export (e.g. tar)

2. RA/pub node
--------------

==> import command started (we should detect the source of the import 
automatically)
====> import the commits (set status from PENDING/EXPORT to COMMITED)
====> set all PENDING to EXPORT (perhaps lost?)
====> import the send objects (status::=IMPORTED)

==> start maintenance command
====> same as on CA, general scan for missing entries

==> start export command
====> scan dataexchange_log for all item with status==EXPORT
====> export all items
====> set all exported item to status::=PENDING in dataexchange_log
====> export all commits where status==IMPORTED
    refkey       ::= 1024 (foreign key to dataexchange_object)
    serverid     ::= 1    (for the RA/pub server)
    status       ::= IMPORTED
====> upgrade all states IMPORTED to COMMITED_IMPORT
    refkey       ::= 1024 (foreign key to dataexchange_object)
    serverid     ::= 1    (for the RA/pub server)
    status       ::= COMMITED_IMPORT
====> build complete export

3. CA node
----------

==> import command started
====> import the commits (set status from PENDING/EXPORT to COMMITED)
    refkey       ::= 1024 (foreign key to dataexchange_object)
    serverid     ::= 1    (for the RA/pub server)
    status       ::= COMMITED
...

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to