message PSNUser UUID account_uuid = 1; // Immutable, partition key string online_id = 2; // Mutable, unique secondary index AccountFlags flags = 3; // Bitmask: adult, mfa_enabled, sub_account map<Region, Wallet> wallets = 4; // Multi-currency support repeated Entitlement entitlements = 5; // Game licenses, PS+ status SocialGraph social = 6; // Friends, blocks, following (bidirectional) PrivacySettings privacy = 7; // Telemetry opt-out, presence visibility
| Sub-domain | Storage Technology | Consistency Model | | :--- | :--- | :--- | | | CockroachDB (Global, Strong) | Serializable | | Profile & Social | Cassandra + Redis | Eventual (Read-your-writes) | | Entitlements/Licenses | AWS DynamoDB (GSI over-specified) | Strong (for purchases) | | Telemetry/Trophies | Apache Kafka + S3 Data Lake | At-least-once | psnuser
"accountId": "a1b2c3d4-...", "onlineId": "VenomSnake2024", "avatar": "https://avatar.api.playstation.com/v1/avatars/123", "trophySummary": "platinum": 12, "gold": 84, "silver": 210, "bronze": 845, "level": 287 , "plusStatus": "essential", "privacy": "presenceVisibility": "friends_only", "trophyVisibility": "public" message PSNUser UUID account_uuid = 1; // Immutable,
CREATE TABLE psnuser ( id UUID PRIMARY KEY, account_type ENUM('master', 'sub'), master_id UUID REFERENCES psnuser(id) NULL, monthly_spend_limit_cents INT DEFAULT 0, CHECK ( (account_type = 'master' AND master_id IS NULL) OR (account_type = 'sub' AND master_id IS NOT NULL) ) ); Note: In production, this is denormalized into a graph database (Neo4j or AWS Neptune) to avoid recursive joins. To guarantee the "PlayStation Experience," the psnuser service must expose specific Service Level Indicators (SLIs): message PSNUser UUID account_uuid = 1
private List<PSNUser> getCachedFriendsList(String userId) // Return stale cache + emit degraded metric