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

support use cases in service #1

Open
5 of 12 tasks
Holayn opened this issue Apr 12, 2020 · 0 comments
Open
5 of 12 tasks

support use cases in service #1

Holayn opened this issue Apr 12, 2020 · 0 comments

Comments

@Holayn
Copy link
Owner

Holayn commented Apr 12, 2020

  • get all chat messages for a session
    • this is supported by chat table having a partition & sort key
    • can take advantage of BatchGetItem
  • get all sessions for a user
    • can use secondary index
  • get a user's name
  • start a chat with a user
    • for each user create a new item in session table of type regular using same session id
  • send a message to a user
    • add item to chat table

advanced use-cases:

  • delete a message in a chat
    • remove item from chat table
  • delete a chat with a user
    • delete entry containing session-id & user-id from session table
    • if no session table no longer contains session-id, delete entries from chat table
  • create a group chat
    • for each user, create a new item in session table of type group using same session id
  • send a message to a group chat
    • add item to chat table
  • delete a message from a group chat
    • remove item from chat table
  • delete a group chat
    • delete entry containing session-id & user-id from session table
    • if no session table no longer contains session-id, delete entries from chat table
  • support sticker
    • add a new item in chat table with type "sticker"
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

No branches or pull requests

1 participant