1 / 15

Container Based Persistence

Container Based Persistence. Brian Berenbach Siemens Corporate Research brian.berenbach@scr.siemens.com. The Problem. Defining the architecture of “Groupware” systems where : multiple are clients supported by a single server,

Rita
Télécharger la présentation

Container Based Persistence

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. Container Based Persistence Brian Berenbach Siemens Corporate Research brian.berenbach@scr.siemens.com

  2. The Problem Defining the architecture of “Groupware” systems where: • multiple are clients supported by a single server, • there is a requirement to notify client objects whenever something they are viewing or manipulating has changed in the database, • less experienced developers need to extract, manipulate, and store objects with no knowledge of the underlying persistence mechanisms and • there is coherent persistence of complex aggregate objects.

  3. Problem Domains • Real time Command and Control • Payroll and other HR systems • Document Management • Trading • Software Defect Tracking • Other “Groupware” applications with 50 or less simultaneous clients

  4. A Robust Recommended Solution • Let the container manage persistence, • the container collaborates with an event management server, • all events are raised by the container and • all persistence complexities are hidden behind the container API.

  5. Storage Management Persistent Store Store Let the Container Manage Persistence CON T AINER Client Object Transfer

  6. Application Object Application Part Object Client Event Server Event Proxy Container Database Proxy Container-Event Management Collaboration may have notifies uses 1 1..N 1 1..N 1 0..N 1..N 0..N Retrieves & stores Objects from contains notifies 1 1 uses represents raise event 1 1 1 1..N 1 1 Database

  7. anObjectForm theEventServer anObject retrieve( anObjectId ) create populate anObject show editing changes replace ( anObject ) save raise ( anObject Changed ) objectChangedEvent ( objectId ) retrieve( objectId ) repopulate anObject refresh Example of Change Event Notification theObjectContainer

  8. Container Details Base Container add(objItem : Object) : Long checkForCompleteness(varItem : Variant) : Collection copy(objSourceObject : Object, objTargetObject : Object) : Integer delete(varItemToDelete : Variant) : Integer isEmpty() : Boolean exists(varItem : Variant) : Boolean export(strFileName : String) : Integer idToName(lngObjectId : Long) : String nameToId(strName : String) : Long rename(strOldname : String, strNewName : String) : Integer replace(objitem : Object) : Integer retrieve(varItem : Variant) : Object

  9. Persistent Objects can be complex Document Section Name Name 1+ Status : Boolean Contains Status Importance Confidentiality Reference : Boolean Sourcereference : String Version Note that a document contains zero or more sections. How to store a document as a coherent entity? Validatefiles Validatename Status(Documentstatus) {Abstract}

  10. Section Key Data may have Document SectionId [PK1] Key Data Section.DocumentId [PK2] [FK] DocumentId [PK1] The database Id helps manage persistence • The database Id is used to distinguish between new and existing objects: • Newly Created Object • Id is null • Object That Has Been Retrieved From storage • Valid Id • On a Save Operation: If the Id is null perform an INSERT operation Else perform an UPDATE operation End If

  11. Application Developers don’t see this complexity • Documents have • Sections which have • Paragraphs which have…

  12. Container.save() • For each document in Me.Documents • Begin Transaction • document.save • Commit • End Transaction • Next Inside the container Inside a document <Code to save my attributes…> For each section in Me.Sections section.save (Me.Id) Next Inside a section <Code to save my attributes…> For each paragraph in Me.Paragraphs paragraph.save (Me.Id) Next Sample Persistence Process Container boundary

  13. Sample Application:Groupware Test Construction Toolkit Task Developer Assessment Assembler Subject Matter Expert Licensing & Entrance Exams … Test Toolkit Produces

  14. OLE Link Test Toolkit Example

  15. Questions?

More Related