1

Requirement : JAVA desktop mail client which could connect to existing gmail,y! mail a/c & will allow receive/send mails, support offline view of mails, plus with more features as & when it comes. i am using Java Mail Api's効果的

Underlying Mail Storage: I have decided to use HSQLDB with Hibernate. Email content can have attachments , HTML , so i decided to use LONGVARBINARY type to store the email Body & attachments.

Please let me know whether this approach is good & will it give me good performance when it comes to retrieval. Also give me some pointers on how to store java email objects in HSQLDB into LONGVARBINARY type & how to dereference it to get the actual data. ??

2)I am confused over this because , with Approach 1 , i will end up storing all mail contents somehow on my local disk to enable offline viewing. And imagine if i have 1GB of mails >

答えて

1

簡易メールクライアントを設計します(これはデータベースを使用してからあなたを排除するものではない)、ファイルベースのアプローチを使用している場合は、圧縮可能性があり、使用していないときに永続性のために使用するファイルを解凍します。シンプルなテキストを格納するので、圧縮は重要である可能性が高く、知的に選択した時間に圧縮を行うと速度の低下はそれほど悪くないでしょう。地獄、あなたもそれをオプションにすることができます。

私にとって最も重要なことは、ここでは検索時間です。ユーザーが何を検索できるようにしますか?検索が重要な場合は、おそらくデータベースを使用します。問題への私の最初のアプローチは、件名とヘッダー情報(日付、送信者、受信者など)を別々の列に格納し、電子メールオブジェクト全体をバイナリデータ列(おそらく圧縮)にシリアル化することです。これは、フルテキスト検索に時間がかかりますが、とにかくそれが期待されますね。

+0

いいです。ジョシュ。技術的には、DBに電子メールオブジェクトを格納する方法を教えてください。私が使用する必要があるすべての特定のテクノロジは、シンプルなクエリの検索とシリアル化されたバイナリデータ列を選択して正しいレコードを取得します。 –

+0

私は全文検索について心配していません。 –