-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create RealWorld data model in Redis #1
Comments
User
I think can store two separate HASH keys for this:
since profile is public, wouldn't want the app to be getting back the credentials also when some user is just loading the publicly available profile info. Profile
Profile seems to return List of followers/following can be recorded as a SET under You can then query for SET membership to figure out if you're already following a user or not Article
I think article can be stored by the following keys:
Suppose you could write events too like ArticlePublishedEvent, and ArticleEditedEvent, and ArticleFavoritedEvent, and AuthorFollowedEvent etc that could then be processed to handle the logic of say incr the favorited count, and add the article to the favorites list etc in the case of ArticleFavoritedEvent. |
This is RealWorld backend API spec: https://github.com/gothinkster/realworld/tree/master/api
Side quest: would be fun to write a Turbo frontend for this!
Side quest 2: would be really interesting to try a GraphQL backend https://leapgraph.com/graphql-with-redis
The text was updated successfully, but these errors were encountered: