2 Replies Latest reply on Mar 16, 2005 3:53 PM by mikezzz

    MailStore Integration

      Hi,

      I have just committed the first pass of the Mail Store integration.

      Eventually there should be:

      1. Always use store
      2. Never use store
      3. Use store when the message is > N kb


      We have 1 & 2 at the moment. By default it is switched off. To turn it on, configure the UseStore attribute of the MailBodyManager and configure the MailStore that you wish to use (Postgres is recommend).

      The mailstore at the moment is only benifical to the SMTP side of things. When retrieving mail via POP the whole message is still loaded into memory. From the plan I can see that mailbox implementation is changing so for M3 so I didn't much point in making major changes to the Message interface.

      Mailbox interaction is a bit hairy at the moment. I wasn't sure what the plan is with regards to data migration from M2 -> M3, therefore the store changes are designed to be compatiable with M2. To migrate an additional column BODYTYPE NUMBER(2) is required on the ENTITYMESSAGES table. This should be set to 0 for old messages. The MailBodyManager will take care wrapping old mails into SimpleMailBody objects. StoredMailBody objects make available a String handle which is stored in the body column. Going forward we should simply serialise the MailBody object and store it as a byte array. For now I have just implemented the simplest, least breaking change I could manage.

      Next I am going to modify the Hibernate Store to implement a paging mechanism.

      As always, questions, comments are welcome.

      Mike

        • 1. Re: MailStore Integration
          acoliver

          No data migration. Use POP, download your emails then install M3 :-). The type 3 should be a configurable size. For instance I might only want mails above 4k in the store and the rest cached. that'd give me a good compromise.

          • 2. Re: MailStore Integration

            I have modified the Entity Mailbox to hold a serialized copy of the mail body. I think there is enough of the store in place now that the new mailbox implementation could be integrated. Most of the changes outstanding for the store will be behind the Store interfaces (e.g. configurable minimum stored message size).