documentation: UUID to Fedora Path does not work inside transactions
The idea of using a UUID matched via the triplestore to a fedora path assumes that it is indexed. In the case of a transaction, nothing is done until the transaction is committed.
So…
> curl -i -XPOST http://localhost:8282/islandora/transaction
HTTP/1.1 201 Created
Date: Tue, 12 Apr 2016 15:48:44 GMT
Server: Apache/2.4.18 (Ubuntu)
Location: http://localhost:8080/fcrepo/rest/tx:9065bb33-803a-4b1c-8bb8-8238f83560c5
Expires: Tue, 12 Apr 2016 15:51:44 GMT
Cache-Control: private, must-revalidate
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
> curl -i -XPOST "http://localhost:8282/islandora/collection?tx=tx:9065bb33-803a-4b1c-8bb8-8238f83560c5"
HTTP/1.1 201 Created
Date: Tue, 12 Apr 2016 15:49:48 GMT
Server: Apache/2.4.18 (Ubuntu)
Cache-Control: must-revalidate, private
Location: http://localhost:8282/islandora/resource/05c0224b-4ace-4092-a8f6-603c94260d08
Content-Length: 77
Connection: close
Link: <http://localhost:8282/islandora/resource/05c0224b-4ace-4092-a8f6-603c94260d08/members>; rel="hub"
Content-Type: text/plain; charset=UTF-8
http://localhost:8282/islandora/resource/05c0224b-4ace-4092-a8f6-603c94260d08
> curl -i -XPOST "http://localhost:8282/islandora/collection/05c0224b-4ace-4092-a8f6-603c94260d08/member/5fa71ed6-f5f3-4831-8662-b1b132815a52?tx=tx:9065bb33-803a-4b1c-8bb8-8238f83560c5"
HTTP/1.1 404 Not Found
Date: Tue, 12 Apr 2016 15:51:27 GMT
Server: Apache/2.4.18 (Ubuntu)
Cache-Control: no-cache
Content-Length: 89
Content-Type: text/html; charset=UTF-8
Failed getting resource Path for "05c0224b-4ace-4092-a8f6-603c94260d08" from triple store
@Islandora-CLAW/7-x-2-x-committers : Ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (18 by maintainers)
FINALLY!!!
We might want to refactor the cache, and namespace the different caches then. Like have my UuidCache class prepend “uuidcache:” to the keys. To allow for multiple separate caches.
Found also an extra use for you cache Jared… in the future we could even block a resource to be touched by another TX or direct call if it’s in the cache. Good work!
Okay, so I played around with this for a bit and I have two problems. I have solutions but I’m sure there are better ways. So let me know if I am crazy or if you have a suggestion.
So I think it is probably easiest to generate a JSON list of values ala:
Then store that in Redis with the transaction ID as the key
This would mean we would pull the entire object for each action on a transaction, but I think it is the easiest as we set a single expiry in Redis and update it if the transaction is acted upon.
So I am thinking about a super simple transform like:
So after an object is created in Fedora we can get the transform
This gives us the path and UUID in a simple JSON-LD object.
Which we add using the data structure in 1.
Thoughts?