You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a need to create and update data in an all or nothing manner, no partial updates in the case of network or system errors. It seems like a lot of BrAPI applications writing data would want a similar capability. Below are some cases where this has come up for us.
Batching Data
Due to server processing times and maximum message sizes requests can fail/timeout for calls with a lot of records, for example POST /germplasm. Up until this point data has been split into smaller batches on the client side and sent. However this naive approach can result in partially written data in the event of network or system errors. We allow uploading germplasm records from a spreadsheet file to a brapi service and with this approach we cannot guarantee all data in the file is created.
Aggregate Datasets
Another area where this comes up is with aggregate datasets. For example we allow creating experiments in a brapi service from spreadsheets. These experiments depend on a number of different BrAPI objects being created as a set: trial, study, observationunits, etc.
There are a lot of different possible approaches to dealing with this type of issue in a REST api. Examples include structuring endpoints so that single calls can be made, different types of transaction api schemes, compensating transactions, etc.
Has there been any work or discussion on this topic in the broader BrAPI community?
The text was updated successfully, but these errors were encountered:
nickpalladino
changed the title
All or nothing data transfers
All or nothing data transactions
Feb 15, 2024
We have a need to create and update data in an all or nothing manner, no partial updates in the case of network or system errors. It seems like a lot of BrAPI applications writing data would want a similar capability. Below are some cases where this has come up for us.
Batching Data
Due to server processing times and maximum message sizes requests can fail/timeout for calls with a lot of records, for example
POST /germplasm
. Up until this point data has been split into smaller batches on the client side and sent. However this naive approach can result in partially written data in the event of network or system errors. We allow uploading germplasm records from a spreadsheet file to a brapi service and with this approach we cannot guarantee all data in the file is created.Aggregate Datasets
Another area where this comes up is with aggregate datasets. For example we allow creating experiments in a brapi service from spreadsheets. These experiments depend on a number of different BrAPI objects being created as a set: trial, study, observationunits, etc.
There are a lot of different possible approaches to dealing with this type of issue in a REST api. Examples include structuring endpoints so that single calls can be made, different types of transaction api schemes, compensating transactions, etc.
Has there been any work or discussion on this topic in the broader BrAPI community?
The text was updated successfully, but these errors were encountered: