How do I avoid a user viewing stale data?

I’m working on an application that will experience users accessing the same data simultaneously, for the sake of this post consider something as simple as a blog with a post title and body.

I am trying to determine how to solve a problem whereby both users could load the same post for editing, and one of the users posts a change while the other user is working on their own change. Are there good solutions for this? Concurrently editing the same field isn’t my exact issue, moreso ensuring that lists, set dates, populated fields etc are all up-to-date at all times in case a view is left open for a significant amount of time. Should I use websockets to wait for changes, or is there an easier vue friendly way to do this?

I recently gave a talk on real-time time applications with Vue:
I hope it helps!

1 Like