9
9
95506682021-04-21 14:02:55
Django
9550668, 2021-04-21 14:02:55

How to properly organize information about new events for the user? On the back/front?

Hello everybody!

There was a following question.
We are developing an application in which new messages from users and new events appear.
Where is the best place to store information about new events?

For example, is it better to register the last call from the user to the back on the back and consider all subsequent events as new and issue this information to the front via the API, or is it better to store information on the front (for example, all newly received messages are considered new)?

And where is the best place to store the user's search history? On the back or front?

Thanks in advance for the information.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ivanoff, 2021-04-21
@Thoth777

when requesting from the front, you can specify the datetime / id of the last message received by the front, and the back will return only newer messages. Accordingly, when receiving messages, the datetime / id of the last received must be stored at the front.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question