Re: Shared File System Master Slave with OCFS
On 5/19/07, Christopher G. Stach II [EMAIL PROTECTED] wrote: James Strachan wrote: Thanks for the heads up! :) I guess we could make the locking strategy pluggable we could have some implementation call the fcntl locking. e.g. maybe using Jtux http://www.basepath.com/aup/jtux/ Even though one could achieve this, I don't know what the benefit would be. Allow folks to run multiple broker instances on a shared file system so that if one broker fails, another takes over. http://activemq.apache.org/shared-file-system-master-slave.html It only shifts the responsibility down. At least the user would want a broker that is dependent on one or more brokers. Each of those brokers shouldn't be dependent on each other for locking, data, or anything else. I can appreciate that some people assume that shared data is available, but shared data is just as easily corrupted, locked, or unavailable. Essentially, when you find a single responsibility and divide it, it probably shouldn't converge somewhere down the line. This current pattern is most likely unusable for any HA situation. Agreed - I'd much prefer a share nothing HA strategy where folks can spin up and down brokers at any point in time and everything just works (tm) with messages replicated onto multiple physical stores and things auto-partitioning etc. However we're not there yet, so its a question of trade-offs. Some folks find it easier to rely on their shared file system / SAN to do the HA; others can use the share-nothing approach in ActiveMQ (Pure Master Slave)... http://activemq.apache.org/masterslave.html and live with the current limitations (no automatic fail-back of the old master when it is brought back online). Like many things in IT its a tradeoff. For now, today, the shared file system approach is a pretty reasonable approach; if you already have a reliable distributed file system (particularly if you have a SAN). -- James --- http://macstrac.blogspot.com/
Re: Shared File System Master Slave with OCFS
James Strachan wrote: Thanks for the heads up! :) I guess we could make the locking strategy pluggable we could have some implementation call the fcntl locking. e.g. maybe using Jtux http://www.basepath.com/aup/jtux/ Even though one could achieve this, I don't know what the benefit would be. It only shifts the responsibility down. At least the user would want a broker that is dependent on one or more brokers. Each of those brokers shouldn't be dependent on each other for locking, data, or anything else. I can appreciate that some people assume that shared data is available, but shared data is just as easily corrupted, locked, or unavailable. Essentially, when you find a single responsibility and divide it, it probably shouldn't converge somewhere down the line. This current pattern is most likely unusable for any HA situation. -- Christopher G. Stach II
Re: Shared File System Master Slave with OCFS
Christopher G. Stach II wrote: James Strachan wrote: Thanks for the heads up! :) I guess we could make the locking strategy pluggable we could have some implementation call the fcntl locking. e.g. maybe using Jtux http://www.basepath.com/aup/jtux/ Even though one could achieve this, I don't know what the benefit would be. It only shifts the responsibility down. At least the user would want a broker that is dependent on one or more brokers. Each of those brokers shouldn't be dependent on each other for locking, data, or anything else. I can appreciate that some people assume that shared data is available, but shared data is just as easily corrupted, locked, or unavailable. Essentially, when you find a single responsibility and divide it, it probably shouldn't converge somewhere down the line. This current pattern is most likely unusable for any HA situation. Wow. That sounded kind of snotty. :) I meant client that is dependent, too. -- Christopher G. Stach II
Re: Shared File System Master Slave with OCFS
On 5/18/07, James Strachan [EMAIL PROTECTED] wrote: On 5/17/07, felipera [EMAIL PROTECTED] wrote: Hi everyone, I am trying to setup two MQ Servers (4.1.1), sharing the same data directory (I tried Derby and Kaha), on top of OCFS, but the locking doesn't seem to be working. It works fine when both MQs are running on the same server (still using OCFS). I see the second MQ waiting for the lock to be released (Journal is locked... waiting 10 seconds for the journal to be unlocked.). That's why I am not sure if it's a OCFS issue. But when I run each MQ in separate boxes (still sharing the same data directory using OCFS) it doesn't work, they both start successfully. This is the OCFS you're talking about right? http://en.wikipedia.org/wiki/OCFS2 Actually OCFS2 seems more like a real distributed file system for general purpose use; the OCFS looks more specifically for using to host oracle data tables. Am wondering how good the file locking is on OCFS? Certainly its clear the mutex file locking from Java isn't supported on OCFS. -- James --- http://macstrac.blogspot.com/
Re: Shared File System Master Slave with OCFS
On 5/17/07, felipera [EMAIL PROTECTED] wrote: Hi everyone, I am trying to setup two MQ Servers (4.1.1), sharing the same data directory (I tried Derby and Kaha), on top of OCFS, but the locking doesn't seem to be working. It works fine when both MQs are running on the same server (still using OCFS). I see the second MQ waiting for the lock to be released (Journal is locked... waiting 10 seconds for the journal to be unlocked.). That's why I am not sure if it's a OCFS issue. But when I run each MQ in separate boxes (still sharing the same data directory using OCFS) it doesn't work, they both start successfully. This is the OCFS you're talking about right? http://en.wikipedia.org/wiki/OCFS2 I guess the file locking isn't working from Java. I wonder how to use file locking properly on OCFS. I am thinking about using a network of brokers, since I don't know what else to try. If you want clustering replicated message stores you could try one of the other Master/Slave implementations. http://activemq.apache.org/masterslave.html FWIW Networks of Brokers is for store and forward of messages only; messages are never replicated in multiple locations with networks of brokers. -- James --- http://macstrac.blogspot.com/
Re: Shared File System Master Slave with OCFS
James Strachan wrote: On 5/18/07, James Strachan [EMAIL PROTECTED] wrote: On 5/17/07, felipera [EMAIL PROTECTED] wrote: Hi everyone, I am trying to setup two MQ Servers (4.1.1), sharing the same data directory (I tried Derby and Kaha), on top of OCFS, but the locking doesn't seem to be working. It works fine when both MQs are running on the same server (still using OCFS). I see the second MQ waiting for the lock to be released (Journal is locked... waiting 10 seconds for the journal to be unlocked.). That's why I am not sure if it's a OCFS issue. But when I run each MQ in separate boxes (still sharing the same data directory using OCFS) it doesn't work, they both start successfully. This is the OCFS you're talking about right? http://en.wikipedia.org/wiki/OCFS2 Actually OCFS2 seems more like a real distributed file system for general purpose use; the OCFS looks more specifically for using to host oracle data tables. Am wondering how good the file locking is on OCFS? Certainly its clear the mutex file locking from Java isn't supported on OCFS. OCFS2 properly supports POSIX locking semantics with fcntl. lockf and flock aren't supported yet. If that's what the JVM uses under the covers, you're out of luck. If this is about OCFS and not OCFS2, I'm really sorry. :) -- Christopher G. Stach II
Re: Shared File System Master Slave with OCFS
On 5/18/07, Christopher G. Stach II [EMAIL PROTECTED] wrote: James Strachan wrote: On 5/18/07, James Strachan [EMAIL PROTECTED] wrote: On 5/17/07, felipera [EMAIL PROTECTED] wrote: Hi everyone, I am trying to setup two MQ Servers (4.1.1), sharing the same data directory (I tried Derby and Kaha), on top of OCFS, but the locking doesn't seem to be working. It works fine when both MQs are running on the same server (still using OCFS). I see the second MQ waiting for the lock to be released (Journal is locked... waiting 10 seconds for the journal to be unlocked.). That's why I am not sure if it's a OCFS issue. But when I run each MQ in separate boxes (still sharing the same data directory using OCFS) it doesn't work, they both start successfully. This is the OCFS you're talking about right? http://en.wikipedia.org/wiki/OCFS2 Actually OCFS2 seems more like a real distributed file system for general purpose use; the OCFS looks more specifically for using to host oracle data tables. Am wondering how good the file locking is on OCFS? Certainly its clear the mutex file locking from Java isn't supported on OCFS. OCFS2 properly supports POSIX locking semantics with fcntl. lockf and flock aren't supported yet. If that's what the JVM uses under the covers, you're out of luck. If this is about OCFS and not OCFS2, I'm really sorry. :) Thanks for the heads up! :) I guess we could make the locking strategy pluggable we could have some implementation call the fcntl locking. e.g. maybe using Jtux http://www.basepath.com/aup/jtux/ -- James --- http://macstrac.blogspot.com/
Shared File System Master Slave with OCFS
Hi everyone, I am trying to setup two MQ Servers (4.1.1), sharing the same data directory (I tried Derby and Kaha), on top of OCFS, but the locking doesn't seem to be working. It works fine when both MQs are running on the same server (still using OCFS). I see the second MQ waiting for the lock to be released (Journal is locked... waiting 10 seconds for the journal to be unlocked.). That's why I am not sure if it's a OCFS issue. But when I run each MQ in separate boxes (still sharing the same data directory using OCFS) it doesn't work, they both start successfully. I tried using jdbc: journaledJDBC journalLogFiles=5 useDatabaseLock=true dataDirectory=${activemq.base}/activemq-data/ And Kaha: kahaPersistenceAdapter dir=${activemq.base}/activemq-data maxDataFileLength=33554432/ I am thinking about using a network of brokers, since I don't know what else to try. I tried with ActiveMQ 4.2 without luck either. Could you someone help me please? Thank you in advance, Felipe -- View this message in context: http://www.nabble.com/Shared-File-System-Master-Slave-with-OCFS-tf3773841s2354.html#a10670741 Sent from the ActiveMQ - User mailing list archive at Nabble.com.