status-im / status-console-client

Status messaging console user interface
Mozilla Public License 2.0
10 stars 2 forks source link

Request part of messages that wasn't downloaded previously #42

Closed dshulyak closed 5 years ago

dshulyak commented 5 years ago

I added new table history_topics with one additional field synced. This field is set to To value of the options that were used to request messages. Effectively we are downloading all messages from whisper mail servers up to this timestamp (minus whisper tolerance interval ~20s). So when the next request is made we will request messages starting from this value.

In RequestAll method we are grouping all topics into two subgroups. Synced (synced timestamp is not zero) and Not synced. For each group we will send individual request. Second group will be filled with topics that were added but we never downloaded messages for them.

It doesn't use optimization that i added to status-go some time ago. Mainly because it will break current interfaces between adapters and protocol. I am not sure yet how to overcome those limitations without making protocol from a generic interface to a specific thing for our mail servers.

adambabik commented 5 years ago

This field is set to From value of the options that were used to request messages.

From or To?

dshulyak commented 5 years ago

From or To?

thanks, it should be To in that sentence. :)