Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the jwz threading algorithm #3355

Merged
merged 2 commits into from
Jul 8, 2020
Merged

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Jul 7, 2020

Extracted from #2125 to make the PR more reviewable.

This is basically an implementation of https://www.jwz.org/doc/threading.html but using a few tricks from https://tools.ietf.org/html/rfc5256 like the root container (as opposed to a list of root containers).

The algorithm here doesn't do anything yet, the integration will follow with #2125. All this patch is add the algorithm and a set of tests that ensure some basic cases work as expected. I would say we have to see if and how well it works and take a closer look once we have the real data. On paper it's a bit hard to reason about the correctness. But not crashing is already a good achievement I guess.

For those who really want to dig into it I left comments for the respective sections on https://www.jwz.org/doc/threading.html in each of the sections of the algorithm. On a high level there is one method that builds the threads and that splits the complexity in five private methods for each of the main steps.

Ref https://github.com/nextcloud/mail/projects/11#card-41435877

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦈 The shark approves

Copy link
Contributor

@GretaD GretaD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coool

@GretaD GretaD merged commit 4d78b95 into master Jul 8, 2020
@GretaD GretaD deleted the enhancement/jwt-threading branch July 8, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants