Vote count:
0
I've never used redis before, but I've been meaning to, and it seems that my current use case is an appropriate fit.
I'm essentially trying to build a messaging app. When one user sends another a message, the data sent to the server looks like this:
{ from_user: 'alice', for_user: 'bob', payload: 'hello!', timestamp: 1404695488 }
What I would then like to be able to do is:
Given alice, see all users that have sent alice a message that alice has not yet read
Given alice and bob, return a list of all messages bob has sent alice, from which I can pop what alice has read. Once alice has read all the messages bob has sent her, then #1 won't return bob.
If I haven't clarified enough, please let me know. Additionally, another part of the reason that I've chosen redis is that since this is a messaging app, I'd like to make use of the Pub/Sub features.
Aucun commentaire:
Enregistrer un commentaire