You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Keith Chew <ke...@jungledrum.co.nz> on 2001/12/10 22:20:02 UTC

Clustering...

Hi

I posted this question in the developement mailing list, but I think it
should be in here. Sorry but here goes:

Will James work in a clustered environment, ie several instances of james
each on a different PC, all connected to a single database (mysql in my
case)?

Will simultaneous read/writes cause database corruption?

Regards
Keith


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE:

Posted by Keith Chew <ke...@jungledrum.co.nz>.
Ignore this. I have found the part I need to change in the config file.

-----Original Message-----
From: Keith Chew [mailto:keith.chew@jungledrum.co.nz]
Sent: Friday, 14 December 2001 9:33 a.m.
To: James Users List
Subject: <mailstore>


Hi

How do I configure james to so that:
- spoolRepository is of type "file"
- mailRepository is of type "db"

I have tried different configurations of <mailstore> in james-config.xml but
to no avail.

I need this to test James' clustering abilities, ie each instance spool
locally, but store user's mail in a central db.

Thanks
Keith


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Posted by Keith Chew <ke...@jungledrum.co.nz>.
Hi

How do I configure james to so that:
- spoolRepository is of type "file"
- mailRepository is of type "db"

I have tried different configurations of <mailstore> in james-config.xml but
to no avail.

I need this to test James' clustering abilities, ie each instance spool
locally, but store user's mail in a central db.

Thanks
Keith


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Clustering...

Posted by Keith Chew <ke...@jungledrum.co.nz>.
Hi Serge

In the config file, the there are 3 mailstore repositories: file, db, and
dbfile. I guess what I need is for the SPOOL to use file and MAIL to use db.
Is this correct? How do I set this up? At the end of the <mailstore> tag, I
can only see a <spoolRepository>, but no <mailRepository>:

  <!-- The High Level Storage block -->
  <mailstore>
      <repositories>
        <repository
            class="org.apache.james.mailrepository.AvalonMailRepository">
          <protocols>
            <protocol>file</protocol>
          </protocols>
          <types>
            <type>MAIL</type>
          </types>
        </repository>
        <repository
            class="org.apache.james.mailrepository.AvalonSpoolRepository">
          <protocols>
            <protocol>file</protocol>
          </protocols>
          <types>
            <type>SPOOL</type>
          </types>
        </repository>

...

      <spoolRepository>
        <repository destinationURL="file://var/mail/spool/"
                    type="SPOOL">
        </repository>
      </spoolRepository>

  </mailstore>

Can you help me out?

Thanks
Keith




-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Wednesday, 12 December 2001 3:40 a.m.
To: James Users List
Subject: Re: Clustering...


I'm not sure what 1 table has to do with this issue... you can stick the
messages from different repositories in the same table or in multiple
tables.

For inbox storage/retrieval (with a DB or shared filesystem), you might be
able to get away with clustering.  Certainly you could have multiple James
instances delivering messages to the same repository for inboxes.  My only
concern for POP3 retrieval is that in theory a single user could connect to
the same POP3 account simultaneous on different boxes.  The worst thing that
would happen though is that it would delete it via one session, resulting in
the other session getting disconnected when it tried to access that deleted
message.

I think it'd be easy enough to test, and if you do, please let us know how
it goes.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Keith Chew" <ke...@jungledrum.co.nz>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, December 10, 2001 4:43 PM
Subject: RE: Clustering...


> Hi Serge
>
> Ok, what I really want is a central place for the user's mail. Ie, a user
> can connect (POP3) to any instance of James and retrieve his/her mail. In
> terms of outgoing, each instance can handle them individually.
>
> Is this possible? I suppose all that is needed is for the LocalDelivery to
> use a single database to store the mail.
>
> Arg, I had a look at the DB structure and it's only working on 1 table, ie
> the message table. Hmm, I guess my requirements cannot be met. Darn.
>
> I'll analyse the code in greater detail to see if I can give more input.
> Thanks.
>
> Keith
>
>
>
> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: Tuesday, 11 December 2001 10:27 a.m.
> To: James Users List
> Subject: Re: Clustering...
>
>
> James does not support it.  The database will not get corrupted, but right
> now message locking happens in JVM memory, not in the database.  What this
> means is that if (James) instance A wants to process a message through the
> spool, it has no way to notify instance B, C, etc... that it is processing
> it.  This results in multiple runs of the same message, such as each
> instance delivering a copy of the message to the destination server.
>
> There were ideas circulated about adding support to move locking to the
> database (or otherwise abstracting it so you could cluster servers), but
no
> work has been done (and there were some unresolved issues too).
>
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Keith Chew" <ke...@jungledrum.co.nz>
> To: <ja...@jakarta.apache.org>
> Sent: Monday, December 10, 2001 4:20 PM
> Subject: Clustering...
>
>
> > Hi
> >
> > I posted this question in the developement mailing list, but I think it
> > should be in here. Sorry but here goes:
> >
> > Will James work in a clustered environment, ie several instances of
james
> > each on a different PC, all connected to a single database (mysql in my
> > case)?
> >
> > Will simultaneous read/writes cause database corruption?
> >
> > Regards
> > Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Clustering...

