Skip to content
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

feat: 레디스 도입 및 알림 개수를 캐쉬로 관리 #402

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

bugoverdose
Copy link
Collaborator

@bugoverdose bugoverdose commented Sep 30, 2022

작업 내용

  • build.gradle에 필요한 의존성을 추가.
  • 로컬 환경 및 테스트에서는 EmbeddedRedis 서버를 직접 구동하여 연동
  • 읽지 않은 알람 개수에 대한 count 로직 결과를 캐쉬로 관리하는 로직 도입.
  • dev, prod 프로파일별 별도의 EC2 인스턴스에 Redis 서버 생성하여 다른 비밀번호로 연동

공유사항

로컬에서 실행가능합니다.
Redis의 값을 변경하는 작업은 트랜잭션이 커밋된 이후에 실행되도록 수정해야 할 것 같습니다. 구조가 좀 변할 것 같고, 일단은 우선순위가 낮다고 생각해서 일단 해당 PR에서는 작업하지 않았습니다.

Resolves #401

- 테스트 및 로컬 환경에서 구동 시, 해당 포트에 구동 중인 서버가 없으면 직접 Redis 서버를 하나 구동
- H2 DB와 동일한 역할 수행
- 테스트 실행시, Redis의 데이터를 전부 지우기 위한 RedisStorageCleaner 구현
- 데이터 조회 시점에 실제 데이터를 기반으로 캐시를 생성하는 것이 버그의 가능성을 줄이며, 응답 성능을 덜 저하시킴.
@bugoverdose bugoverdose marked this pull request as ready for review October 11, 2022 11:41
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

91.5% 91.5% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] Redis 도입
1 participant