Conversation
Barecheck - Code coverage reportTotal: 97.46%Your code coverage diff: 0.03% ▴ ✅ All code changes are covered |
rwb27
force-pushed
the
improve-blob-docs
branch
from
August 6, 2026 14:34
002f021 to
2837fa4
Compare
This was referenced Aug 6, 2026
bprobert97
reviewed
Sep 25, 2026
| ------------------------------- | ||
|
|
||
| Management of `.Blob` objects is currently very basic: when a `.Blob` object is returned in the output of an Action that has been called via the HTTP interface, it will be retained as long as the action's output. This may be set on each action, and defaults to 5 minutes. This should be improved in the future to avoid memory management issues. | ||
| A `.Blob` instance holds a strong reference to exactly one `.BlobData` object, which refers to data on memory, on disk, or at a remote network location. Using class methods, it's possible to retrieve a `.BlobData` object using a unique ID. This is used internally by LabThings to allow the data to be downloaded, and to allow Blobs to be passed as input to actions. Only a weak reference is retained by the class, so this mechanism does not prevent the data from being finalised: a strong reference to the `.Blob` object must exist somewhere, or the data will be discarded. |
Contributor
There was a problem hiding this comment.
The BlobData object is not included in the mermaid diagram.
It might be useful to either:
- Extend the original diagram to include BlobData (but that might make the diagram messy, and its quite easy to read at present)
- Make a new mermaid diagram with an explanation about BlobData usage, and include it here. This could be a sequence diagram (like the existing mermaid diagram) or a class diagram.
| Management of `.Blob` objects is currently very basic: when a `.Blob` object is returned in the output of an Action that has been called via the HTTP interface, it will be retained as long as the action's output. This may be set on each action, and defaults to 5 minutes. This should be improved in the future to avoid memory management issues. | ||
| A `.Blob` instance holds a strong reference to exactly one `.BlobData` object, which refers to data on memory, on disk, or at a remote network location. Using class methods, it's possible to retrieve a `.BlobData` object using a unique ID. This is used internally by LabThings to allow the data to be downloaded, and to allow Blobs to be passed as input to actions. Only a weak reference is retained by the class, so this mechanism does not prevent the data from being finalised: a strong reference to the `.Blob` object must exist somewhere, or the data will be discarded. | ||
|
|
||
| When a `.Blob` object is returned in the output of an Action that has been called via the HTTP interface, it will be retained as long as the action's output by the `.ActionManager`. The retention period may be set on each action, and defaults to 5 minutes. This should be improved in the future to avoid memory management issues. |
Contributor
There was a problem hiding this comment.
Is there an issue for this last point?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This tidies up the explanation of how blobs are structured and managed.
I experimented with
sphinxcontrib-mermaidfor diagrams, and have added one to the section that @julianstirling found confusing. I'm very open to improvements, but I think it's already quite helpful.Closes #308