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

[WIP] #26 Fanout 패턴 적용을 통한 PostFeed 기능 구현 #30

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

Conversation

gru3530
Copy link
Collaborator

@gru3530 gru3530 commented Feb 25, 2025

#26 설계를 토대로 Fanout 패턴을 적용한 PostFeed를 구현한다.

클래스 역할

  • FanoutService : 유저 타입에 따른 전략 선택
  • Strategy : 유저 타입에 따른 저장방식 선택
  • CacheService : Redis를 활용한 인플루언서 게시물의 캐싱

설계

  • 일반유저가 PostFeed를 할 경우PostRepository에 컨텐츠를 저장하고, Feed를 조회할때에 피드를 가져오는 Pull 방식
  • 인플루언서가 PostFeed를 할 경우 DB와 Redis에 동시 저장, 팔로워가 피드를 가져올때에 Redis -> db 순서로 피드를 가져오는 방식
  • 유저 타입을 추가를 용이하게 하기위해 전략패턴 적용

gru and others added 29 commits February 8, 2025 01:51
# Conflicts:
#	README.md
UserType :
REGULAR,
INFLUENCER

추후 ad, admin 등 추가 예정

PostService에서 PostFeed를 할 경우 DB에 우선 저장, 유저 타입에따라 Redis에 저장할지 결정.
@gru3530 gru3530 added the 🚀NEW FEATURE🚀 새로운 기능을 구현합니다 label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀NEW FEATURE🚀 새로운 기능을 구현합니다 🚧 WIP 🚧
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant