Sharing server information across a cluster ?
Hello, we're currently setting up a Tomcat 5.5.9 cluster and we'd like to share server information between the different instances. Our approach so far has been to : *create a session *set it so that it never dies *share it across the instances using session replication *have the instances periodically post info about themselves to a bean in that session However, it turns out that that the session (sessions?) quickly become de-synchronized, so that the different containers don't see the same info in the shared bean. Looking through the mailing-list and the code, it would seem that this is the expected behaviour, as the DeltaManager will only replicate a session after a request has been completed (and thus wouldn't be expected to do anything if the session is accessed through some other mean). Is there any other way to accomplish what we're trying to do (basically, broadcasting info to the servers in the cluster) by piggy-backing on the clustering mechanism ? Better yet, would anyone have a piece of code that does something like that ? Thanks in advance, Laurent *** Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. Le Groupe France Telecom decline toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur. *** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not receiver of this message, please cancel it immediately and inform the sender. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sharing server information across a cluster ?
Jini? JavaSpaces? Put your data in a database? Maybe the ServletContext is already clustered in Tomcat 5.5.x? JMS? There is more than Tomcat out there. Ronald. On Tue Aug 09 15:59:58 CEST 2005 Tomcat Users List wrote: Hello, we're currently setting up a Tomcat 5.5.9 cluster and we'd like to share server information between the different instances. Our approach so far has been to : *create a session *set it so that it never dies *share it across the instances using session replication *have the instances periodically post info about themselves to a bean in that session However, it turns out that that the session (sessions?) quickly become de-synchronized, so that the different containers don't see the same info in the shared bean. Looking through the mailing-list and the code, it would seem that this is the expected behaviour, as the DeltaManager will only replicate a session after a request has been completed (and thus wouldn't be expected to do anything if the session is accessed through some other mean). Is there any other way to accomplish what we're trying to do (basically, broadcasting info to the servers in the cluster) by piggy-backing on the clustering mechanism ? Better yet, would anyone have a piece of code that does something like that ? Thanks in advance, Laurent *** Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. Le Groupe France Telecom decline toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur. *** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not receiver of this message, please cancel it immediately and inform the sender. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sharing server information across a cluster ?
> -Message d'origine- > De : Ronald Klop [mailto:[EMAIL PROTECTED] > Envoyé : mardi 9 août 2005 17:07 > À : Tomcat Users List > Objet : Re: Sharing server information across a cluster ? > > > Jini? JavaSpaces? Put your data in a database? Maybe the > ServletContext is already clustered in Tomcat 5.5.x? > > JMS? > > There is more than Tomcat out there. > > Ronald. > > Well, a database or Jini/Javaspaces are out of the question in our prod environment. The ServletContext doesn't seem to be clustered (tomcat doc : 'In the case of a web application marked "distributed" in its deployment descriptor, there will be one context instance for each virtual machine. In this situation, the context cannot be used as a location to share global information (because the information won't be truly global). Use an external resource like a database instead'). I'll look into JMS though. Laurent *** Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. Le Groupe France Telecom decline toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur. *** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not receiver of this message, please cancel it immediately and inform the sender. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sharing server information across a cluster ?
Use tomcat cluster api >= 5.5.10 to implement you own cluster messages. You can register your own Cluster Message Listener and with SimpleTcpCluster.send(ClusterMessage) you can send your message to all cluster nodes. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html Peter Ronald Klop schrieb: Jini? JavaSpaces? Put your data in a database? Maybe the ServletContext is already clustered in Tomcat 5.5.x? JMS? There is more than Tomcat out there. Ronald. On Tue Aug 09 15:59:58 CEST 2005 Tomcat Users List wrote: Hello, we're currently setting up a Tomcat 5.5.9 cluster and we'd like to share server information between the different instances. Our approach so far has been to : *create a session *set it so that it never dies *share it across the instances using session replication *have the instances periodically post info about themselves to a bean in that session However, it turns out that that the session (sessions?) quickly become de-synchronized, so that the different containers don't see the same info in the shared bean. Looking through the mailing-list and the code, it would seem that this is the expected behaviour, as the DeltaManager will only replicate a session after a request has been completed (and thus wouldn't be expected to do anything if the session is accessed through some other mean). Is there any other way to accomplish what we're trying to do (basically, broadcasting info to the servers in the cluster) by piggy-backing on the clustering mechanism ? Better yet, would anyone have a piece of code that does something like that ? Thanks in advance, Laurent *** Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. Le Groupe France Telecom decline toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur. *** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. France Telecom Group shall not be liable for the message if altered, changed or falsified. If you are not receiver of this message, please cancel it immediately and inform the sender. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]