Coverage
A lightweight and robust framework for managing project data in AWS S3 using R and paws library. This package provides a clean, consistent structure for storing, reading, and exploring .rds objects in a datalake-style layout, while remaining simple for common use cases and flexible for complex ones.
π Core Principles
-
Simple by default β 80% of entities store a single
.rdsfile. - Flexible when needed β Optional tags enable organized multi-object entities.
- Explicit control β Complex operations are always opt-in, never automatic.
- Backward compatible β Works with existing untagged data seamlessly.
ποΈ S3 Folder Structure
Each project in S3 is organized into entities, which represent logical data units (e.g., data/srv_main, models/maxdiff).
Layout
# Simplest case
project/entity/.rds
# More complex case with tags
project/entity/tag1=val1/tag2=val2/.../.rds
Examples
bastion/data/srv_main/.rds
bastion/data/srv_main/wave=a/.rds
bastion/data/srv_main/wave=b/type=raw/.rds
bastion/models/maxdiff/name=final/.rds
Rules
- Each entity + tag combination corresponds to exactly one
.rdsfile. - Tags use
key=valuesyntax, separated by/. - Tag keys are sorted alphabetically before writing to ensure deterministic paths.
- Tags are case-sensitive (
wave=aβwave=A). - Tag names/values may not contain spaces or
/. - Entities are grouped under project prefixes for scalability.
π·οΈ Tag System
- Tags are dynamic β you can add or remove them as needed.
- Common tags:
wave,batch,type,version, etc. - Tags are extracted automatically into tidy columns when listing entities.
Examples:
# Two waves for same entity
bastion/data/srv_main/wave=a/.rds
bastion/data/srv_main/wave=b/.rds
π Listing and Exploration
Listing Entities
dl_ls("data/srv_main")Returns a tidy tibble with one row per stored object and one column per detected tag.
Notes:
- Missing tag values are represented as
NA. - Designed to work fast within a project (using prefix filters).
- Cross-project listing is supported but slower.
βοΈ Concurrency and Safety
- One writer per
(entity + tag)combination assumed. - Writes are atomic (single PUT per
.rds). - Temporary
.tmpuploads can be used to prevent partial overwrites.
π Summary of Design Decisions
| Area | Decision |
|---|---|
| Entity coexistence |
tag=NULL = untagged only; explicit tags required |
| Tag encoding | Alphabetical, reversible, case-sensitive |
| Return types |
single (default), list, or bind
|
| Metadata | Optional, regenerable _meta.rds
|
| Overwrites | One .rds per tag folder, atomic PUT |
| Concurrency | Single-writer assumption |
| Scaling | Organized by project prefixes |