questions and clarification on replace and delete

15 views
Skip to first unread message

Michael Parsons

unread,
Jan 12, 2016, 3:22:28 PM1/12/16
to learnin...@googlegroups.com

 

The credentials transparency initiative (CTI) project will introduce new documents to the learning registry. The two major new types will be for a credential and an organization.

For now these will be indicated via the payload schema. For example:

    "payload_schema":["organization"],


Note: this is early days, and I am 'prototyping'.


I have been testing adding a new org, then updating it, then deleting it. The details with the document contents (minus signatures, etc) follow at the end of this post.

The replace works fine. However, the original document seems identical to the initial version. If someone were to 'get' the original document how would they know there was a replacement?


I then tried a delete (using replaces, and payload_placement = "none"). This trx was successful and a new document was created. I then did a get on the document that was deleted and I don't see any indicator in the contents that it was deleted. There is a property called active, but it is true. And the original org record also has not been changed.


I then did a harvest on the resource locator ( http://sandbox.learningregistry.org/harvest/getrecord?request_ID=http://purl.org/cti/org/20160112_46 ). The results show the two org documents, but no indicator that the updated version had been deleted. The original document is unchanged. I would have hoped that original would have been somehow marked deleted, since its replacement was deleted. This (ie no cascading like deletes) may have been part of the design, allowing a person to delete a replacement, if for example there was some issue with the update.


So, after the latter research/background, I first want to ensure I was using the correct approach, and second to understand the workflow for CTI.

Actually another question first. Is the common protocol to use a harvest to get all the changed records and figure out which record is current? If so, how would someone know the document had been deleted.


Now, for CTI, assuming that we don't want 'replaced' documents hanging around (and pending response to how deletes are supposed to work), would we have to issue a delete for every replace?

ie:

- create record A

- do update of A that results in record B

- immediately issue a delete for record A


Also, a credential can have multiple versions. If a person wants to create a new version of a credential, this may be a case where we want to use replace, and keep the original record. The 'replaces' property would provide a link between the previous version and the new version. Unfortunately, the first update to the new version would break this chain - assuming we are using the above work flow of deleting the previous record once we do a delete.

New record

Document after new org - e5562c00f4364d99a026ed0fac2dfd11

http://sandbox.learningregistry.org/harvest/getrecord?request_ID=e5562c00f4364d99a026ed0fac2dfd11&by_doc_ID=true

 

 

 1/12/2016 12:29:09 PM - Added docId: e5562c00f4364d99a026ed0fac2dfd11.

 1/12/2016 12:29:40 PM - lrDoc

{"replaces":[],"active":true,"doc_type":"resource_data","doc_version":"0.51.0",

"payload_schema":["organization"],

"resource_data_type":"metadata",

"resource_locator":"http://purl.org/cti/org/20160112_46",

"identity":{"curator":null,"owner":null,"submitter":"ISLE OER on Behalf of CTI Test","signer":"ISLE OER","submitter_type":"agent","extensions":{}},"keys":[],

"payload_placement":"inline",

"resource_data":"{\"name\":\"CTI Org\",\"uri\":\"http://purl.org/cti/org/20160112_46\",\"webSite\":\"http://www.QaOrg.com\",\"dateCreated\":\"\\/Date(1452623266121)\\/\",\"address1\":\"123 Main St\",\"address2\":null,\"city\":\"Springfield\",\"postalCode\":\"62704-8401\",\"region\":\"IL\"}",

 

"payload_schema_locator":null,"payload_schema_format":null,"payload_locator":null,

"doc_ID":"e5562c00f4364d99a026ed0fac2dfd11",

"TOS":{"submission_TOS":"http://creativecommons.org/licenses/by/3.0/us/deed.en_US","submission_attribution":null,"extensions":{}},"weight":0,

}

 

Update

Document after update to org (new doc) - d6aef5f525824a8d8a5d2e35e6f26855

http://sandbox.learningregistry.org/harvest/getrecord?request_ID=d6aef5f525824a8d8a5d2e35e6f26855&by_doc_ID=true

 

1/12/2016 12:30:33 PM - After update, new docId: d6aef5f525824a8d8a5d2e35e6f26855.

 

 1/12/2016 12:30:43 PM - lrDoc

 

{"replaces":["e5562c00f4364d99a026ed0fac2dfd11"],"active":true,"doc_type":"resource_data","doc_version":"0.51.0",

"payload_schema":["organization"],

"resource_data_type":"metadata",

"resource_locator":"http://purl.org/cti/org/20160112_46",

"identity":{"curator":null,"owner":null,"submitter":"ISLE OER on Behalf of CTI Test","signer":"ISLE OER","submitter_type":"agent","extensions":{}},"keys":[],

"payload_placement":"inline",

"resource_data":"{\"name\":\"CTI Org - updated 1/12/2016 12:30:03 PM\",\"uri\":\"http://purl.org/cti/org/20160112_46\",\"webSite\":\"http://www.QaOrg.com\",\"dateCreated\":\"\\/Date(1452623266121)\\/\",\"address1\":\"123 Main St\",\"address2\":null,\"city\":\"Springfield\",\"postalCode\":\"62704-8401\",\"region\":\"IL\"}",

 

"payload_schema_locator":null,"payload_schema_format":null,"payload_locator":null,

"doc_ID":"d6aef5f525824a8d8a5d2e35e6f26855",

 

}

 

Delete

Did delete. Created document - 039247131e1b4d70a6b98a6ccf1b73b4

http://sandbox.learningregistry.org/harvest/getrecord?request_ID=27553b34bc114d26be6e216fcd5b59d3&by_doc_ID=true

 

Envelop (before  delete)

{"documents":[{"replaces":["d6aef5f525824a8d8a5d2e35e6f26855"],"active":true,"doc_type":"resource_data","doc_version":"0.51.0","payload_schema":[],"resource_data_type":"metadata","resource_locator":null,"identity":{"curator":null,"owner":null,"submitter":"ISLE OER on Behalf of CTI Test","signer":"ISLE OER","submitter_type":"agent","extensions":{}},"keys":[],"payload_placement":"none","resource_data":null,"payload_schema_locator":null,"payload_schema_format":null,"payload_locator":null,

"doc_ID":null,

"TOS":{"submission_TOS":"http://creativecommons.org/licenses/by/3.0/us/deed.en_US","submission_attribution":null,"extensions":{}},"signing_method":"LR-PGP.1.0","extensions":{}},"resource_TTL":0,"extensions":{}}],"PublishURL":null,"extensions":{}}

 

 1/12/2016 12:48:07 PM - After delete, new docId: 039247131e1b4d70a6b98a6ccf1b73b4.

 

