Data Storage & Access

Cloudillo’s data storage systems and access control mechanisms. These documents explain how data is stored, organized, queried, and protected across the decentralized network.

Storage Types

Cloudillo provides three storage systems for different use cases:

Feature Blob RTDB CRDT
Primary Use Static files Structured data with queries Collaborative editing
Data Model Immutable binary Collections of JSON documents Shared types (text, maps, arrays)
Mutability Immutable (new version = new blob) Mutable with real-time sync Mutable with automatic merge
Conflict Resolution N/A (content-addressed) Last-write-wins Automatic merge (no conflicts)
Offline Support Cache only Reconnection sync Full offline with local persistence
Query Capabilities By ID, metadata, tags Rich queries (where, orderBy, limit) Read entire document
Best For Images, videos, PDFs, attachments Todos, settings, lists, forms Text editors, whiteboards, real-time docs

Blob Storage

Blob Storage - Content-addressed immutable binary data. Every file is identified by its SHA-256 hash, enabling deduplication and integrity verification. Supports automatic variant generation (thumbnails, transcoded video). Choose Blob for static files that don’t change frequently.

RTDB (Real-Time Database)

RTDB - Firebase-like API for structured data. Choose RTDB when you need to query and filter data, or when your application works with structured records (users, posts, settings). Changes sync in real-time, but concurrent edits use last-write-wins semantics.

CRDT (Collaborative Editing)

CRDT - Conflict-free replicated data types using Yjs. Choose CRDT when multiple users edit the same content simultaneously (documents, spreadsheets, presentations). All changes merge automatically without conflicts, even when users are offline.

Choosing the Right System

Use Blob when:

  • Storing static files (images, videos, PDFs)
  • Content is immutable or versioned
  • You need content-addressing and deduplication
  • Generating variants (thumbnails, transcodes)

Use RTDB when:

  • You need to query/filter data (e.g., “show incomplete todos”)
  • Data is structured as records/documents
  • Users typically edit different records
  • You need server-side validation

Use CRDT when:

  • Multiple users edit the same content simultaneously
  • You’re building a collaborative editor
  • Offline-first is critical
  • Character-level or element-level merging is needed

Many applications use all three: Blob for attachments, CRDT for document content, RTDB for metadata and settings.

Access Control

Access Control - How resources are protected and shared while maintaining user privacy and sovereignty through token-based authentication and attribute-based permissions.