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 "Norman Maurer (JIRA)" <se...@james.apache.org> on 2007/02/22 15:17:08 UTC

[jira] Created: (MIME4J-6) Loading bodies on demand instead of using temporary files

Loading bodies on demand instead of using temporary files
---------------------------------------------------------

                 Key: MIME4J-6
                 URL: https://issues.apache.org/jira/browse/MIME4J-6
             Project: Mime4j
          Issue Type: Improvement
            Reporter: Norman Maurer


Make the DOM-like parser capable of loading bodies (at least large attachment)
on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

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

Stefano Bagnara updated MIME4J-6:
---------------------------------

    Fix Version/s: 0.4

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.4
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Robert Burrell Donkin (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin updated MIME4J-6:
---------------------------------------

    Fix Version/s:     (was: 0.6)
                   0.7

Need to review StorageProvider WRT semi-DOM use cases but this should wait until after the 0.6 release

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.7
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Niklas Therning (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528701 ] 

Niklas Therning commented on MIME4J-6:
--------------------------------------

If the mail is read from disk Mime4j could scan it first to find the boundaries of the body parts. It would then store the start and end file positions of each part. When a body part is requested it would read that particular portion of the message from the file using the start and end positions. The header of each part could probably be kept in memory.

One drawback compared to the temporary file solution would be that when using temporary files the decoded part data can be stored directly. The decoding is only done once. One could also use a hybrid solution: decoded parts are stored in temp files the first time they are decoded.

Temporary files would also still have to be used I guess if the message isn't read from disk (no underlying FileChannel/RandomAccessFile).

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.4
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Niklas Therning (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529337 ] 

Niklas Therning commented on MIME4J-6:
--------------------------------------

The idea is to make the Message class and friends be able to do this so the user won't have to. Message uses the streaming parser internally to build the message tree. IIRC the streaming parser does some look-ahead when searching for boundaries etc. This means that when your callback in your ContentHandler is called you cannot assume that the current file position in the underlying stream corresponds to the start of the body part. Mime4j doesn't currently provide a means to determine the actually start of a body part in the underlying stream. At least that has to be supported by Mime4j. When that has been done I don't think it would be very hard to extend Message and friends to be able to load parts as they are requested.

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.4
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Robert Burrell Donkin (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin updated MIME4J-6:
---------------------------------------

    Fix Version/s:     (was: 0.4)
                   0.5

I think that would be possible but would require some deep changes. Really need to add seek to architecture.  Leave till 0.5.

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.5
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616189#action_12616189 ] 

Stefano Bagnara commented on MIME4J-6:
--------------------------------------

In the JavaMail/Activation world they use the SharedInputStream to address a similar issue.

When the InputStream passed to the parser is a SharedInputStream then it is possibile to create child streams at any time by using a reference to the original stream and a pos/len parameter. This way it should be possible to keep reading stuff from the original source instead of creating temporary files.

When a SharedInputStream is passed Javamail does not need to clone the content somewhere else when you need dom access, otherwise Javamail simply copy the inputstream to an internal bytearray (and use it via the SharedInputStream interface).

Unfortunately we have nested decodings so most time to lazily load some nested content you will have to redecode most of the file.

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.5
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Jochen Wiedmann (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529142 ] 

Jochen Wiedmann commented on MIME4J-6:
--------------------------------------

There's no specific Mime4J support required for your proposal. It could simply be implemented by running Mime4J in streaming mode on the disk file while ignoring the attachments.


> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.4
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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: (MIME4J-6) Loading bodies on demand instead of using temporary files

Posted by "Jochen Wiedmann (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528621 ] 

Jochen Wiedmann commented on MIME4J-6:
--------------------------------------

I can't imagine how this should work. Suggestions?


> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.4
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
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