1 / 17

POOL persistency: Status

POOL persistency: Status. Current understanding Today’s model Conclusions. Objects & pointers. Objects, object IDs, collections & DBs. C++ pointer = > object ID. Persistency – What is it about?. Persistent. Transient. The Object Model (June). Cache Access Through References.

oona
Download Presentation

POOL persistency: Status

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. POOL persistency: Status Current understanding Today’s model Conclusions

  2. Objects & pointers Objects, object IDs, collections & DBs C++ pointer => object ID Persistency – What is it about? Persistent Transient POOL

  3. The Object Model (June) POOL

  4. Cache Access Through References • References know about the Cache Manager • References are implemented as smart pointers • Use cache manager for “load-on-demand” • Use the object key of the cache manager Reference to Cache Manager Object Identifier in Cache Manager Ref<T> Dereference Pointer to object POOL

  5. Cache Manager SmartRef<T> Key CacheMgr Pointer Persistency Manager Cache Access POOL

  6. The Object Model (June) POOL

  7. Class Diagram of Today POOL

  8. Typical Calling Sequence POOL

  9. Persistency Interface • Read Object access • readObject • Transaction handling • Start, commit, rollback • Register objects for writing POOL

  10. Writing Objects • Supported by IPersistencyMgr • Start transaction • Loop 1 … n • Mark objects for write: requires placement hint • End Transaction • Commit • Rollback (if supported by database) POOL

  11. Storage type DB name database database Database Objects Cont.name Objects Objects Item ID Objects Objects Objects Container Objects Container Objects Container Model Assumptions Data Cache StorageMgr • Class GUID • Cache hints [0..*] DiskStorage POOL

  12. (3) (2) (4) Entry ID Link ID Link Info XID ... ... Link ID DB/Cont.name,... <number> (1) Local lookup table in each file Follow Persistent References POOL

  13. The Link Table • Contains all information to resurrect an object • Storage identifier INT • Database “name” string • Container name string • Class identifier GUID • Cache hints string [] • E.g. other possible transient conversions Make sure the object model does not go wild! POOL

  14. Conclusions • I think this model could work very nicely for any persistency technology based on database files, collections and objects within collections • The main thinking is done • Think about some optimizations, which cannot be introduced later • Looks like it’s about time to start prototyping POOL

  15. Persistent Objects What is the default? • Objectivity, OOCI: • Everything is persistent unless deleted before commit • ROOT, RDBMS: • Nothing is persistent unless explicitly saved • ROOT: Tobject::Write(), Ttree::Fill() etc. • RDBMS: INSERT INTO <table> VALUES (…) • …has consequences on allocation mechanism POOL

  16. Persistent Object Allocation First possibility: • During “Mark objects for write” • In registerObjectForWrite(…) • Client can know immediately if object can be written • Better handle for corrective actions • Create persistent token • In endTransaction(…) • Fill data, resolve references and update row “unregisterObjectFromWrite” difficult Transaction may be open for a long time POOL

  17. Persistent Object Allocation Second possibility: • During “End Transaction” • In markObjectForWrite(…) • Trivial. Simply collects object pointers • “unregisterObjectFromWrite” trivial • In endTransaction(…) • Create persistent token • Fill data, resolve references and update row Only bulk transaction/conversion status On failure drop all POOL

More Related