[JBoss-dev] deploy.last is not very clean
Sacha Labourey wrote: User: slaboure Date: 03/06/05 06:26:17 Modified:src/main/org/jboss/deployment Tag: Branch_3_2 DeploymentSorter.java SubDeployerSupport.java Log: Add features that allows to have JAR (dir or file) deployment that ends in ".last" and that are deployed after everything in deploy This is necessary as some components do need to be deployed after everything (such as the farm service, so that every other component is already started before deployed what is in farm). consequently, as part of "all" we now have a folder named "deploy.last" that contains farm-service.xml Hi, it seems to me like a unclean hack. What if I will have more services that should be deployed last? Than I must set dependencies between them manualy. Also I am afraid of all/ directory looking in future like: all/deploy.beforefirst all/deploy.first all/deploy.afterfirst all/deploy.before all/deploy all/deploy.after all/deploy.beforelast all/deploy.last all/deploy.afterlast If there is such a dependency between components, it should be handled through more universal dependency or ordering mechanism. David -- http://www.sweb.cz/david.klimek
Re: [JBoss-dev] Partition merge and service state merge algorithm
Hi Sacha, thank you very much for your comments. Now I believe I have quite clean picture of partition merge issues. Maybe the conditions and limitations you mentioned should be added to documentation as they are not obvious and there can be a lot of people living, as I did before, in paradise, where all the mess with state merging, is handled by clustering framework. Greet's David Sacha Labourey wrote: Maybe that's one of the points. As I understand partion split each groups things that all nodes in other group are down, but they are not so there is not chance how to avoid concurrent access. Yes. But solutions may be found, such as using a central DB as a way to decide who is up/down. Anyway the same problem can occur in DistributedState service from JBoss Clustering framework, where no such limitaton is explicitly given by spec. Yes, this must be added for generic use. But let's finish our SFSB discussion first as it is a little bit different. Furthermore, even in the strange scenario you describe (concurrent access to a same SFSB), the merge would not update the remote nodes until a new SFSB operation occurs i.e. with SFSB, we replicate only when we modify a SFSB, not when a merge occurs. That's even worst. Suppose after partition merge group 1. has SFSB in state A and group 2. has SFSB in state B. We DON'T merge state for SFSB. First, as I belive, after partition merge you can get inconstent behavior. If you use SFSB replica from node in group 1. you get state A if you read SFSB replica from node in group 2. you get state B. Yes, but remember that the choice of the node is done in the CLIENT proxy which will ALWAYS use the same target as long as it is available. Second, when SFSB modify to state C occurs, one node rewrites state B and A on all other nodes. So group of nodes went through states A-C and group through states A-B-C with all consequences. Yes, the solution is in the fact that we don't merge the state and we always go to the same node. The only situation where something bad could occur is: - client A use node 1 - partition is split - client A continue using node 1 - node 1 cannot transmit its updates to node 2 because of the net partition - client can suddently no more reach node1 - it failover to node 2 but node 2 has the old state! If this is a problem for you, we could imagine to send piggy-back to the client proxy, the state version id. If, when we failover, we have a lower value, we could throw an exception. Maybe I could try to prepare some testcase demonstrating problem. Sorry if am I missing something, but I still strongly believe, that merging partions is very dangerous and can put cluster in Yes, which is why we don't merge. inconsistent state. It seems to me, that it is as complicated as to try merge the state of two computers (processors, memory, I/O devices) after they run separateted for a while. Yes, you are right, it is application specific, there is no generic way to take such a decision. Cheers, Sacha --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Partition merge and service state merge algorithm
Hi Sacha, 6. Partition merge occurs Ok. 7. SFBS state on nodes of second group is rewriten by state of first unfished group No. Here, you make the assumption that you can have CONCURRENT access to the SAME SFSB which is not allowed per spec. Maybe that's one of the points. As I understand partion split each groups things that all nodes in other group are down, but they are not so there is not chance how to avoid concurrent access. Anyway the same problem can occur in DistributedState service from JBoss Clustering framework, where no such limitaton is explicitly given by spec. Furthermore, even in the strange scenario you describe (concurrent access to a same SFSB), the merge would not update the remote nodes until a new SFSB operation occurs i.e. with SFSB, we replicate only when we modify a SFSB, not when a merge occurs. That's even worst. Suppose after partition merge group 1. has SFSB in state A and group 2. has SFSB in state B. First, as I belive, after partition merge you can get inconstent behavior. If you use SFSB replica from node in group 1. you get state A if you read SFSB replica from node in group 2. you get state B. Second, when SFSB modify to state C occurs, one node rewrites state B and A on all other nodes. So group of nodes went through states A-C and group through states A-B-C with all consequences. Maybe I could try to prepare some testcase demonstrating problem. Sorry if am I missing something, but I still strongly believe, that merging partions is very dangerous and can put cluster in inconsistent state. It seems to me, that it is as complicated as to try merge the state of two computers (processors, memory, I/O devices) after they run separateted for a while. Anyway, beside my complains, jboss clustering is really great, thank you for this great job. David 8. Cluster finishes computation again and changes SFBS state and produces output (assigns AGAIN money to account) So we get as I belive incorrect and dangerous cluster behavior. Do we agree now? Cheers, Sacha --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Partition merge and service state merge algorithm
Hello, I'm looking for correct algorithm, that merges states of some clustered service when parition merge occurs. Consider following scenario: 1. Running 8 node cluster 2. Added key name with value=beforesplit into state (state is replicated across all nodes of cluster) 3. Because of network failure cluster is splited into two groups (each with 4 nodes) 4. On first group key name is modified to value groupone 5. On second group key name is modified to value grouptwo 6. Network is recovered. Cluster partion merge occurs. After merge all nodes should have one value for key name but which value? (groupone, grouptwo, beforesplit) or exception should be raised? If we drop one value, what if already this value was used in some computation or output and simple drop will cause inconsistent behavior? Current JBoss clustering services doesn't throw light at it now. DistributedStateService doesn't handle partion merge at all and DistributedReplicaManager simply drops one of values when there are differend values for one key. Thank you for any thoughts David Klimek -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Partition merge and service state merge algorithm
Sacha Labourey wrote: You can subscribe to merge events if you want to implement the merging yourself i.e. if you use the clustering framework for your own mbeans. Hi, thank's for answering. Yes I'm using clustering framwork and membershipChangedDuringMerge, but I didn't find any correct alghorithm how to choose value for conflicting keys. (e.g. Timestamping) I hoped that I would find this idea in source code for DistributedStateService but as I understand its and JavaGroups behavior after partition merge, DistributedStateService can be in inconsistent state. (differend global state data on differend cluster nodes) Am I right? I'm afraid that this problem is unsolvable and there allways be situations in cluster, that after partition merge, cluster will be in inconsistent state and would produce wrong output. And only safe solution to this state conflict after partition merge is to core dump application and call admin :))). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Klimek Sent: jeudi, 27. mars 2003 12:36 To: [EMAIL PROTECTED] Subject: [JBoss-dev] Partition merge and service state merge algorithm Hello, I'm looking for correct algorithm, that merges states of some clustered service when parition merge occurs. Consider following scenario: 1. Running 8 node cluster 2. Added key name with value=beforesplit into state (state is replicated across all nodes of cluster) 3. Because of network failure cluster is splited into two groups (each with 4 nodes) 4. On first group key name is modified to value groupone 5. On second group key name is modified to value grouptwo 6. Network is recovered. Cluster partion merge occurs. After merge all nodes should have one value for key name but which value? (groupone, grouptwo, beforesplit) or exception should be raised? If we drop one value, what if already this value was used in some computation or output and simple drop will cause inconsistent behavior? Current JBoss clustering services doesn't throw light at it now. DistributedStateService doesn't handle partion merge at all and DistributedReplicaManager simply drops one of values when there are differend values for one key. Thank you for any thoughts David Klimek -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Partition merge and service state merge algorithm
I'm afraid that this problem is unsolvable and there allways be situations in cluster, that after partition merge, cluster will be in inconsistent state and would produce wrong output. No. Cases: - DRM: we refresh total view after merging Agree. - Http session: sticky sessions = the last state is always correct Agree. - SFSB: we always use the same node and the last state will be resent to other node at merge time Disagree. Consider following: 1. Cluster running banking application with SFSB's 2. Cluster is split into two groups 3. Each group continues concurently previous computation 4. Second group finishes computation and changes SFSB state and produces output (assigns money to account) 5. First group still doesn't finish its computation 6. Partition merge occurs 7. SFBS state on nodes of second group is rewriten by state of first unfished group 8. Cluster finishes computation again and changes SFBS state and produces output (assigns AGAIN money to account) So we get as I belive incorrect and dangerous cluster behavior. Greets David -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Re: [JBoss-user] time synchronization in cluster (ClusterTimer Service)
Hello, thank you all for answering my questions. To achieve something very close to global cluster clock, I'v decided to implement Clustered Timer service with the same interface as javax.management.timer.Timer. Features: - each added notification will be distributed on each node running Clustered Time service - listeners can register for notification on each node running Clustered Timer service - only Clustered master replica can notify listeners, if so all listener on all cluster nodes will be notified - Timer service ensures that Notifications Id are unique in cluster There is problem how this service should behave when partition merge occurs. It is possible that before merge both partitions has the same Notification Id for differend Notifications but some Notifications can be created before cluster was split into paritions and so they are identical. So simple merge or concat. of Notifications will result in either lost or duplicate Notifications. Have you got any idea how this can be clearly solved? Thank's David Tom Gardner wrote: There is no such thing as global time, only an approximation to it seen from one viewpoint. If you depend on their being a single global definition of time then your application will, sooner or later, have failures due to race conditions. Your preconditions can be beneficially relaxed by - specifying whether to the nearest h/s/ms/us/ns is sufficiently close - ensuring all the operations are independent - ensuring opreations' order is not significant. To clarify your problem, consider what might happen if you had two JVMs running on the same CPU. Hello, I need to be sure that each replica of my clustered application will do specific operation at the same real time (eg at 9:34am). I see two solutions: a) Keep computers clock synchronized Does jboss provide such service or is this OS/administrator issue? b) Cluster TickTock service Will run on each cluster node, one node will be master and in required time will call method tickTock() on all nodes Is this functionality now available in JBoss? c) Is there other solution? Thank's David -- http://www.sweb.cz/david.klimek --- This SF.net email is sponsored by: Tablet PC. Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Tablet PC. Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- http://www.sweb.cz/david.klimek --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] please notify before large scale changes to EJB land.
Bill Burke wrote: I really don't understand why you need to move stuff out of server/ anyways. This is mostly EJB anyways. Why not just rename the server/ module to EJB? I really don't see any gain in this cosmetic shit except wasting everybody's time trying to figure out where everything is again Orientation in CVS tree is realy quite hard, expecialy for new people. Something like README in each directory describing contens of directory and its subdirectories, current status of directory like development, stable, obsolete and of course maintainer would be great and very valuable. Greet's David --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] org.jboss.mx.interceptor: Does it work?
Adrian Brock wrote: Hi, This would work if there was a way to configure it. See the FIXME in ModelMBeanInvoker.preRegister Hi, thank you very much for help. My mistake. Actually I had programaticaly add LogInterceptor into stack but below ObjectReferenceInterceptor so method invoke was not called. bad code ... this.stack = new LogInterceptor(); // add LogInterceptor this.stack = new ObjectReferenceInterceptor(resource, infoSupport).insertLast(this.stack); /bad code David From: David Klimek [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [JBoss-dev] org.jboss.mx.interceptor: Does it work? Date: Sat, 01 Mar 2003 12:05:38 +0100 Hello, I have add logging to org.jboss.mx.interceptor.LogInterceptor but it seems that method invoke is never called. public Object invoke(Invocation invocation) { long begin = System.currentTimeMillis(); try { return getNext().invoke(invocation); } finally { logInvocation(invocation, begin, System.currentTimeMillis()); } } The interceptor stack with LogInterceptor is created possibly in ModelMBeanInvoker. Am I missing something or this part of jboss is just not finished. I have done these experiments on JBoss3.2 RC1. Does it work in HEAD? Thank's David -- http://www.sweb.cz/david.klimek --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development _ MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development -- http://www.sweb.cz/david.klimek --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] MBean discovery in cluster
Hello, i'm looking for efficient and simple way how to discover if mbean is up on some node in cluster. Have you got any idea? Thank's David -- http://www.sweb.cz/david.klimek --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] jboss-3.2.0RC1: farming problem
Hello, I have little problem with jboss-3.2.0RC1 and farming. I run all configuration build from sources. All services started corectly. But when I copy wars into farm directory nothing happens and nothing is deployed. workaround for this problem is to change attribute name=URLs ./farm /attribute to attribute name=URLs ./farm/ /attribute and then farming work correctly. I noticed this problem also in HEAD. Greets, David -- http://www.sweb.cz/david.klimek --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [HEAD] Does URLDeploymentScanner with DeploymentCache work?
Hello, I would like to implement my own custom MainDeployer. MyMainDeployer mbean will delagete calls to MainDeployer mbean. The question is what methods do I need provide in MyMainDeployer to make a fully functional MainDeployer. I thought it should be only the methods from Deployer interface (deploy, undeploy, isDeployed). But after looking into URLDeploymentScanner source code I'm not sure about it. First URLDeploymentScanner calls interface method deploy on Deployer --- deployer = (Deployer) MBeanProxy.create(Deployer.class, deployerName, server); ... deployer.deploy(du.url); --- And second URLDeploymentScanner calls method checkIncompleteDeployments which is implemented in MainDeployer mbean but not specifed in Deployer interface. --- getServer().invoke(getDeployer(), checkIncompleteDeployments, args, sig); --- So in my opinion URLDeploymentScanner depends on MainDeployer but it is possible in deployment descriptor specify another deployer (eg. DeploymentCache) and URLDeploymentScanner will not work. What are your experiences? Does replacing MainDeployer with DeploymentCache work and if yes, how it is possible? Thank you for any comments David Klimek -- http://www.sweb.cz/david.klimek --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development