-
Notifications
You must be signed in to change notification settings - Fork 0
[1팀] 백엔드 코드리뷰용 PR #3
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
Draft
son-daehyeon
wants to merge
29
commits into
review
Choose a base branch
from
main
base: review
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
* chore: git 설정 추가 * build: Gradle 빌드 설정 * feat: Spring Boot 애플리케이션 초기 설정 * config: 데이터베이스 및 Redis 설정 * config: 서버 및 Actuator 설정 * config: Swagger API 문서 설정 * config: JPA, Redis, Jackson 설정 * config: Properties 설정 추가 * feat: API 응답 포맷 구현 * feat: 전역 예외 처리 구현 * feat: HTTP 필터 구현 * feat: 커스텀 유효성 검증기 구현 * feat: JPA 기본 엔티티 구현 * config: JWT 및 프론트엔드 연동 설정 * feat: JWT 토큰 발급 및 검증 구현 * feat: Spring Security UserDetails 구현 * feat: JWT 인증 필터 구현 * feat: Spring Security 설정 구현 * feat: 이메일 인증 토큰 발급 구현 * feat: 이메일 발송 기능 구현 * feat: 이메일 템플릿 추가 * feat: 사용자 도메인 엔티티 구현 * feat: 사용자 API DTO 구현 * feat: 사용자 인증 비즈니스 로직 구현 * feat: 사용자 인프라 레이어 구현 * feat: 사용자 인증 컨트롤러 구현 * feat: 데이터베이스 마이그레이션 스크립트 추가
* chore: Dockerfile 추가 * ci: GitHub Actions 배포 파이프라인 구축
3ce259d to
c70602a
Compare
…roved performance
1af794d to
f3e02e5
Compare
b888e42 to
921aea0
Compare
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.
[1팀] 거부기린 백엔드 코드리뷰
✨ 리뷰를 요청드리는 주요 부분
저희 DB 구조에 따르면 세션과 세션 상태(활성화, 일시중지, 재개, 종료), 세션 지표(실제 스코어 시계열) 이렇게 3개의 테이블이 있습니다.
이렇게 상태를 나눈 이유는 시계열 데이터만 가지고 있으면, 일시중지 했을 때 지표 데이터가 서버에 없을텐데, 실제로 세션 자체가 일시중지된 상태인건지 혹은 데이터가 누락된 것 인지 알 수 없기 때문입니다.
다만, 위 과정에서 생긴 몇몇 이슈가 있는데
전체 세션 시간과 좋은 자세 시간을 계산할 때 오차가 발생합니다.
BE/src/main/kotlin/com/github/kusitms_bugi/domain/session/application/SessionService.kt
Lines 123 to 161 in c64e3b9
전체 세션 시간은 세션 상태로 구간을 나눠 계산하였고, 좋은 자세 시간은 세션 지표를 통해 계산하였습니다.
만약 세션 자체는 진행중인 상태인데, 데이터가 누락된 경우에는 좋은 자세 시간이 계수되지 않는다는 문제가 있습니다.
1번 질문과 조금 이어지는 질문으로, 데이터가 누락된 경우 서버에서 검증을 해야할까 라는 의문이 있습니다.
만약 그렇다면 정책적으로 어떻게 해야할까요?
제가 생각했던 과정들입니다.
검증한다면: 중간에 누락된 데이터로 인해 전체 데이터를 사용할 수 없는 시나리오도 발생할 것 같습니다. 세션이 5분이고, 4분의 데이터만 온다면 서버에서 이를 어떻게 대응해야할까요?
검증하지 않는다면: 전체 데이터의 신뢰도가 떨어질 것 같습니다. 1번 문제를 비롯하여 데이터가 누락됨으로써 생기는 사용자의 신뢰가 하락한다면 서비스의 특성상 사용자 이탈까지 고려하고 있습니다.
데이터를 어떤 주기 그리고 간격으로 받아야 할까요?
프론트에서는 실시간적으로 사용자의 mesh를 계산하여 score를 계산하고 있습니다.
이 때 모든 데이터를 받자니 데이터의 규모가 너무 커질 것 같고, 1초 단위로 받자니 짧은 순가의 중요한 데이터들의 누락될 것 같습니다.
현재 정책은 0.1초 주기로 프론트에서 데이터를 쌓은 후 5초 간격(10 * 60 * 5 = 1,200개)의 score 데이터를 받고 있습니다.
이러한 방향성이 올바른지 검증받고 싶습니다!
💌 요청드리는 리뷰 방향
기능 위주의 리뷰를 받고 싶습니다. 서비스의 특성 상 데이터를 매우 정교하게 다루어여 하는데 이에 대한 노하우가 궁금합니다!
바쁘신 와중에 시간 내어 리뷰해주셔서 감사합니다.
편하게 피드백 부탁드립니다! 🥹