MBOX-Line: From brong at fastmail.fm  Fri Jun 14 03:08:42 2013
To: imap-protocol@u.washington.edu
From: Bron Gondwana <brong@fastmail.fm>
Date: Fri Jun  8 12:34:51 2018
Subject: [Imap-protocol] Synchronizing multiple mailbox
In-Reply-To: <CALog5aJ4rz8J7UxY3FPNoxVVHe1cMex3QR8PPvfB2_A9FVudJw@mail.gmail.com>
References: <CALog5aJ4rz8J7UxY3FPNoxVVHe1cMex3QR8PPvfB2_A9FVudJw@mail.gmail.com>
Message-ID: <1371204522.10116.140661243848077.263DB050@webmail.messagingengine.com>

On Fri, Jun 14, 2013, at 06:50 PM, Jihyun Yu wrote:

Hi,

I'm implementing RCS message storage server (which is used for Joyn
messaging). RCS uses IMAP to access/synchronize chat logs from multiple
clients.

RCS specification specifies that new mailbox should be created for
every new conversation (1-1 chat, and group chat). It implies that a
user may have hundreds of mailboxes. IMAP has several extensions that
helps to reduce both number of commands and bandwidth while
synchronizing single mailbox (for example, RFC5162). However it seems
that there is no extension to help synchronizing multiple mailboxes at
once. That means that if a user has a 100 mailboxes, it will execute at
least 100 commands to server every time it lost connection between
server, which is quite frequent in mobile environment. Our goal is a
build a server which can handle million subscribers, and it seems
infeasible to build such server when each clients send 100 commands
every time it reconnects to server.

Is there any solutions or IMAP extensions that solves the problem?


I suspect you're looking for RFC5819 here - LIST RETURN STATUS.  You
can then use RFC5162 for each mailbox with a changed HIGHESTMODSEQ to
get the actual changes, so it become 1 command plus another 1 command
per mailbox which has changed since disconnection.

We cheat at FastMail - we've got a patched Cyrus server which uses a
single HIGHESTMODSEQ counter per user, as well as a single
MAXUIDVALIDITY.  Since we always bump the UIDVALIDITY of folders on
rename, create or delete (keeping a tombstone record), we only need to
keep track of two numbers - one for any changes to the folder listing,
and a second for any changes to any mailbox.  This allows us to
optimise our web interface significantly (and provide the same
advantages to any future clients that talk to our JSON API directly).

BUT - if you already control both the client and the server, you can do
whatever you want.  If you don't control the client, you probably can't
force it to use your fancy extensions anyway.

Good luck,
Bron.
-- 
  Bron Gondwana
  brong@fastmail.fm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20130614/76f6b235/attachment.html>
