Skip to content

Conversation

@tilsong
Copy link
Collaborator

@tilsong tilsong commented May 16, 2023

PR 유형

  • 버그 수정
  • 기능
  • 코드 스타일
  • 리팩토링
  • 빌드
  • CI/CD
  • 문서
  • 기타

변경사항

변경 전

  • 로드 밸런싱 환경에서 채팅 기능 정상 작동x

변경 후

  • 로드 밸런싱 환경에서도 채팅이 정상적으로 동작하도록 기능을 수정했습니다.
    • 이를 위해 Redis의 pub/sub을 적용했습니다.
    • 채팅 관련 테스트를 수정, 추가했습니다.

사용 방법

  • 로컬 테스트를 위해 로컬 환경에 Redis 설치 및 운용이 필요합니다.

기타

  • 배포 서버에서도 Redis 설치 및 운용이 필요합니다.
  • Redis 연결 및 객체의 직렬화를 위해 다음의 의존성을 추가했습니다.
    • org.springframework.boot:spring-boot-starter-data-redis
    • com.fasterxml.jackson.datatype:jackson-datatype-jsr310
  • 실제 어플리케이션과 레디스와의 연동은 포스트맨을 통해 테스트했습니다.

tilsong added 17 commits May 14, 2023 16:03
- 기존 ChatController에 있던 로직을 ChatService를 생성하여 이전시켰습니다.

- Chat 서비스의 테스트를 위한 환경 클래스를 생성하고, 서비스의 메서드를 테스트하는 코드를 작성했습니다.

- 테스트 중 관련 로직을 개선하고, dto를 수정했습니다.
- 추가된 의존성
  - spring-boot-starter-data-redis
  - com.fasterxml.jackson.datatype:jackson-datatype-jsr310
-  채팅방에 대한 sse 연결이 현재 존재할 경우 redis를 통해 채팅을 전달하도록 코드 작성
@tilsong tilsong requested a review from f-lab-fi May 16, 2023 10:59
@tilsong tilsong self-assigned this May 16, 2023
@tilsong tilsong linked an issue May 16, 2023 that may be closed by this pull request
2 tasks
@tilsong tilsong merged commit 9003d87 into main Jun 23, 2023
tilsong added a commit that referenced this pull request Jul 16, 2023
- @JsonIgnore를 통해 순환 참조가 발생하는 필드를 Json으로 직렬화하는 과정에서 무시하도록 함.
tilsong added a commit that referenced this pull request Jul 17, 2023
tilsong added a commit that referenced this pull request Jul 17, 2023
[#54] 사이트 URL 적용 및 SSL 처리
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

로드 밸런싱 환경에서의 채팅 기능 동작을 위한 코드 수정

2 participants