Generic cache management algorithm
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 23 Nov 2006 11:51:13 +0000 (11:51 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 23 Nov 2006 11:51:13 +0000 (11:51 +0000)
commitf112818d88ab7a2808fb5f095febbeb07c68f548
treee025529c50d865443e68b8d9a57ff9c49294417d
parent216ac7aeec4a4c4760a978eed1e5448ef94db519
Generic cache management algorithm
(*) Transcoder class implements translation between alien ids (ids referring to another peer's DB) into the local DB
(*) XrefTable class implements DB access to bilateral n-to-n relationsships like slice_node
(*) Cache basically gets object lists from the peer, and calls update_table sequentially

A lot of stuff was removed from Peer and RefreshPeer, as well as Slices and was rewritten here

The classes subject to this now need to define extra attributes:
(*) class_id : e.g. 'node_id'
(*) class_key : e.g. 'hostname'
(*) foreign_fields : the list of stuff we copy verbatim from foreign objects
(*) foreign_xrefs : specify what cross-references should be solved and how, see Slices for an example

yet to do:
(*) improve intermediate objects allocation (transcoders and xreftables are created on the fly)
(*) use for importing keys, persons and slice attributes.
PLC/Cache.py [new file with mode: 0644]