Implement lab3 scaling, shared idempotency, failure research and defense guide

This commit is contained in:
2026-10-29 21:36:47 +03:00
parent 0ab3a341aa
commit 99c87315cf
58 changed files with 8860 additions and 24 deletions
@@ -0,0 +1,10 @@
CREATE TABLE message_requests (
user_id uuid NOT NULL REFERENCES users(id),
chat_id uuid NOT NULL REFERENCES chats(id),
key text NOT NULL,
body_hash bytea NOT NULL,
response jsonb NOT NULL,
expires_at timestamptz NOT NULL,
PRIMARY KEY(user_id,chat_id,key)
);
CREATE INDEX message_requests_expiry_idx ON message_requests(expires_at);