This document explains how data is written, updated and deleted in eeCLOUD. Understanding the lifecycle is essential to design predictable, scalable and high-performance systems.
eeCLOUD is designed around ordered data and deterministic operations. A record typically follows this lifecycle:
WRITE → READ → UPDATE (by address) → DELETE (soft) → RESTORE → ERASE (hard)
Write operations append data to a Memory. Multiple overloads allow you to control record identity
(id), secondary index (index), timestamps (date), grouping (reference),
and physical partitioning (clusterized).
await app.WriteData(
"myApp",
"users",
new { name = "John", role = "admin" }
);
reference is a first-class numeric dimension used to group records (e.g., userId, tenantId, deviceId). This enables highly efficient reference-based reads.
await app.WriteData(
"myApp",
"orders",
new { total = 99.90 },
reference: userId
);
When clusterized is enabled, eeCLOUD physically partitions the Memory to improve scalability and isolation.
await app.WriteData(
"myApp",
"orders",
new { total = 99.90 },
reference: userId,
clusterized: true
);
Use overloads with explicit id, index and/or date for controlled ingestion,
migrations or deterministic pipelines.
await app.WriteData(
"myApp",
"events",
id: "event-0001",
date: new DateTime(2026, 1, 1, 12, 0, 0, DateTimeKind.Utc),
data: new { type = "boot" },
reference: deviceId,
clusterized: false
);
Every stored record has a unique address (see MemoryArea.address).
Updates and deletes are primarily performed using this address.
| Why address? | Benefit |
|---|---|
| Stable handle | Updates do not depend on ambiguous filters or ordering |
| Deterministic | Same input → same record modified |
| High performance | Direct lookup avoids scans |
Update operations modify existing records. The most deterministic approach is updating by address. eeCLOUD also supports targeted updates and atomic increments.
await app.UpdateData(
"myApp",
"users",
address,
new { name = "John", role = "owner" }
);
await app.UpdateValue("myApp", "users", address, "active", true);
await app.UpdateValue("myApp", "users", address, "email", "[email protected]");
await app.UpdateValue("myApp", "users", address, "balance", 12.50m);
When updating by filter (field/value), the Order parameter decides which matching record is updated.
Default is DESC (most recent).
await app.UpdateData(
"myApp",
"sessions",
field: "token",
value: token,
data: new { status = "expired" },
order: Order.DESC
);
await app.UpdateID("myApp", "users", address, "user-0001");
await app.UpdateIndex("myApp", "users", address, "IDX-A");
await app.IncreaseDataValue("myApp", "counters", address, "hits", 1);
await app.IncreaseDataValue("myApp", "wallets", address, "balance", 2.5m);eeCLOUD supports a complete lifecycle for deletion:
await app.DeleteData("myApp", "users", address);
await app.RestoreData("myApp", "users", address);
await app.EraseData("myApp", "users", address);
MemoryArea.deleted and MemoryArea.delete.
Many reads accept deleted to include or exclude soft-deleted data.