[ 
https://issues.apache.org/jira/browse/JAMES-3516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17350758#comment-17350758
 ] 

Benoit Tellier commented on JAMES-3516:
---------------------------------------

Hi Quan,

Designing the storage layer first seems like a mistake to me: we do not know 
yet exactly what we want there and might end up with the wrong structure.

To be fairly honnest that would be somehow the last thing I would do.

I would suggest:

 - Using the MessageResult::getThreadId property at the JMAP level - in 
Email/get + Email/import
 - Exposing AppendResult::getThreadId would allow also advertising the threadId 
as part of Email/set results
 
Then, I would encourage abstracting the ThreadIdGuessingAlgorithm behind an API 
that given a MailboxMessage returns its ThreadId. I would provide a naive 
implementation of it (threadId = messageId) and I would plug that up within the 
MessageManager (via injections).

Also, storing the threadId alongside the message would be a topic too. We would 
need to add a threadId collumn to the following tables: imapUidTable & 
messageIdTable (if not here we default to messageId).

Cheers,

Benoit

> [GSOC-2021] Implement Thread support for JMAP
> ---------------------------------------------
>
>                 Key: JAMES-3516
>                 URL: https://issues.apache.org/jira/browse/JAMES-3516
>             Project: James Server
>          Issue Type: New Feature
>          Components: elasticsearch, JMAP, mailbox
>            Reporter: Benoit Tellier
>            Assignee: Antoine Duprat
>            Priority: Major
>              Labels: gsoc, gsoc2021, mentor
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> h3. Why ?
> Mail user agents generally allow displaying emails grouped by conversations 
> (replies, forward, etc...).
> As part of JMAP RFC-8621 implementation, there is a dedicated concepts: 
> threads. We did implement JMAP Threads in a rather naive way: each email is a 
> thread of its own.
> This naive implementation is specification compliant but defeat the overall 
> purposes of threads.
> I propose myself to mentor the implementation of Threads as part of the James 
> JMAP implementation. 
> See: https://jmap.io/spec-mail.html#threads



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to