S
S
Sergey Gladilin2014-02-17 17:20:08
PHP
Sergey Gladilin, 2014-02-17 17:20:08

What logic of client-server interaction should be used?

There is a certain mobile application that takes news from the server.
The list of news is taken. And by clicking on a specific news, detailed information on the news is taken, which is then stored in the application cache (?).
The list will be picked up when you open the list of news in the application. Or by timeout (10 minutes).
And how do you know that some news has appeared/updated without getting the entire list? That is, how can you implement server-client feedback?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rsa97, 2014-02-17
@dio_bless

You pass the identifier or timestamp of the last received news to the server, it returns all the news that appeared after it.

M
Max, 2014-02-17
@AloneCoder

Requesting a list of updated news for a certain period will probably be the easiest

P
Petr Marochkin, 2014-02-17
@petun

I join the answers above, I can only add on my own, if the news is sorted by date, and not by ID (a situation when the news with the date is older than the existing records), you need to transfer exactly the timestamp or date.

M
miki131, 2014-02-17
@miki131

You can also use long polling requests

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question