Implement identity graph stitching and configurable profile storage
Issue persistent signed anonymous IDs and accept cookie/token-bound events. Resolve verified email, phone, OAuth, and namespaced third-party IDs into transactionally merged master identities with historical event aliases. Protect shared-device account switching, tenant isolation, and event retries. Store sparse canonical profiles as PostgreSQL JSONB or local SQLite JSON. Support an optional versioned Cassandra wide-column projection through a transactional outbox, retry worker, and immediate canonical read fallback. Document deployment settings and provide opt-in database integration tests. Validation: 43 local tests passed; 6 external database tests skipped. Ruff checks, formatting, and offline uv lock verification passed.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- Example for a single datacenter named datacenter1; set production RF appropriately.
|
||||
CREATE KEYSPACE IF NOT EXISTS adcloud
|
||||
WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 1};
|
||||
|
||||
-- Each immutable profile revision is a separate bounded partition.
|
||||
-- Sparse attributes are individual fields; absent attributes occupy no rows.
|
||||
CREATE TABLE IF NOT EXISTS adcloud.identity_profile_fields (
|
||||
tenant_id text,
|
||||
master_id text,
|
||||
revision int,
|
||||
field text,
|
||||
value text,
|
||||
PRIMARY KEY ((tenant_id, master_id, revision), field)
|
||||
);
|
||||
Reference in New Issue
Block a user