Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

IdAS Update Proposals Live Updates

This proposal would allow attributes, metadata, and their values to be updated by introducing methods like:

  • IDigitalSubject.addAttribute
  • IDigitalSubject.deleteAttribute
  • IDigitalSubject.addMetadata
  • IDigitalSubject.deleteMetadata
  • IAttribute.addValue
  • IAttribute.deleteValue
  • IMetadata.addValue
  • IMetadata.deleteValue
  • IComplexValue.addProperty
  • IComplexValue.deleteProperty
  • etc.

This gives the consumer the ability to directly edit the object which is intended to be changed. There is no notion of multi-change transactions.

  • Pros
    • Very easy for the consumer
  • Cons
    • Causes many small operations to be applied by the CP
      • This is especially bad if the context is backed by data over a network connection, as each operation constitutes a wire hit.
    • Leaves objects in invalid states.
      • Due to certain data constraints, this option would be impossible for certain CPs to implement because there's no way to bundle up a set of changes (which by themselves would invalidate constraints, but taken together fit within constraints). For example, a subject must have either a parent or a guardian attribute but never both. I cannot delete one prior to adding the other, nor can I add another without deleting one.
    • Consumer may not be sure when updates to certain object instances are actually applied to backing store
      • Let's assume there was an addValue method on IProperty. What are the exact semantics of it?
        • If the consumer got the IProperty instance from IContext.buildAttribute, and then called setValue, we can assume it sets the value only on the in-memory IProperty instance as it is not yet associated with a subject.
        • If the consumer got an IProperty instance from IContext.buildAttribute, then used that IProperty instance to call IContext.addSubject, and after that called setValue on the IProperty instance, does that update the value on the new subject in the context? In this proposal, I think yes.
        • If the consumer uses the same IProperty instance when creating two Digital Subjects (via IContext.addSubject), and then calls setValue on that IProperty instance, does it update both Digital Subjects? In this proposal, I think yes.
        • If the IProperty instance was gotten by the consumer calling IDigitalSubject.getAttribute, and then that IProperty instance was used to create a new Digital Subject, would setValue update both Digital Subjects? In this proposal, I think yes.

Back to the top