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] 고급 모의투자 WebSocket 구현 #51

Closed
4 tasks
Preta3418 opened this issue Nov 27, 2024 · 0 comments
Closed
4 tasks

[Feat] 고급 모의투자 WebSocket 구현 #51

Preta3418 opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels
✨ Feature 기능 개발

Comments

@Preta3418
Copy link
Collaborator

🎟️ 상위 작업

SCRUM-20

⚒️ 구현할 기능

고급 모의투자에 WebSocket 을 구현합니다

🎯 기능이 필요한 이유

고급 모의투자 기능 구현 중 WebSocket 구현시 200% 편한것을 확인하여 WebSocket 으로 구현을 할 예정입니다.
지금 현재 Http Request 로 고급 모의투자가 구현되어 있지만, 시간을 프론트측에서 재야 하거나, 게임을 중간에 나갈시 버그가 생기는 등 다양한 문제가 발견되었습니다. 이 문제들을 해결하고자 고급 모의투자를 실시간 연결, WebSocket 으로 바꾸고자 합니다


StockRecord 와 AdvStock 쪽은 변경이 되지 않습니다. 대부분의 기능 자체는 동일하지만, 추가 기능 이 생깁니다.

  1. 이제 시간을 프론트가 아니라 백에서 담당합니다. 즉 카운트 다운 8분 30초와, 게임 진행, 정지 등의 시간과 관련된 기능, 그리고 Reference Data 와 Live Data 를 특정 시간에 보내는 기능 모두 백에서 담당하게 됩니다
  2. 게임을 중간에 끄는 등의 행위시 게임을 무기한 pause 상태로 저장합니다. 다음날 아침 7시 기준으로 게임을 강제 종료시킵니다.
  3. 실시간으로 바뀌면서 여러 메소드의 형태가 달라집니다.

📝 작업 상세 내용

  • WebSocket config 등 설정
  • 고급 모의투자 Refactoring
  • 타이머와 관련된 새로운 기능 추가
  • 게임 중간 종료시 강제 pause 와 아침 7시에 강제 end 기능 구현 (scheduler)

🗓️ 개발 일정

11월27일 ~ 11월 28일

🌱 나누고 싶은 점

  • Reference1
@Preta3418 Preta3418 added the ✨ Feature 기능 개발 label Nov 27, 2024
@Preta3418 Preta3418 self-assigned this Nov 27, 2024
Preta3418 added a commit that referenced this issue Nov 27, 2024
WebSocket 구현이 완료되었습니다. WebSocket 설정 뿐만이 아니라 실질적인 게임의 모든 기능이 이제 Service 에서 진행됩니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 27, 2024
주식의 구매와 판매 관련하여 handler 구현이 정상적으로 완료되지 않아 수정하였습니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 27, 2024
게임 종료시 WebSocket Session 이 종료되지 않고 영원히 유지되는 이상한 일이 일어나서 이를 고쳤습니다.

close: #51
Preta3418 added a commit that referenced this issue Nov 27, 2024
StockRecord Repository 에서 활용되는 advId 가 제대로 매핑이 되지 않아 생기는 오류를 수정하였습니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
간단한 URI 변경 입니다. 테스트용으로 만들었던걸 그대로 쓰고 있는걸 확인하여 컨베션에 맞게 변경하였습니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
stock 수치를 보낼때 쓰지 않는 수치들이 상당히 많이 존재하여 AdvStockResponseDto 를 다시 사용하기 시작했습니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
주식 수량을 정하는 quantity 필드가 int 로 되어 있던것을 double 로 변경하였습니다.

related to: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
stockRecord 내부에서 advId 를 받아 조회하면 특정 게임의 내역만 조회가 되어 memberId 로 수정하였습니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
전 refactoring 과 같은 이유로, advId 로 조회하는 주식을 전부 memberId 로 추가적으로 변환하였습니다

related to: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
간단한 오류수정입니다

close: #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
몇몇 URL 이 직관적이지 않아 변경하였습니다.

close : #51
Preta3418 added a commit that referenced this issue Nov 28, 2024
URL 이상이 있어서 수정하였습니다.

close: #51
Preta3418 added a commit that referenced this issue Dec 1, 2024
프론트 측 요청으로 가장 최신의 8개의 거래량을 거래하는 기능을 구현하였습니다

related to: #51
Preta3418 added a commit that referenced this issue Dec 2, 2024
버그 수정과 WebSocket 설정 변경으로 인한 재 연결 등 다양한 방면에서 Refactoring 을 했습니다. 기능적인 차이는 없습니다.

related to: #51
Preta3418 added a commit that referenced this issue Dec 2, 2024
WebSocketConfig 충돌 수정입니다

related to: #51
Preta3418 added a commit that referenced this issue Dec 3, 2024
아티클을 위해 모든 주식을 삭제하는 기능을 추가했습니다

related to: #51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발
Projects
None yet
Development

No branches or pull requests

1 participant