Re:Ten Commandments of How to Write an IMAP Client (2006)
by ball_of_lint on Monday October 28, 2019 @11:51AM
(#21378022)
This sounds like exactly the situation where you would want to use a persistent tree. For a log(n) overhead, you can keep the ordering of all the messages in your mailbox at any given point in time. Then you don't need to inform clients unless a new message is added that they might want to reference. Otherwise you just keep track of the state that client is operating on and use the old state to let you apply their actions to the new state.
[ Parent
| on HN ]
Re:Ten Commandments of How to Write an IMAP Client (2006)
by Felz on Tuesday October 29, 2019 @04:03AM
(#21385000)
Yea, I think you basically do need one of these:
https://en.wikipedia.org/wiki/Order_statistic_tree
They're somewhat obscure though.