Fair enough.
Simon Tucker
11

I agree with you Simon Tucker, storing the messages separately is kind of redundant now since you storing the group events. This approach however won’t work for the whole chat. You need to store the state of the groups (users, title) or otherwise you winding up fetching the whole event log.

so the idea is to have per group a event log and have a DB state for the whole app such as users per chat and title per chat. This however could lead to some implementation problems when dealing with reconnection. Like you have been added to a new chat etc.

Another approach could be to have a data structure such as redux, storing the action and the new state in the DB at the same place.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.