New Attribute Operations Set Tweak Attribute KMIP Face
New Attribute Operations Set / Tweak Attribute KMIP Face to Face 2018
Set Attribute Problem • Attribute manipulation designed for multi-valued – Add Attribute; Modify Attribute; Delete Attribute • But vast majority of attributes Single Valued • Awkward Get Attribute; Modify or Add pattern • Unnecessary for Single Valued Attributes
Set Attribute Solution • • • Provide new Set Attribute operation If no value then Add Attribute If one value then Modify Attribute If multi-instance attribute then error Vendor specific attributes assumed to be single instance – error if not
Example <Operation type="Enumeration" value="Set. Attribute"/> <Request. Payload> <Unique. Identifier type="Text. String" value="1234…"/> <Protect. Stop. Date type="Date. Time" value="2018 -etc"/> … <Operation type="Enumeration" value="Set. Attribute"/> <Request. Payload> <Unique. Identifier type="Text. String" value="1234…"/> <Attribute> <Vendor. Identification type="Text. String" value="example. com"/> <Attribute. Name type="Text. String" value="transaction-count"/> <Attribute. Value type="Integer" value="0"/> </Attribute>
Increment Attribute Problem • Typical use of vendor attributes is as counters • Current approach – Get Attribute – Increment/Decrement on client – Update Attribute • Must be done in two requests – (lost ACID transaction property)
Not Concurrency Safe • • • Two clients Get Attribute: 1234 Both +1 Both Update: 1235 Total only increased by 1 Particular issue with distributed servers – Produces false conflicts or lost transactions
Solution • Tweak Attribute – Instead of Modify Attribute • Tweak Type – Increment, Decrement, Negate – Operates on Attributes with Numeric Types, Interval, Boolean, Date. Time • Tweak Value tweaks attribute's value, atomically • Must be single-instance attribute
Example <Operation type="Enumeration" value="Tweak. Attribute"/> <Request. Payload> <Unique. Identifier type="Text. String" value="1234…"/> <Tweak. Type type="Enumeration" value="Increment"/> <Tweak. Value type="Interval" value="3600"/> <Attribute. Reference type="Enumeration" value="Protect. Stop. Date"/> … <Operation type="Enumeration" value="Tweak. Attribute"/> <Request. Payload> <Unique. Identifier type="Text. String" value="1234…"/> <Tweak. Type type="Enumeration" value="Increment"/> <Tweak. Value type="Integer" value="1"/> <Attribute. Reference> <Vendor. Identification type="Text. String" value="example. com"/> <Attribute. Name type="Text. String" value="transaction-count"/> </Attribute. Reference>
Conclusion • • Tidy up attribute processing Set Attribute to avoid Get then Add / Modify Tweak Attribute to avoid concurrency issues Increases both performance and scalability
- Slides: 9