Skip to content

Standardize Blobentry #1178

@Affie

Description

@Affie

Blobentry Standardization

Field Comparison Table

Old Field New Field Description Reason for Change
id::Union{UUID, Nothing} (removed) Unique identifier for the Blobentry itself REMOVE - DB implementation detail, label serves as key within parent struct
blobId::UUID blobId::UUID Unique (in Blobstore) identifier of the Blob data No change needed
label::Symbol label::Symbol Human-friendly label and per-node unique identifier No change needed
blobstore::Symbol blobstore::Symbol The Blobstore label No change needed - matches Blobstore struct naming
hash::String crcHash::String, shaHash::String Fast error detection (CRC) and strong integrity (SHA256) Standardized algorithms, separate fields for GraphQL simplicity
origin::String origin::String Source system or application where the blob was created (e.g., webapp, sdk, robot) TODO Why not use metadata? Inconsistent usage - Without standardization, you might get "WebApp", "web-app", "webapp", "WEB_APP" for the same thing
size::String size::Int64 Number of bytes in the blob Type safety and TODO maybe rename for clarity
description::String description::String Additional information about the Blob No change needed
mimeType::String mimeType::MIME MIME type of the binary data Use Julia's built-in MIME type for type safety
metadata::String metadata::Dict{String, String} JSON-compatible structured metadata Better than base64 encoded JSON, GraphQL/JSON compatible
timestamp::ZonedDateTime timestamp::ZonedDateTime When the Blob was first created No change needed
createdTimestamp::Union{ZonedDateTime, Nothing} (removed) When the Blobentry was created REMOVE - Not currently used, avoid breaking serialization
lastUpdatedTimestamp::Union{ZonedDateTime, Nothing} (removed) When the Blobentry was last updated REMOVE - Not currently used, avoid breaking serialization
_version::VersionNumber version::VersionNumber Version of this Blobentry schema Remove underscore prefix

Key Improvements

  1. Hash Standardization: Split hash into two standardized fields - crcHash for fast error detection and shaHash for strong integrity
  2. Type Safety: Use Int64 for size instead of string representation and MIME for mime types
  3. Metadata Structure: Replace base64 encoded strings with proper Dict{String, String} for metadata
  4. Remove DB Implementation Details: Remove id field since label serves as the key within parent structures
  5. Remove Unused Timestamps: Remove createdTimestamp and lastUpdatedTimestamp to avoid breaking serialization
  6. GraphQL Compatibility: Structure fields for easy GraphQL querying and JSON serialization

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions