Step 14: 콘서트 예약 시나리오 대기열 개선 RDBMS -> Redis#32
Merged
kilhyeonjun merged 4 commits intomasterfrom Nov 10, 2024
Merged
Conversation
kilhyeonjun
commented
Nov 7, 2024
Contributor
Author
kilhyeonjun
left a comment
There was a problem hiding this comment.
간단하게 구현체만 바꾸면 될줄 알았으나 DB에 저장하는 방식을 제거하고 Hash를 사용함으로써 비지니스에도 영향도가 많이 가서 diff가 많은 점 참고 부탁드림다!
| @Value("${queue.active-key}") | ||
| private String activeQueueKey; | ||
|
|
||
| public WaitingQueue save(WaitingQueue waitingQueue) { |
Contributor
Author
There was a problem hiding this comment.
기존 Repository 인터페이스 구조를 변경하지 않을려고 하다가 save 내부가 많이 지저분해졌습니다. 구현체가 바뀜에 따라 인터페이스도 바뀌었어야 했을까요?
애초에 첫 인터페이스가 유연하지 못하게 만든 것도 있는 것 같습니다.
There was a problem hiding this comment.
구현체가 바뀜에 따라 인터페이스는 변경되면 안됩니다. 그렇다면 인터페이스를 사용할 논리가 부족해집니다.
처음부터 인터페이스를 쓰지 않고, 구현체만 사용중에- 새로운 구현체가 필요해져서 인터페이스를 만드는 방식이 좀더 자연스럽다고 생각합니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
요구사항
대기열 구현에 대한 설계를 진행하고, 설계한 내용과 부합하도록 적절하게 동작하는 대기열을 구현하여 제출
작업 내용
리뷰포인트