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

[DPMBE-107] 유저 위치 변경시 만났다 이벤트 발행한다 #174

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

Conversation

BlackBean99
Copy link
Collaborator

개요

작업사항

  1. 영역 기반 교집합의 유무로 최적화를 진행합니다. ( 교집합이 없으면 만날 수 없음 )
    image.
  2. 교집합이 있을 경우 영역 Level 을 낮춥니다. ( 더 작은 영역으로 변환)
  3. 위 연산을 반복하면서 만남 조건을 충족하는지 검사하여 만난 사람에 대한 이벤트를 발행합니다.

영역 크기는 주석으로 작성해두었습니다. 아래 링크를 참고하세요
영역 크기 document 참고

변경로직

  • 만남 상수는 10미터로 설정해두었습니다.
  • 일부 Transactional 을 org.springframework.transaction.annotation.Transactional로 변환했습니다.

@BlackBean99 BlackBean99 requested a review from ImNM as a code owner July 9, 2023 13:10
@BlackBean99 BlackBean99 self-assigned this Jul 9, 2023
@BlackBean99 BlackBean99 requested a review from kdomo as a code owner July 9, 2023 13:10
@sonarcloud
Copy link

sonarcloud bot commented Jul 9, 2023

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 1 Code Smell

26.7% 26.7% Coverage
0.0% 0.0% Duplication

Copy link
Member

@ImNM ImNM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

흠... 저라면 간단히
몽고디비에 사람 좌표 집어넣고

업데이트 된 좌표기준으로
10M 안에 있는 사람의 목록을 가져왔을것 같아요
넘 어렵게 가신거아닐까유!

아니면
geohash 사용해서

좌표 ->
wydm67k 변환
wydm67 까지 포함되는 좌표있는지 loop 한번만 돌고 끝내는 방법도 있을것같아요
참고요!

Comment on lines 25 to 29

@Embedded
var userLocation: CoordinateVo? = null,
var userLocation: CoordinateVo? = CoordinateVo(0.0, 0.0),

@Embedded
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옵셔널 업애주셔유!

@@ -23,7 +24,7 @@ class PromiseUser(
var userId: Long,

@Embedded
var userLocation: CoordinateVo? = null,
var userLocation: CoordinateVo? = CoordinateVo(0.0, 0.0),

@Embedded
var promiseUserType: PromiseUserType? = PromiseUserType.READY,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기두?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 다른 PR 에 반영돼 있습니당

Copy link
Member

@kdomo kdomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

만났다 이벤트 어렵네요ㅜㅜ

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.

[DPMBE-107] 유저 위치 변경시 만났다 이벤트 발행한다
3 participants