You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org> on 2010/06/03 22:17:55 UTC

[jira] Created: (IMAP-148) Refactor Store

Refactor Store
--------------

                 Key: IMAP-148
                 URL: https://issues.apache.org/jira/browse/IMAP-148
             Project: JAMES Imap
          Issue Type: Task
          Components: Mailbox
            Reporter: Tim-Christian Mundt


While the Store stuff is really great to quickly implement new storage back-ends for James, I think it needs some changes in the structure, some names etc in order to make it easier to understand. Moreover, even performance may be improved by not instantiating the same object over and over again. I'll post a suggestion soon...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (IMAP-148) Refactor Store

Posted by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim-Christian Mundt updated IMAP-148:
-------------------------------------

    Attachment: refactorStore1-imap.svn.patch
                MessageManagers.tar.gz

This is the patch, that is created by svn diff (e.g. RabbitVCS) and separately the MessageManagers which are not change correctly by the patch.

> Refactor Store
> --------------
>
>                 Key: IMAP-148
>                 URL: https://issues.apache.org/jira/browse/IMAP-148
>             Project: JAMES Imap
>          Issue Type: Task
>          Components: Mailbox
>            Reporter: Tim-Christian Mundt
>         Attachments: MessageManagers.tar.gz, refactorStore1-imap.patch, refactorStore1-imap.svn.patch, refactorStore1-server.svn.patch
>
>
> While the Store stuff is really great to quickly implement new storage back-ends for James, I think it needs some changes in the structure, some names etc in order to make it easier to understand. Moreover, even performance may be improved by not instantiating the same object over and over again. I'll post a suggestion soon...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (IMAP-148) Refactor Store

Posted by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/IMAP-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875297#action_12875297 ] 

Tim-Christian Mundt commented on IMAP-148:
------------------------------------------

To clarify, because it looks a little confusing:

refactorStore1-imap.svn.patch   -    "broken" patch for the imap component created with svn diff
MessageManagers.tar.gz   -    full *MessageManager classes
refactorStore1-server.svn.patch   -    the regular svn patch for the server component
refactorStore1-imap.patch   -    patch for the imap component created with the work-around of comparing exports

I'm really sorry for this mess.

> Refactor Store
> --------------
>
>                 Key: IMAP-148
>                 URL: https://issues.apache.org/jira/browse/IMAP-148
>             Project: JAMES Imap
>          Issue Type: Task
>          Components: Mailbox
>            Reporter: Tim-Christian Mundt
>         Attachments: MessageManagers.tar.gz, refactorStore1-imap.patch, refactorStore1-imap.svn.patch, refactorStore1-server.svn.patch
>
>
> While the Store stuff is really great to quickly implement new storage back-ends for James, I think it needs some changes in the structure, some names etc in order to make it easier to understand. Moreover, even performance may be improved by not instantiating the same object over and over again. I'll post a suggestion soon...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (IMAP-148) Refactor Store

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/IMAP-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875500#action_12875500 ] 

Norman Maurer commented on IMAP-148:
------------------------------------

I'm currently review the patches, and yes its really a mess for review =P

> Refactor Store
> --------------
>
>                 Key: IMAP-148
>                 URL: https://issues.apache.org/jira/browse/IMAP-148
>             Project: JAMES Imap
>          Issue Type: Task
>          Components: Mailbox
>            Reporter: Tim-Christian Mundt
>         Attachments: MessageManagers.tar.gz, refactorStore1-imap.patch, refactorStore1-imap.svn.patch, refactorStore1-server.svn.patch
>
>
> While the Store stuff is really great to quickly implement new storage back-ends for James, I think it needs some changes in the structure, some names etc in order to make it easier to understand. Moreover, even performance may be improved by not instantiating the same object over and over again. I'll post a suggestion soon...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (IMAP-148) Refactor Store

Posted by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim-Christian Mundt updated IMAP-148:
-------------------------------------

    Attachment: refactorStore1-server.svn.patch
                refactorStore1-imap.patch

On my way implementing Maildir I first tried to fully understand the Store* structure. During that process I got some ideas which I'm gonna explain here. Although the changes are in the IMAP library, the server component needs a little patch for the configuration and one test. Because I renamed and then changed some files, I couldn't create a working svn diff for the IMAP component, because it would create a diff between the original file and the changed one, although it needs to contain the whole content (as the file is basically new). If you know a way to do this properly, let me know and I'll upload it. The patch for the IMAP component is a diff between the exports of the current revision (948453) and my working copy generated with (diff -r -u -N). If you apply it you need to use the -N flag to remove emptied files. That's enough paperwork, now the real thing:

1) The main change is the introduction of a mapperFactory - injected via spring - for all three mappers (mailbox, message, subscription). The mappers are basically collections of (pseudo) static functions, there's no need to create them over and over again, so they are stored in sessions for reuse. This makes things like per-request-entity-managers much easier to implement (the respective MailboxSessionEntityManagerFactory is not needed any more).

2) A change that takes a lot of space in the patch but is not really an effort, is to put all streaming-related stuff in store.mail into a dedicated package. It was just too crowded.

3) I renamed ...mail.*Mailbox to ...mail.*MessageManager to match the model (*Mailbox and *Message), be consistent with the *MailboxManager and *SubscriptionManager and remove the irritating duplication of the name *Mailbox. (This renaming is the part which makes the patch complicated.)

4) The Store* stuff is still a little too much database focused. As a _little_ starting point I renamed StoreMessageManager.getMailboxRow() to StoreMessageManager.getMailboxEntity() - there is really more important stuff concerning this issue, that will come later...

5) Moved the model classes for the inmemory store to a .model package according to the other implementations.

6) A space here, a blank line there, whatever I stumbled upon, nothing worth mentioning.

I'd be glad to hear your opinion regarding my suggestions. I'm sure this patch cannot be used as is (if only because rename/move is best done as svn operations rather than a patch). As said, there are a few more changes I'd like to make, but this is already big enough (most of the size is due to moving files).

> Refactor Store
> --------------
>
>                 Key: IMAP-148
>                 URL: https://issues.apache.org/jira/browse/IMAP-148
>             Project: JAMES Imap
>          Issue Type: Task
>          Components: Mailbox
>            Reporter: Tim-Christian Mundt
>         Attachments: refactorStore1-imap.patch, refactorStore1-server.svn.patch
>
>
> While the Store stuff is really great to quickly implement new storage back-ends for James, I think it needs some changes in the structure, some names etc in order to make it easier to understand. Moreover, even performance may be improved by not instantiating the same object over and over again. I'll post a suggestion soon...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (IMAP-148) Refactor Store

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer resolved IMAP-148.
--------------------------------

         Assignee: Norman Maurer
    Fix Version/s: 0.1
       Resolution: Fixed

Thx for the patches.. Now in trunk ;)

> Refactor Store
> --------------
>
>                 Key: IMAP-148
>                 URL: https://issues.apache.org/jira/browse/IMAP-148
>             Project: JAMES Imap
>          Issue Type: Task
>          Components: Mailbox
>            Reporter: Tim-Christian Mundt
>            Assignee: Norman Maurer
>             Fix For: 0.1
>
>         Attachments: MessageManagers.tar.gz, refactorStore1-imap.patch, refactorStore1-imap.svn.patch, refactorStore1-server.svn.patch
>
>
> While the Store stuff is really great to quickly implement new storage back-ends for James, I think it needs some changes in the structure, some names etc in order to make it easier to understand. Moreover, even performance may be improved by not instantiating the same object over and over again. I'll post a suggestion soon...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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