Open fabienmoyon opened 3 years ago
On the left, there is 1 request, but it is fetching every mailboxes.
On the right there are at most 2 requests, but they are only fetching differences, and most of the time there will be no changes so it will be only 1 request.
When the backreferences will be implemented, the number of http requests might be reduced to 1 (instead of 2) merging the changes
and the get
.
Do we need to cut this in smaller issues? And how?
When the backreferences will be implemented, the number of http requests might be reduced to 1 (instead of 2) merging the changes and the get.
When the backreferences will be implemented, the number of http requests can be reduced to 1 (instead of 2) merging the changes and the get.
When the backreferences will be implemented, the number of http requests might be reduced to 1 (instead of 2) merging the changes and the get.
When the backreferences will be implemented, the number of http requests can be reduced to 1 (instead of 2) merging the changes and the get.
I was wondering if if we want to check for 2 new mailboxes (like 1 created and 1 updated) from the last state, that would need 3 methods (in 1 request) with backreferences, and 2 methods (in 2 requests) without backreferences. The verb can is more apropriate anyway, even if we chose to still use 2 requests.
But I think this discussion is out of scope.
I was wondering if if we want to check for 2 new mailboxes (like 1 created and 1 updated) from the last state, that would need 3 methods (in 1 request) with backreferences
That is what LTTRS JMAP client does, yes.
But I think this discussion is out of scope.
Agreed.
Do we need to cut this in smaller issues? And how?
(to be annoying) - this wasn't answered...
Do we need to cut this in smaller issues? And how?
I think this issue does not need to be cut into smaller issues.
I think this issue does not need to be cut into smaller issues.
Ok. Easy then. But yet you can not hand this task to a new comer as is...
Can we then add details on how to do it? Are there a succession of steps to follow?
Where is located today the mailbox refreshing logic?
Maybe which module/file would need to be changed?
I think this issue does not need to be cut into smaller issues.
Ok. Easy then. But yet you can not hand this task to a new comer as is...
Can we then add details on how to do it? Are there a succession of steps to follow?
Where is located today the mailbox refreshing logic?
Maybe which module/file would need to be changed?
I think this work has to be done on the task and not before. I do not know these informations yet.
While discussing during the daily with Rachid I figured out a way to cut this ticket in smaller parts:
Step 1:
a. Maintain the state along side the mailbox cache array
b. Upon resync perform a Mailbox/changes call
c. If the state is the same then do nothing: we are up to date
d. If the state mismatches then getAllMailboxes (no pity!!!) and reset the mailbox cache
This is simpler to implement because it is closer to today mailbox resync (Just always getAllMailboxes), but is beneficial (we getAllMailboxes only if something moves, not all the time), and allows decreasing the mailbox polling period to (say) 1 minute.
Then we can easily evolve into Step 2 a diff update of the cache:
d. If the state mismatches then :
This evolution of Step 1 is smarter as we always avoid reading all mailboxes after the initial loading...
I thus propose that @alagane and Rachid you work on the step 1 first.
Story
390 As a user I want to reduce the amount of data when getting mailboxes
Subtasks
402 Get all mailboxes only when changes on polling 403 Only get needed mailboxes on polling
Currently
Currently at the loading page, we get mailboxes and each 10min we get again mailboxes to to update them.
Expected
After the first get mailboxes keep the current behavior but this time we use Mailbox/changes to efficiently update the state of mailboxes cache to match the new state on the server.
SPEC
https://jmap.io/spec-core.html#changes