What is the recommended / most performant way to keep track of read status 
of message conversations in a multimodel database such as ArangoDB?

To give an example:
There are 4 users logged in in the system: A, B, C and D
Users A, C and D are starting a chat session and start sending messages to 
At one point, user C has to leave for a meeting, but users A and D are 
still sending messages.
Later on, user C logs in again in the system and has to be informed if and 
how many messages he missed from users A and/or D.
Obviously this is a simplified example as in reality there are multiple 
chat sessions going on between multiple people all the time, while people 
can enter or leave at any time.

Of course there are several ways to implement this, but what interests me 
is the most performant way to do this.
Should I just create several collections (chats, messages, users) and store 
id's of related documents, similar to how this is / can be done in a 
relational db?
E.g. each chat message is stored in the "messages" collection and includes 
the id of the chat session it belongs to (from "chats" collection) as well 
as the userid of the sender
Or would it be more performant to create edges between those collections 
(instead of storing id's inside each document), possibly in combination 
with edge attributes?
Or should I use a real graph to get the best performance?

The most difficult part for me is - in terms of performance - how to keep 
track of which message is read by which user and to retrieve the (number 
of) unread messages since the last "mark as read" action for each user.



You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to arangodb+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to