♻️ refactor: CRDT 라이브러리 적용 #135
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
☝️Issue Number
closes #131
📌 개요
OT(Operational Transformation) 기반의 동시편집 시스템을 Yjs CRDT(Conflict-free Replicated Data Type) 기반으로 리팩토링했습니다.
기존 OT 엔진의 복잡한 변환 로직을 제거하고, Yjs의 자동 충돌 해결 기능으로 더 안정적이고 유지보수하기 쉬운 동시편집 시스템을 구축했습니다.
🔁 변경 사항
refactor: OT 엔진 및 관련 클래스 삭제
chore: 사용하지 않는 파일 삭제
refactor: Note 엔티티 및 DTO를 Y.Doc 바이너리 저장 방식으로 변경
refactor: Yjs Y.Doc 기반 저장/복원 로직 추가 (Redis/DB 통합 처리)
refactor: WebSocket 메시지 포맷을 Yjs Y.Doc 업데이트 방식으로 변경
refactor: 컨트롤러 및 스케줄러를 Yjs 동기화 방식으로 업데이트
refactor: Redis 키 및 WebSocket 이벤트 리스너 Yjs 컨텍스트에 맞게 변경
1. 데이터 모델 변경
ydoc_binary(Y.Doc 바이너리) 추가2. WebSocket 메시지 포맷 변경
{ operation: {...}, revision: ... }(OT 연산){ yjsUpdate: "base64...", noteId: ... }(Yjs Y.Doc 업데이트)3. Redis 저장 방식 개선
4. 컨트롤러/스케줄러 업데이트
NoteController: Y.Doc 초기화 로직 추가NoteWebSocketController: STOMP 기반 Yjs 동기화NoteAutoSaveScheduler: Y.Doc 바이너리 자동 저장 (5단계 검증 로깅)NoteRedisService: Y.Doc 업데이트 저장/검증 (5단계 상세 로깅)5. 의존성 추가
y-noDb)📸 스크린샷
👀 기타 더 이야기해볼 점