Xiaoya add local cache #63
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added local image caching by introducing
TiledLocalImagePublisherto theArroyooperator. When aRawFrameEventis received, itsRawFrameEvent.imageis saved to the localTiledserver.For example, if the original
RawFrameEvent.tiled_urlis:http://tiled-dev.nsls2.bnl.gov/api/v1/array/full/79b18ce7-c6a9-4c25-8b7c-7d3c5a57a536/streams/primary/pil2M_image?slice=0:1,0:1679,0:1475then the image is stored on the local
Tiledserver with a new URL of the form:http://tiled:8000/api/v1/array/full/{container_name}/79b18ce7-c6a9-4c25-8b7c-7d3c5a57a536/streams/primary/pil2M_image/frame0?slice=0:1,0:1679,0:1475Here:
{container_name}(e.g., live_data_cache) is added at the root.Unlike the original Tiled URLs, where multiple images may be stored in a single container, in the local
Tiledserver each container holds only one image, so an additionalframe{id}suffix is appended.The related issue can be found at issue #62
.