Skip to content

Conversation

@taipaise
Copy link
Collaborator

@taipaise taipaise commented Jan 20, 2025

🌁 Background

  • 근거리 통신 모듈을 리팩터링하면서 더 이상 사용하지 않는 API들을 정리했습니다.
  • 새로운 API에 맞게 domain, presentation 모듈을 수정했습니다.
  • 호스트 정보를 관리하거나, 연결을 관리하는 등 repository의 역할이 너무 많았습니다. repository의 일부 역할을 domain으로 옮겼습니다.

👩‍💻 Contents

  • 사용하지 않는 API를 호출하는 코드를 수정했습니다.
  • 리팩토링한 NearbyNetworkService에 맞게 코드를 수정했습니다.
  • 기존의 WhiteboardRepository와 ManageWhiteboardObjectRepository를 각각 WhiteboardListRepository, WhiteboardRepository로 수정했습니다.
    • WhiteboardListRepository에는 화이트보드 목록과 관련된 작업들을 수행합니다. (검색, 방 생성 등)
    • WhiteboardRepository에는 화이트보드 내부에서 수행할 작업들이 정의되어 있습니다. (오브젝트 송수신 등)

📝 Review Note

  • 변경 사항이 많은 것 같지만.. 주로 파일 이름이 수정되거나, 객체의 역할을 옮기면서 발생한 diff가 많습니다.
  • 이전 PR에서 NearbyNetwork 관련해서 잘 봐주셨기 때문에, 이번 PR에서는 변경된 respository(WhiteboardListRepository, WhiteboardRepository)를 집중적으로 봐주시면 감사하겠습니다.
  • 현재 실 동작에서 아직 수정해야할 버그들이 존재합니다. 치명적인 오류는 발견하지 못해 금방 해결할 수 있을 것이라 생각합니다.

choijungp and others added 15 commits January 16, 2025 10:02
- 기존 WhiteboardRepository가 하는 역할 일부를 WhiteboardListRepository로 옮겼습니다.
- 화이트보드 광고, 탐색, 연결 시도와 관련된 기능들을 제공합니다.
- 단일 화이트보드에서 수행할 수 있는 기능들을 제공합니다.
- 기존 WhiteboardObjectRepository에서 수행한 기능을 담당하도록 수정했습니다.
- 추가적으로 화이트보드 연결 끊기와 재게시 기능도 담당합니다.
- 기존에 WhiteboardUseCase에서 제공하던 기능의 일부를 담당합니다.
- 화이트보드 생성, 광고, 연결, 탐색 기능을 제공합니다.
- 기존 WhiteboardObjectUseCase에서 하는 기능을 모두 담당합니다.
- 추가로 화이트보드 연결 해제 기능을 제공합니다.
@taipaise
Copy link
Collaborator Author

테스트 코드의 경우 C팀 변경 사항 적용 후 다시 살펴보겠습니다!

Copy link
Collaborator

@ekrud99 ekrud99 left a comment

Choose a reason for hiding this comment

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

대공사 진짜 수고하셨습니다..
제가 처음부터 화이트보드 레포지토리 설계를 잘 했더라면 수고가 좀 덜 했으려나요..
한결 깔끔해진 것 같아 좋습니다!!

Copy link
Member

@eemdeeks eemdeeks left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다!!!
생각한대로만 잘 동작한다면 너무 좋을 것 같네요! 👍
리팩토링까지 구욷구욷

public struct DataInformationDTO: Codable {
public struct AirplaINDataDTO: Codable {
public let id: UUID
public let data: Data
Copy link
Member

Choose a reason for hiding this comment

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

여기에 data를 Data타입으로 되어 있는데,
보내 줄 데이터를 인코딩하여 넣어주기만 하면 될 것 같은데, 맞을까요??

Comment on lines +30 to +36
public func republish(whiteboard: Whiteboard) {
nearbyNetworkService.stopPublishing()
nearbyNetworkService.startPublishing(
with: whiteboard.name,
connectedPeerInfo: whiteboard
.participantIcons
.map { $0.emoji })
Copy link
Member

Choose a reason for hiding this comment

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

이전에 리퍼블리시하는 과정에서 원하는 대로 동작하지 않았었는데, network 프레임 워크로 변경 후에는 괜찮은지 궁금합니다!!

Comment on lines +14 to +15
private var whiteboardListRepository: WhiteboardListRepositoryInterface
private var profileRepository: ProfileRepositoryInterface
Copy link
Member

Choose a reason for hiding this comment

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

var인 이유가 혹시 있을까요..!?
객체가 변경되지는 않을 것 같아서 여쭤봅니다!

serviceType: serviceName)
serviceBrowser = MCNearbyServiceBrowser(peer: peerID, serviceType: serviceName)

// TODO: - 추후 기능 동작 확인 후 NearbyNetworkService 대체
Copy link
Member

Choose a reason for hiding this comment

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

성공적이라면 투두를 지워도 될 것 같습니다!! :)

@taipaise taipaise merged commit ddcfea4 into develop Feb 12, 2025
1 of 2 checks passed
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.

5 participants