Realtime writes

No question is dumb, dumb is not making any.

What do you mean by update a conversation? Do you mean edit the content?

It is not clear if you question is related to “How Dgraph would handle realtime writes” or if you are requesting suggestion in your datamodeling.

A chat in Graph has several ways to do it. The approach you take that will tell you whether you will need to do this or not.

For example,

Approach 1: Each sentence is a node with the predicates “body, date of creation, owner and others”. That is, you will build the conversation using the create_at timestamp

Approach 2: Each sentence is a node with the same predicates as before, but they are connected directly by a “wire”. An edge that denotes a linked list. That way you will not depend on the Timestamp. But there can be errors when the conversation goes REALLY fast. However, to expand this conversation with recurse it would be fast. Cuz it would be just following edges.

Perhaps my answer is not in line with your question, as I may not have understood it correctly.

Cheers.

2 Likes