T
T
Toster1002015-11-01 11:33:11
Java
Toster100, 2015-11-01 11:33:11

RESTful service: how to implement fetching new messages?

I'm building a Java application (using Jersey) that is sort of like a social network. I do more for my own development than for any purpose.
The question is the following. I want to add the ability to fetch new messages since the user's last visit. The date of the last visit is stored in the profile, but the problem is this: I want new messages to remain in the new list until the user reads them. Those. you can't just give messages that have appeared since the last call.
It is clear that you can set up separate tables and store these messages there (or rather, links to them) until the user reads them, but I would like to store this state on the client.
It seems that the task is quite standard, but somehow I can’t think of anything, but I also haven’t figured out how to ask Google. M.b. have an idea.
I use AngularJS on the frontend

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2015-11-01
@leahch

Do you want to look at rabbitmq?
A queue is created for each client, from which it draws messages. Lots of options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question