Ticket #79 (closed Tasks: fixed)

Opened 9 years ago

Last modified 6 years ago

Implement server polling

Reported by: ZeroCoolZ Owned by: octo
Priority: normal Milestone: 2.1
Component: LogicMail Version: 0.4
Keywords: Cc: adam.wos@…
Blocked By: #253 Blocking: #329

Description

Hi!

I know some people asked for some IMAP/Push feature and that you may be working on that.

But in the meantime, a feature that auto-refresh status every 10 or 15 minutes would be great! I would guess it's an easy feature to code but I don't know...

Thanks!

Change History

comment:1 Changed 8 years ago by octo

  • Milestone set to 2.0

Reassigning to 2.0, since it will be an option there (for those who don't want their BB talking to the server 24/7). Not simple or possible on 1.x.

comment:2 Changed 8 years ago by octo

  • Owner set to octo
  • Status changed from new to assigned
  • Type changed from Feature Requests to Tasks
  • Summary changed from Status auto-refresh to Implement server polling

This feature, when combined with IMAP IDLE, should make it possible to leave LogicMail running continuously in the background. It will take some research, and may function differently for IMAP and POP, but it needs to get done.

The biggest protocol difference is that with IMAP we can maintain open server connections for far longer. That is for two reasons: First, POP essentially locks the mailbox when you're connected. That means no one else can use it, and new messages do not magically appear. Second, IMAP has the IDLE feature which could allow indefinite connections in rare cases of continuous network coverage.

comment:3 Changed 8 years ago by octo

  • Priority changed from minor to normal

comment:4 Changed 7 years ago by octo

  • Milestone changed from 2.0 to 2.1

comment:5 Changed 7 years ago by octo

  • Blocked By 253 added

(In #253) The short-term workaround for this is to close and re-open the message or folder list screen that the error appeared on top of. This should re-try the failed operation. For a developer ramble about the real fix, feel free to read on...

Both IMAP and POP are susceptible to this issue, in different ways. With IMAP, the IDLE-checking behavior will cause the IOException (with "Bad socket id") to appear immediately. With POP, it won't appear until the user deliberately does something that requires I/O.

The fix for this issue could be quite involved, and will definitely be required before #79 can be implemented for 2.0.

The first step of working this issue will be inside the state machine that handles the network connections (AbstractMailConnectionHandler). It needs to specifically identify IOException errors that are due to runtime connection failures. It then needs to intelligently decide whether to retry (without flushing the request queue) or fail. It then needs to pass up additional information in the request failure notification, indicating what just happened.

The second step involves reviewing and modifying at least some of the request-handler code inside the object model, such that connection-failure errors are not always fatal to a complex request (such as a folder or message refresh).

comment:3 Changed 6 years ago by octorian

In [859]:

Timeout-based disconnect and polling for locked mail stores (POP) (refs #79)

comment:4 Changed 6 years ago by octorian

In [863]:

Added distinction between background-polling and user-triggered operations for status/error notifications, and made connection failures trigger the polling thread (refs #79)

comment:5 Changed 6 years ago by octo

  • Blocking 329 added

comment:6 Changed 6 years ago by adam.wos

  • Cc adam.wos@… added

comment:7 Changed 6 years ago by octo

  • Status changed from assigned to accepted

comment:8 Changed 6 years ago by octorian

In [964]:

Added experimental WiFi connection handover support (refs #79)

comment:9 Changed 6 years ago by octo

  • Status changed from accepted to closed
  • Resolution set to fixed

May still make fixes and improvements, but the basic feature is sufficiently implemented to close this ticket.

Note: See TracTickets for help on using tickets.