Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (25)
워크스루이 PR은 Redis 기반 Yjs 협업 시스템을 도입하며, ORM 엔티티를 YjsDocumentOrmEntity에서 CardsetContentOrmEntity와 CardsetIncrementalOrmEntity로 대체합니다. CollaborationUseCase와 CollaborationGateway가 Redis 서비스를 통해 실시간 문서 동기화를 관리하도록 리팩토링되었고, 새로운 HTTP 엔드포인트가 카드 목록 조회 및 저장 기능을 추가합니다. 변경 사항
시퀀스 다이어그램sequenceDiagram
actor Client
participant CG as CollaborationGateway
participant YDS as YjsDocumentService
participant Redis
participant DB as CardsetContent<br/>Repository
Client->>CG: join-cardset (cardsetId)
CG->>YDS: getOrCreateDocument(cardsetId)
YDS->>Redis: loadDocument(cardsetId)
alt Document in Redis
Redis-->>YDS: Y.Doc state
else Not in Redis
YDS->>DB: Query CardsetContent
alt Content in DB
DB-->>YDS: stored content
YDS->>YDS: reconstruct Y.Doc
else No DB content
YDS->>YDS: create new Y.Doc
YDS->>Redis: saveDocument(cardsetId, doc)
end
end
YDS-->>CG: Y.Doc
CG->>Client: emit sync (encoded state)
Client->>CG: update (cardsetId, update payload)
CG->>YDS: getOrCreateDocument(cardsetId)
YDS-->>CG: Y.Doc
CG->>CG: apply update to Y.Doc
CG->>YDS: saveUpdate(cardsetId, update)
YDS->>Redis: store incremental update
YDS->>YDS: scheduleMySqlPersistence(cardsetId)
CG->>Client: broadcast updated state
Note over CG,DB: On last client disconnect or timeout
CG->>YDS: flushIncrementalHistory(cardsetId)
YDS->>DB: persist incremental updates
YDS->>Redis: clear history key
예상 코드 리뷰 난이도🎯 4 (Complex) | ⏱️ ~65분 관련 PR
시
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can generate walkthrough in a markdown collapsible section to save space.Enable the |
📝 변경 내용
✅ 체크리스트
💬 기타 참고 사항
Summary by CodeRabbit
릴리스 노트