Open hgs-sellis opened 5 years ago
Q1: In OGC Testbed 15 we also looked at the two JSON PATCH RFCs and decided to use JSON Merge Patch (RFC 7396) because of its simplicity for both servers and clients. This was not for feature transactions, but for other JSON resources. So, I would be in favour of JSON Merge Patch, too. But I still think that it should be optional (i.e. a separate conformance class, also because it only applies to JSON cases).
Meeting 2021-09-13: Q1 has been resolved (we also use JSON Merge Patch). Q2 will only be addressed in a future work item supporting also other more advanced transaction capabilities as we want to restrict Part 4 to resource manipulation that directly maps to HTTP.
In the initial set of notes for Simple Transactions it is proposed to use JSON Patch for PATCHing a single feature on the
/collections/{collectionId}/items
endpoint. 2 sprints ago, the STAC group decided to use JSON Merge for that operation, mainly because of its relative simplicity.See STAC's: Transaction API Extension
Here is a good discussion of the pros and cons of both specs: https://erosb.github.io/post/json-patch-vs-merge-patch/
The major trade-off for the simplicity of JSON Merge is its inability to manipulate the contents of an array. Arrays can only be replaced with an new value.
Question 1:
Since the idea is to keep simple transactions simple, perhaps the OAF proposal could be changed to use the simpler JSON Merge spec for "Simple Transactions," and the more complex and powerful JSON Patch spec for "Complex Transactions?" E.g. JSON Patch can be easily reversed for a rollback operation, which is not true of JSON Merge.
Question 2:
In the most recent STAC sprint, we proposed adding simple bulk POST and DELETE to the
/collections/{collectionId}/items
endpoint as well. It is simple in the sense that it conforms to the OAF concept of "batch," meaning each operation in the bulk request succeeds or fails independently, without support for roll back in the case of an individual failure.For details, see PR: Bulk CRUD #634
The STAC group would like to ask if the OAF group would consider aligning their "Simple Transaction" API with the existing STAC spec and with the proposal for simple bulk operations on the
/collections/{collectionId}/items
endpoint.