Posted by Serge Knystautas <se...@lokitech.com>.
I'm not sure what 1 table has to do with this issue... you can stick the
messages from different repositories in the same table or in multiple
tables.

For inbox storage/retrieval (with a DB or shared filesystem), you might be
able to get away with clustering.  Certainly you could have multiple James
instances delivering messages to the same repository for inboxes.  My only
concern for POP3 retrieval is that in theory a single user could connect to
the same POP3 account simultaneous on different boxes.  The worst thing that
would happen though is that it would delete it via one session, resulting in
the other session getting disconnected when it tried to access that deleted
message.

I think it'd be easy enough to test, and if you do, please let us know how
it goes.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Keith Chew" <ke...@jungledrum.co.nz>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, December 10, 2001 4:43 PM
Subject: RE: Clustering...


> Hi Serge
>
> Ok, what I really want is a central place for the user's mail. Ie, a user
> can connect (POP3) to any instance of James and retrieve his/her mail. In
> terms of outgoing, each instance can handle them individually.
>
> Is this possible? I suppose all that is needed is for the LocalDelivery to
> use a single database to store the mail.
>
> Arg, I had a look at the DB structure and it's only working on 1 table, ie
> the message table. Hmm, I guess my requirements cannot be met. Darn.
>
> I'll analyse the code in greater detail to see if I can give more input.
> Thanks.
>
> Keith
>
>
>
> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: Tuesday, 11 December 2001 10:27 a.m.
> To: James Users List
> Subject: Re: Clustering...
>
>
> James does not support it.  The database will not get corrupted, but right
> now message locking happens in JVM memory, not in the database.  What this
> means is that if (James) instance A wants to process a message through the
> spool, it has no way to notify instance B, C, etc... that it is processing
> it.  This results in multiple runs of the same message, such as each
> instance delivering a copy of the message to the destination server.
>
> There were ideas circulated about adding support to move locking to the
> database (or otherwise abstracting it so you could cluster servers), but
no
> work has been done (and there were some unresolved issues too).
>
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Keith Chew" <ke...@jungledrum.co.nz>
> To: <ja...@jakarta.apache.org>
> Sent: Monday, December 10, 2001 4:20 PM
> Subject: Clustering...
>
>
> > Hi
> >
> > I posted this question in the developement mailing list, but I think it
> > should be in here. Sorry but here goes:
> >
> > Will James work in a clustered environment, ie several instances of
james
> > each on a different PC, all connected to a single database (mysql in my
> > case)?
> >
> > Will simultaneous read/writes cause database corruption?
> >
> > Regards
> > Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Clustering...

Posted by Keith Chew <ke...@jungledrum.co.nz>.
Hi Serge

Ok, what I really want is a central place for the user's mail. Ie, a user
can connect (POP3) to any instance of James and retrieve his/her mail. In
terms of outgoing, each instance can handle them individually.

Is this possible? I suppose all that is needed is for the LocalDelivery to
use a single database to store the mail.

Arg, I had a look at the DB structure and it's only working on 1 table, ie
the message table. Hmm, I guess my requirements cannot be met. Darn.

I'll analyse the code in greater detail to see if I can give more input.
Thanks.

Keith



-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Tuesday, 11 December 2001 10:27 a.m.
To: James Users List
Subject: Re: Clustering...


James does not support it.  The database will not get corrupted, but right
now message locking happens in JVM memory, not in the database.  What this
means is that if (James) instance A wants to process a message through the
spool, it has no way to notify instance B, C, etc... that it is processing
it.  This results in multiple runs of the same message, such as each
instance delivering a copy of the message to the destination server.

There were ideas circulated about adding support to move locking to the
database (or otherwise abstracting it so you could cluster servers), but no
work has been done (and there were some unresolved issues too).

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Keith Chew" <ke...@jungledrum.co.nz>
To: <ja...@jakarta.apache.org>
Sent: Monday, December 10, 2001 4:20 PM
Subject: Clustering...


> Hi
>
> I posted this question in the developement mailing list, but I think it
> should be in here. Sorry but here goes:
>
> Will James work in a clustered environment, ie several instances of james
> each on a different PC, all connected to a single database (mysql in my
> case)?
>
> Will simultaneous read/writes cause database corruption?
>
> Regards
> Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Clustering...

Posted by Serge Knystautas <se...@lokitech.com>.
James does not support it.  The database will not get corrupted, but right
now message locking happens in JVM memory, not in the database.  What this
means is that if (James) instance A wants to process a message through the
spool, it has no way to notify instance B, C, etc... that it is processing
it.  This results in multiple runs of the same message, such as each
instance delivering a copy of the message to the destination server.

There were ideas circulated about adding support to move locking to the
database (or otherwise abstracting it so you could cluster servers), but no
work has been done (and there were some unresolved issues too).

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Keith Chew" <ke...@jungledrum.co.nz>
To: <ja...@jakarta.apache.org>
Sent: Monday, December 10, 2001 4:20 PM
Subject: Clustering...


> Hi
>
> I posted this question in the developement mailing list, but I think it
> should be in here. Sorry but here goes:
>
> Will James work in a clustered environment, ie several instances of james
> each on a different PC, all connected to a single database (mysql in my
> case)?
>
> Will simultaneous read/writes cause database corruption?
>
> Regards
> Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>