-
Notifications
You must be signed in to change notification settings - Fork 3
refactor : submission-stream #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* refactor : logout HttpServeletRequest를 컨트롤러에서 String으로 추출 후 service로 전달 * refactor : whitelist 등록 * refactor : 에러 발생 시, html응답 대신 Json응답으로 받을 수 있도록 리팩토링 * refactor : requestMapping으로 앞에 일괄적으로 /api 달기
* feat : 게임 도메인 엔티티 생성 및 스킬, 아이템 효과 정의 * feat : 게임 도메인 서비스, 아이템 뽑기 도메인서비스 추가, 랜덤 인카운터 추가 * feat : 아이템 장착, 뽑기, 인벤토리 오픈, 스탯 확인, 캐릭터 생성 기능 추가 # Conflicts: # src/main/java/org/ezcode/codetest/common/security/config/SecurityConfig.java * chore : properties 수정 * chore : properties 수정 * chore : securityconfig 오타수정 * chore : 오타수정 * chore : 오타수정 * chore : 무수히 많은 오타수정, 누락된 어노테이션 추가 * docs : 환경변수 추가 * docs : 오타수정 --------- Co-authored-by: pokerbearkr <[email protected]>
* refactor : api 경로 추가, oauth 경로 수정 * refactor : whitelist 경로 수정 * refactor : redirect url 수정
|
Caution Review failedThe pull request is closed. """ Walkthrough이 변경사항은 게임 도메인(캐릭터, 아이템, 인벤토리, 도메인 서비스, 컨트롤러)과 제출(Submission) 시스템에 대규모 기능을 추가 및 리팩토링합니다. MongoDB와 Redis를 활용한 저장소 및 큐 기반 비동기 처리, OpenAPI 문서화, 인증/보안 흐름 개선, 채팅/이벤트 네이밍 정비, 다양한 도메인 엔티티 및 DTO 추가가 포함됩니다. Changes
Sequence Diagram(s)제출(Submission) 비동기 처리 및 채점 흐름sequenceDiagram
participant Client
participant SubmissionController
participant SubmissionService
participant QueueProducer (Redis)
participant RedisJudgeQueueConsumer
participant JudgeClient
participant SubmissionDomainService
participant EmitterStore
Client->>SubmissionController: POST /api/problems/{id}/submit-stream
SubmissionController->>SubmissionService: enqueueCodeSubmission()
SubmissionService->>EmitterStore: save(emitterKey, emitter)
SubmissionService->>QueueProducer: enqueue(SubmissionMessage)
SubmissionController-->>Client: SseEmitter (즉시 반환)
RedisJudgeQueueConsumer->>SubmissionService: submitCodeStream(SubmissionMessage)
SubmissionService->>JudgeClient: submitAndGetToken()
loop 각 테스트케이스
SubmissionService->>JudgeClient: pollUntilDone(token)
JudgeClient-->>SubmissionService: JudgeResult
SubmissionService->>SubmissionDomainService: handleEvaluationAndUpdateStats()
SubmissionService->>EmitterStore: get(emitterKey)
SubmissionService-->>Client: SSE partial result
end
SubmissionService-->>Client: SSE final result
SubmissionService->>EmitterStore: remove(emitterKey)
게임 아이템 뽑기 및 인벤토리 처리sequenceDiagram
participant Client
participant GamePlayController
participant GamePlayUseCase
participant ItemShoppingDomainService
participant CharacterStatusDomainService
participant ItemRepository
participant InventoryRepository
Client->>GamePlayController: POST /games/gamblings
GamePlayController->>GamePlayUseCase: gamblingForItem(userId, itemCategory)
GamePlayUseCase->>ItemShoppingDomainService: gamblingNewWeapon/Defence/Accessory()
ItemShoppingDomainService->>ItemRepository: findAllByItemCategory()
ItemShoppingDomainService->>InventoryRepository: findByGameCharacterId()
ItemShoppingDomainService-->>GamePlayUseCase: Item
GamePlayUseCase-->>GamePlayController: ItemGamblingResponse
GamePlayController-->>Client: 201 Created + ItemGamblingResponse
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
해결해야 할 문제
참고 사항
Summary by CodeRabbit
신규 기능
버그 수정 및 개선
/api로 통일문서화
환경설정
기타