Here is an example from Redis intro:
$ redis-cli rpush messages "Hello how are you?"
OK
$ redis-cli rpush messages "Fine thanks. I'm having fun with Redis"
OK
$ redis-cli rpush messages "I should look into this NOSQL thing ASAP"
OK
$ redis-cli lrange messages 0 2
1. Hello how are you?
2. Fine thanks. I'm having fun with Redis
3. I should look into this NOSQL thing ASAP
Below they write the following:
As you can guess from the example above, lists could be used in order to implement a chat system.
My question is: what do they really mean saying to implement a chat system
?
For example, a message in a chat has at least three parameters:
1) a text of a message,
2) an author of a message,
3) time a message was written.
In the code example above I see only one parameter: a text of a message.
So how lists may be used to implement a chat system? Where do they suppose to store other two parameters and how to connect them to a message in Redis list?
UPD:
I found a great book to understand what Redis is:
http://openmymind.net/2012/1/23/The-Little-Redis-Book/
It is short, simple but very informative.