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

Reservation #15

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Reservation #15

wants to merge 8 commits into from

Conversation

lastvirgo266
Copy link
Contributor

이벤트 드라이븐 방식으로 작동하고있고 Consume 한 뒤에 StageCaller가 Stage를 호출 후에 다음 Stage를 nextStageCall을 해야하는데 어느쪽에서 nextStageCall을 하면 좋을지 모르겠습니다.

  • StageCall에서 nextStageCall 하기
    이것도 나쁘지않는데 이렇게 하면 stageCall의 원래 기능은 단순하게 현재의 파라미터에 맞는 단계의 stage를 call하는건데 자동으로 nextStageCall을 까지 하게되면 기능이 무너질듯합니다.

  • Stage 수행단계에서 nextStageCall 호출하기
    이것도 괜찮긴한데... 뭔가 어색하고 코드 중복이 많아질듯합니다

lastvirgo266 and others added 5 commits December 5, 2022 00:02
  - Producer 체크 확인
  - Listener쪽 에러 -> UnknownHostException
  - Ask로 변경

* Basket 테이블 생성
  - 사고하자는 물품들을 모두 지정해둠
  - 이걸통해 방어로직 설계 가능

* Basket UUID 테이블 생성
  - 순수 채번 테이블로 이 채번 테이블을 통해 어디에서든 공정하고 무결한 UUID 채번가능
  - 하나에서 모든걸 하기보다는 StageCaller를 따로 두어 호출

* StageCaller 작성
  - StageCaller에서 Stage 호출
  - 그런데 Next Stage를 어떻게할지 결정을 못함 (nextStageCall 처리를 어떻게??)

// TODO: 2022-12-25 이 부분 애매함.
// stage Caller의 call에서 nextStageCall까지 하는거는 기능이 너무 넓음
// 그렇다고 Stage쪽에서 nextStageCall을 호출하게되면 의존성이 무너질듯함
Copy link
Contributor Author

Choose a reason for hiding this comment

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

차라리 Handler를 하나 추가시켜서 handler에서 stageCall을 하고 결과값을 반환하게 한 다음에 결과값에 따라 nextCall을 하도록 구조하는게 더 나을까요?

  - Handler에서 stage관리 및 에러 처리를 할 수 있도록 수정

* Repository 직접적으로 접근을 못하도록 수정
  - Admin 코드를 제외한 나머지는 한정적으로만 접근 하도록 수정

* Stage 코드 작성완료
  - RestTemplate를 이용하여 Pay와도 소통할 수 있도록 수정

// todo
  - Exception 작성하기
  - error처리 작성하기
  - 실패해서 수정해야함
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.

1 participant