You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
주차와 함께 변경 사항을 요약하여 구성해 주세요.
ex: [1주차] 사용자 로그인 기능 구현
작업 내용
이번 PR에서 진행된 주요 변경 사항을 기술해 주세요. 코드 구조, 핵심 로직 등에 대해 설명해 주시면 좋습니다. (이미지 첨부 가능)
ex: ConcurrentOrderService에 동시 주문 요청 처리 기능 추가
RateLimit 적용
테스트코드 작성
발생했던 문제와 해결 과정을 남겨 주세요.
ex) 문제 1 - 다수의 사용자가 동시에 같은 리소스를 업데이트할 때 재고 수량이 음수로 내려가는 데이터 불일치 문제 발생 해결 방법 1 - Redis SET 명령어에 NX(Not Exists)와 PX(Expire Time) 옵션을 활용해 락을 설정했습니다. 이유는 ~
Google guava ratelimiter 라이브러리의 경우 초당 RateLimit를 제한하고 있어 분당 RateLimit를 제한할 수 있는 라이브러릴 활용하였습니다. 특정 라이브러리의 사용 유무는 크게 중요하지 않다고 판단하여 비즈니스 요구사항에 맞는 라이브러리를 사용하였습니다.
이번 주차에서 고민되었던 지점이나, 어려웠던 점을 알려 주세요.
과제를 해결하며 특히 어려웠던 점이나 고민되었던 지점이 있다면 남겨주세요.
module-common에 존재하는 Aspect, RateLimiter 파일들의 위치가 애매하였습니다. 이론상 외부 라이브러리에 대한 의존이기 때문에 infrastructure 에 존재해야할 것 같으나, 그럴경우 DistributedManager의 경우 Facade Layer 즉 application 레이어에서 참조하기 때문에 infrastructure와 application의 순환 참조가 발생하게 됩니다. 이 부분을 어떻게 해결해야할지 문의드립니다.
성능향상을 위해서는 분산락의 범위를 critical section만 적용되도록 해야하며, 마찬가지로 트랜잭션의 범위도 동일해야한다고 판단했었는데요. 현업에서는 선언적 트랜잭션이 아닌 어떤 방안으로 개발을 진행하는지 문의드립니다.
리뷰 포인트
리뷰어가 특히 의견을 주었으면 하는 부분이 있다면 작성해 주세요.
ex) Redis 락 설정 부분의 타임아웃 값이 적절한지 의견을 여쭙고 싶습니다.
프로젝트 전체적인 구조에 대해서 리뷰해주셨으면 합니다.
테스트코드 파일에 대한 패키지 구조는 어떻게 진행해야할 지 문의드립니다.
기타 질문
추가로 질문하고 싶은 내용이 있다면 남겨주세요.
ex) 테스트 환경에서 동시성 테스트를 수행하였고, 모든 케이스를 통과했습니다. 추가할 테스트 시나리오가 있을까요?
module-common에 존재하는 Aspect, RateLimiter 파일들의 위치가 애매하였습니다. 이론상 외부 라이브러리에 대한 의존이기 때문에 infrastructure 에 존재해야할 것 같으나, 그럴경우 DistributedManager의 경우 Facade Layer 즉 application 레이어에서 참조하기 때문에 infrastructure와 application의 순환 참조가 발생하게 됩니다. 이 부분을 어떻게 해결해야할지 문의드립니다.
DistributedManager 를 infrastucrue 레이어에 두고, 컨트롤러는 infrastructure 가 아니라 application 에 두면 application 안에 rateLimiter 가 있게 될것 같습니다.
rateLimiter 가 infrastucture 에 있는 경우는 외부 게이트웨이와 관계가 있을 떄 사용한다고 하네요
제가 아는 컨셉은 controller 는 외부 진입점이라 application 에 두는게 맞다고 생각합니다.
module-infrastructure 에서, 외부에 api 를 통신하는 부분이 있다면 해당 설명은 맞는 설명일 것 같습니다.
in은 api 를 호출하는 경우이며, out은 persistence 로 데이터를 가져오는 port로 구성
4주차 동안 고생많으셨습니다 👍
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
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.
제목(title)
작업 내용
발생했던 문제와 해결 과정을 남겨 주세요.
이번 주차에서 고민되었던 지점이나, 어려웠던 점을 알려 주세요.
리뷰 포인트
기타 질문