-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 이미지 도메인 생성 #14
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: 이미지 도메인 생성 #14
Conversation
gustj3104
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
따로 이견 없어요 수고하셨습니다!
| @Column(name = "unique_filename", nullable = false, length = 255) | ||
| val uniqueFilename: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이미지를 식별하기 위한 파일명인가요?? Id, Uniquefilename 둘 다 필요한 건지 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ex. originalFileName이 이미지.jpg인데, 중복된 파일명이 또 저장되는 경우를 예방하기 위해서 uuid기반의 uniqueName을 추가해습니다! db에서 식별은 id만 있어도 되지만 물리 환경에선 클라우드냐 로컬이냐에 따라서 uniqueName도 필요할 수 있어서요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스토리지 식별자로 사용되는 부분 이해했어요 감사합니다! 그럼 혹시 url은 가변적이어서 식별자로 사용하지 않는 걸까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 스토리지가 구글클라우드, aws, 클라우드플레어 등등 변경될 수 있고 가변적이라 생각해서 식별자로 사용하지 않았습니다~
📄 작업 내용
패키지나 리뷰 등등 다른 애그리거트에서 사용할 수 있도록 범용적인 이미지 객체를 설계했습니다.
기본적으로 다른 애그리거트에서 이미지 저장할 때 Event를 발신하면 ImageEventListener에서 수신해서 비동기로 이미지를 저장하게 됩니다.
이미지용 비동기 쓰레드풀을 별도로 생성해서 클라우드 응답이 지연되어도 다른 요청에는 지장이 없도록 설정했습니다.
🙋🏻 이슈 / 궁금증 / 추가사항
close #13