Document returned after delete

1/12/2016 12:48:31 PM - lrDoc - new doc returned after delete

 

{"replaces":["d6aef5f525824a8d8a5d2e35e6f26855"],"active":true,"doc_type":"resource_data","doc_version":"0.51.0","payload_schema":[],"resource_data_type":"metadata","resource_locator":null,"identity":{"curator":null,"owner":null,"submitter":"ISLE OER on Behalf of CTI Test","signer":"ISLE OER","submitter_type":"agent","extensions":{}},"keys":[],"payload_placement":"none","resource_data":null,"payload_schema_locator":null,"payload_schema_format":null,"payload_locator":null,

"doc_ID":"039247131e1b4d70a6b98a6ccf1b73b4",

}

 

Get ‘deleted’ document

Get doc that was just deleted  - d6aef5f525824a8d8a5d2e35e6f26855 – appears to be no change

http://sandbox.learningregistry.org/harvest/getrecord?request_ID=d6aef5f525824a8d8a5d2e35e6f26855&by_doc_ID=true

 

1/12/2016 12:48:39 PM - lrDoc - for the one that was 'deleted'

 

{"replaces":["e5562c00f4364d99a026ed0fac2dfd11"],"active":true,"doc_type":"resource_data","doc_version":"0.51.0",

"payload_schema":["organization"],

"resource_data_type":"metadata",

"resource_locator":"http://purl.org/cti/org/20160112_46",

"identity":{"curator":null,"owner":null,"submitter":"ISLE OER on Behalf of CTI Test","signer":"ISLE OER","submitter_type":"agent","extensions":{}},"keys":[],

"payload_placement":"inline",

"resource_data":"{\"name\":\"CTI Org - updated 1/12/2016 12:30:03 PM\",\"uri\":\"http://purl.org/cti/org/20160112_46\",\"webSite\":\"http://www.QaOrg.com\",\"dateCreated\":\"\\/Date(1452623266121)\\/\",\"address1\":\"123 Main St\",\"address2\":null,\"city\":\"Springfield\",\"postalCode\":\"62704-8401\",\"region\":\"IL\"}",

 

"payload_schema_locator":null,"payload_schema_format":null,"payload_locator":null,

"doc_ID":"d6aef5f525824a8d8a5d2e35e6f26855",



Michael Parsons
Solution Architect

Illinois workNet (TM)
Southern Illinois University Carbondale


Reply all
Reply to author
Forward
0 new messages