웨이팅이 필요한 식당을 편리하게 이용할 수 있는 서비스입니다.
식당 이용객은 순서를 기다리기 위해 현장에서 대기하지 않아도 되며, 식당측은 간편하게 대기열을 관리할 수 있습니다.
- Backend: Java 17, Spring Boot 3.1.3, Spring Data JPA, Spring Rest Docs
- DevOps: MySQL 8.2.0, Redis, Docker, Naver Cloud Platform, Prometheus, Grafana, Ngrinder
- 올바른 Enum 사용으로 클라이언트에 의존하지 않는 API 설계
- 역할과 책임에 따른 DTO 관리 전략
- 단위 테스트와 통합 테스트 사이의 트레이드 오프
- 로그의 일관성과 명확성 사이의 트레이드 오프
- Spring Security 없이 세션 인증 구현 : 필터를 선택해서 구현
- 세션 저장소를 Redis로 바꾸게 된 이유
- 식당 대기열에서 동시성 이슈 해결
sequenceDiagram
actor A as client
participant AuthController
participant AuthFacade
participant TwoWayCipherService
participant MemberQueryService
participant MemberRepository
participant OneWayCipherService
participant SessionService
A ->> AuthController: 로그인 요청
AuthController ->> AuthFacade: 사용자 인증 및 세션 생성
AuthFacade ->> TwoWayCipherService: 이메일 암호화
AuthFacade ->> MemberQueryService: 암호화된 이메일로 사용자 조회
MemberQueryService ->> MemberRepository: 사용자 도메인 조회
AuthFacade ->> OneWayCipherService: 비밀번호 일치 여부 확인
AuthFacade ->> SessionService: 사용자 식별자와 이름을 세션에 추가
sequenceDiagram
actor A as client
participant StoreController
participant StoreFacade
participant StoreQueryService
participant StoreRepository
A ->> StoreController: 식당 조회 요청
StoreController ->> StoreFacade: 응답 DTO 조회
StoreFacade ->> StoreQueryService: 응답 DTO 조회
StoreQueryService ->> StoreRepository: 식당 도메인 조회
sequenceDiagram
actor A as client
participant WaitingController
participant WaitingFacade
participant StoreQueryService
participant MemberQueryService
participant WaitingService
participant WaitingRepository
A ->> WaitingController: 식당 대기 요청
WaitingController ->> WaitingFacade: 대기열 생성
WaitingFacade ->> StoreQueryService: 식당 도메인 조회
WaitingFacade ->> MemberQueryService: 사용자 도메인 조회
WaitingFacade ->> WaitingService: 대기열 도메인 생성
WaitingService ->> WaitingRepository: 생성한 대기열을 DB에 저장