Feature #17
Optimistic Locking of Datastreams
| Status: | In Progress | Start: | 05/01/2010 | |
| Priority: | Normal | Due date: | 05/07/2010 | |
| Assigned to: | % Done: | 0% |
||
| Category: | Consuming Fedora APIs | Spent time: | 18.50 hours | |
| Target version: | 2.0 Release: MODS, Nokogiri & better Solr | Estimated time: | 25.00 hours | |
| Sponsor: | Stanford |
Description
Optimistic Locking¶
See Optimistic Concurrency Control on wikipedia
- When loading a datastream from Fedora, cache its modified date.
- Whenever Datastream.save is called, validate the transaction by checking if the datastream's modified date in Fedora is greater than the modified date in memory
- if the Datastream has been modified in Fedora since the last time it was read into memory, throw a DatastreamConcurrencyConflict
History
Updated by Matt Zumwalt 371 days ago
- Target version deleted (
2.0 Release: MODS, Nokogiri & better Solr)
Updated by Matt Zumwalt 338 days ago
I've got a partial implementation of this lying around somewhere.
Updated by Matt Zumwalt 338 days ago
- Estimated time set to 25.00
- gather stories, especially about how to handle/communicate exceptions - 0.5d
- implement - 1.5d
- test - 1d
Updated by Matt Zumwalt 303 days ago
- Due date changed from 10/12/2009 to 11/02/2009
- Start set to 10/26/2009
Updated by Matt Zumwalt 302 days ago
Starter Spec for this feature:
http://bitbucket.org/mediashelf/active_fedora/src/tip/spec/unit/datastream_concurrency_spec.rb
Updated by Matt Zumwalt 201 days ago
- Target version changed from 1.0.9 to 2.0 Release: MODS, Nokogiri & better Solr
Updated by Matt Zumwalt 99 days ago
- you've submitted a last_modified_date with your update request
- the submitted date is older than the datastream's last modified date
ActiveFedora will be updated to submit that last_modified_date with the update requests and handle 409 errors gracefully (raise a Net:HTTP 409 error).
Updated by Matt Zumwalt 90 days ago
- Due date changed from 11/02/2009 to 05/07/2010
- Category set to Consuming Fedora APIs
- Priority changed from Low to Normal
- Start changed from 10/26/2009 to 05/01/2010
In order to minimize the window for conflicts we will implement part of this as an improvement to Fedora rather than dealing with it on the Ruby side.
Updated by Edwin Shin 86 days ago
I've added the corresponding issue to Fedora's tracker as FCREPO-689.
I also introduced the issue during today's Fedora committers call, and we've agreed to include this work in the upcoming Fedora 3.4 release.
Updated by Edwin Shin 66 days ago
- Status changed from New to In Progress
started stubbing out the datastream methods (in the REST API) to support lastModified. Created AbstractParam and DateTimeParam classes to handle lastModifiedDate QueryParams.
Updated by Edwin Shin 64 days ago
Originally intended to implement support in Fedora's SOAP API (since the REST methods delegate to SOAP). However, after locally implementing this for the SOAP modifyDatastream methods, I'm backing it out. Even though it's only a parameter change, it touches a lot of classes, schemas, config, tests etc. and although our tests are working we'd have to sink a lot more time into testing before I'd be confident we weren't introducing any regressions into 3.4. So as decided on the Fedora committers call yesterday, this feature will only be available in the REST API for 3.4
Updated by Edwin Shin 45 days ago
FYI, this is done in Fedora trunk, as of r8590 (http://fedora-commons.svn.sourceforge.net/fedora-commons/?rev=8590&view=rev).
ActiveFedora needs to be updated to take advantage of the addition of the lastModifiedDate query parameter on modifyDatastream and modifyObject