RE: Synchronization in cluster

2004-10-01 Thread Ralph Einfeldt

With this usage scenario i would recommend sticky sessions.


 -Original Message-
 From: Igor [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 8:59 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Synchronization in cluster
 
 
 
 Users of my application can upload comma separeted files, 
 that are imported in database.
 This process can take 10-30 minutes, if file is large, so new 
 Thread is started with import process and user is redirected to 
 refreshing page, that displays status of import. Information about
 import process is stored in static variable (import thread and 
 status jsp can access this information).
 
 If it happens in one JVM, everething is ok. But what will be 
 in the case of load balancing?
 
 Thank you,
 Igor
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Synchronization in cluster

2004-10-01 Thread Filip Hanik \(lists\)
That doesn't solve the problem

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
Sent: Friday, October 01, 2004 4:26 AM
To: Tomcat Users List
Subject: RE: Synchronization in cluster



With this usage scenario i would recommend sticky sessions.


 -Original Message-
 From: Igor [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 8:59 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Synchronization in cluster
 
 
 
 Users of my application can upload comma separeted files, 
 that are imported in database.
 This process can take 10-30 minutes, if file is large, so new 
 Thread is started with import process and user is redirected to 
 refreshing page, that displays status of import. Information about
 import process is stored in static variable (import thread and 
 status jsp can access this information).
 
 If it happens in one JVM, everething is ok. But what will be 
 in the case of load balancing?
 
 Thank you,
 Igor
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Synchronization in cluster

2004-10-01 Thread Ralph Einfeldt

Why not ?

As I understood the static variable holds the information for the
current upload.

If the session is sticky the user will stay in the same jvm
and see the same static variable with each refresh.

I just see some downsides:
- if you want to assure that the downloads are serialised you have
  to implement a locking mechanism.
- you loose the central point to see all states at the same time.
- if the instance that performs the update dies, the user will 
  get to an instance that doesn't know anything about the download.

 -Original Message-
 From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 01, 2004 1:51 PM
 To: Tomcat Users List
 Subject: RE: Synchronization in cluster
 
 
 That doesn't solve the problem
 
 -Original Message-
 From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 01, 2004 4:26 AM
 To: Tomcat Users List
 Subject: RE: Synchronization in cluster
 
 
 
 With this usage scenario i would recommend sticky sessions.
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Synchronization in cluster

2004-10-01 Thread Filip Hanik - Dev
cause if you have two servers, two different sessions can perform upload in two 
different VMs.
He never said there is only one session doing upload, he was asking for a distributed 
lock

Filip

- Original Message - 
From: Ralph Einfeldt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, October 01, 2004 7:36 AM
Subject: RE: Synchronization in cluster



Why not ?

As I understood the static variable holds the information for the
current upload.

If the session is sticky the user will stay in the same jvm
and see the same static variable with each refresh.

I just see some downsides:
- if you want to assure that the downloads are serialised you have
  to implement a locking mechanism.
- you loose the central point to see all states at the same time.
- if the instance that performs the update dies, the user will 
  get to an instance that doesn't know anything about the download.

 -Original Message-
 From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 01, 2004 1:51 PM
 To: Tomcat Users List
 Subject: RE: Synchronization in cluster
 
 
 That doesn't solve the problem
 
 -Original Message-
 From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 01, 2004 4:26 AM
 To: Tomcat Users List
 Subject: RE: Synchronization in cluster
 
 
 
 With this usage scenario i would recommend sticky sessions.
 
 

-
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]



Re: Synchronization in cluster

2004-10-01 Thread Igor
You are right :-(

Igor

- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, October 01, 2004 5:31 PM
Subject: Re: Synchronization in cluster


 cause if you have two servers, two different sessions can perform upload
in two different VMs.
 He never said there is only one session doing upload, he was asking for a
distributed lock

 Filip

 - Original Message - 
 From: Ralph Einfeldt [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, October 01, 2004 7:36 AM
 Subject: RE: Synchronization in cluster



 Why not ?

 As I understood the static variable holds the information for the
 current upload.

 If the session is sticky the user will stay in the same jvm
 and see the same static variable with each refresh.

 I just see some downsides:
 - if you want to assure that the downloads are serialised you have
   to implement a locking mechanism.
 - you loose the central point to see all states at the same time.
 - if the instance that performs the update dies, the user will
   get to an instance that doesn't know anything about the download.

  -Original Message-
  From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 01, 2004 1:51 PM
  To: Tomcat Users List
  Subject: RE: Synchronization in cluster
 
 
  That doesn't solve the problem
 
  -Original Message-
  From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 01, 2004 4:26 AM
  To: Tomcat Users List
  Subject: RE: Synchronization in cluster
 
 
 
  With this usage scenario i would recommend sticky sessions.
 
 

 -
 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]



RE : Synchronization in cluster

2004-09-30 Thread LERBSCHER Jean-Pierre
Hi,
What are your needs? Why distributed singleton or distributed locking are so
important ?
Perhaps you can use Database to implement locking functionality and Jgroups
library to replicate state (or distributed singleton) across members of a
group (see www.jgroups.org).

-Message d'origine-
De : Igor [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 29 septembre 2004 20:42
À : [EMAIL PROTECTED]
Objet : Re: Synchronization in cluster

Hello!

 if you are talking about distributed locking, then the answer is no

Thank you for reply !

Our web application uses locking and Singleton pattern. I am making
researches - is there a possibility to move to cluster architecture or load
balancing.

Distributed locking is not possible.
Distiributed Singleton (static variables) seems not to be possible too.

So web applications, that use locking or Singleton cannot use cluster
architecture or load balancing.

Maybe there is indirect way of implementing distributed locking or
distributed Singleton? For example, code that needs synchronization may be
concentrated in main Tomcat, and other Tomcats will call this code via
http or SOAP?

Is there any way to move web application with locking and Singleton to
cluster or load balancing?

Thank you,
Igor

-
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]



Re: RE : Synchronization in cluster

2004-09-30 Thread Peter Lin
distributed locking of session data implies you need something like a
distributed cache. If that is the case, maybe you should look at
Coherence.

distributed locking is meant to solve a specific problem, so unless
you really need to synchronize distributed objects like a distributed
cache, I would avoid using it. some people tackle type of problem with
JMS.

unless you plan to extend TC5  session replication with these features
it's going to be  a while.

peter


On Thu, 30 Sep 2004 09:41:41 +0200, LERBSCHER Jean-Pierre
[EMAIL PROTECTED] wrote:
 Hi,
 What are your needs? Why distributed singleton or distributed locking are so
 important ?
 Perhaps you can use Database to implement locking functionality and Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Synchronization in cluster

2004-09-30 Thread Igor
Hello!

Thank you for answers! I will try to use JGroups

We have data, that is often need to be read. And it is rarely written.
It is implemented using Singleton pattern.

Synchronization is used in several parts of web application.
It is used mostly to access database

Thank you,
Igor

- Original Message - 
From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:41 AM
Subject: RE : Synchronization in cluster


Hi,
What are your needs? Why distributed singleton or distributed locking are so
important ?
Perhaps you can use Database to implement locking functionality and Jgroups
library to replicate state (or distributed singleton) across members of a
group (see www.jgroups.org).



Re: Synchronization in cluster

2004-09-30 Thread Filip Hanik - Dev
sounds like your system needs a little rethinking, if you have singleton access to 
your DB.
That is why the DBs are transactional, so that you can use connection pooling.

you can use JGroups, but you might run into serious performance problems, not because 
of JGroups, but because of the fact that you
want to lock several tomcats in a distributed lock when accessing the DB.

Filip


- Original Message -
From: Igor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:16 AM
Subject: Re: Synchronization in cluster


Hello!

Thank you for answers! I will try to use JGroups

We have data, that is often need to be read. And it is rarely written.
It is implemented using Singleton pattern.

Synchronization is used in several parts of web application.
It is used mostly to access database

Thank you,
Igor

- Original Message -
From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:41 AM
Subject: RE : Synchronization in cluster


Hi,
What are your needs? Why distributed singleton or distributed locking are so
important ?
Perhaps you can use Database to implement locking functionality and Jgroups
library to replicate state (or distributed singleton) across members of a
group (see www.jgroups.org).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Synchronization in cluster

2004-09-30 Thread Peter Lin
I would second Filip's comment. locking tomcat in this fashion is not
advised, unless you have solid experience with it.  It's not as easy
as one would think.

peter


On Thu, 30 Sep 2004 10:36:34 -0500, Filip Hanik - Dev
[EMAIL PROTECTED] wrote:
 sounds like your system needs a little rethinking, if you have singleton access to 
 your DB.
 That is why the DBs are transactional, so that you can use connection pooling.
 
 you can use JGroups, but you might run into serious performance problems, not 
 because of JGroups, but because of the fact that you
 want to lock several tomcats in a distributed lock when accessing the DB.
 
 Filip
 
 
 
 
 - Original Message -
 From: Igor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:16 AM
 Subject: Re: Synchronization in cluster
 
 Hello!
 
 Thank you for answers! I will try to use JGroups
 
 We have data, that is often need to be read. And it is rarely written.
 It is implemented using Singleton pattern.
 
 Synchronization is used in several parts of web application.
 It is used mostly to access database
 
 Thank you,
 Igor
 
 - Original Message -
 From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:41 AM
 Subject: RE : Synchronization in cluster
 
 Hi,
 What are your needs? Why distributed singleton or distributed locking are so
 important ?
 Perhaps you can use Database to implement locking functionality and Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).
 
 
 -
 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]



Re: Synchronization in cluster

2004-09-30 Thread Igor
Hello!

Thank you for advice ! I will think about restructure my application.

Users of my application can upload comma separeted files, that are imported
in database.
This process can take 10-30 minutes, if file is large, so new Thread is
started with import process and user is redirected to refreshing page, that
displays status of import. Information about import process is stored in
static variable (import thread and status jsp can access this information).

If it happens in one JVM, everething is ok. But what will be in the case of
load balancing?

Thank you,
Igor


- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 6:36 PM
Subject: Re: Synchronization in cluster


 sounds like your system needs a little rethinking, if you have singleton
access to your DB.
 That is why the DBs are transactional, so that you can use connection
pooling.

 you can use JGroups, but you might run into serious performance problems,
not because of JGroups, but because of the fact that you
 want to lock several tomcats in a distributed lock when accessing the DB.

 Filip


 - Original Message -
 From: Igor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:16 AM
 Subject: Re: Synchronization in cluster


 Hello!

 Thank you for answers! I will try to use JGroups

 We have data, that is often need to be read. And it is rarely written.
 It is implemented using Singleton pattern.

 Synchronization is used in several parts of web application.
 It is used mostly to access database

 Thank you,
 Igor

 - Original Message -
 From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:41 AM
 Subject: RE : Synchronization in cluster


 Hi,
 What are your needs? Why distributed singleton or distributed locking are
so
 important ?
 Perhaps you can use Database to implement locking functionality and
Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).




Re: Synchronization in cluster

2004-09-30 Thread Filip Hanik - Dev
If it happens in one JVM, everething is ok. But what will be in the case of
load balancing?

and that is why they pay you the big bucks...to figure this stuff out :)
remember, sometimes the solution is super simple, just not thought of.

Filip

- Original Message - 
From: Igor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 1:58 PM
Subject: Re: Synchronization in cluster


Hello!

Thank you for advice ! I will think about restructure my application.

Users of my application can upload comma separeted files, that are imported
in database.
This process can take 10-30 minutes, if file is large, so new Thread is
started with import process and user is redirected to refreshing page, that
displays status of import. Information about import process is stored in
static variable (import thread and status jsp can access this information).

If it happens in one JVM, everething is ok. But what will be in the case of
load balancing?

Thank you,
Igor


- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 6:36 PM
Subject: Re: Synchronization in cluster


 sounds like your system needs a little rethinking, if you have singleton
access to your DB.
 That is why the DBs are transactional, so that you can use connection
pooling.

 you can use JGroups, but you might run into serious performance problems,
not because of JGroups, but because of the fact that you
 want to lock several tomcats in a distributed lock when accessing the DB.

 Filip


 - Original Message -
 From: Igor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:16 AM
 Subject: Re: Synchronization in cluster


 Hello!

 Thank you for answers! I will try to use JGroups

 We have data, that is often need to be read. And it is rarely written.
 It is implemented using Singleton pattern.

 Synchronization is used in several parts of web application.
 It is used mostly to access database

 Thank you,
 Igor

 - Original Message -
 From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:41 AM
 Subject: RE : Synchronization in cluster


 Hi,
 What are your needs? Why distributed singleton or distributed locking are
so
 important ?
 Perhaps you can use Database to implement locking functionality and
Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Synchronization in cluster

2004-09-30 Thread Igor
Thank you :-)

Igor


- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:42 PM
Subject: Re: Synchronization in cluster


 If it happens in one JVM, everething is ok. But what will be in the case
of
 load balancing?

 and that is why they pay you the big bucks...to figure this stuff out :)
 remember, sometimes the solution is super simple, just not thought of.

 Filip


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Synchronization in cluster

2004-09-29 Thread Filip Hanik - Dev
if you are talking about distributed locking, then the answer is no

Filip

- Original Message - 
From: Igor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 11:43 PM
Subject: Synchronization in cluster


Hello!


We use synchronization on several JSP and classes:

synchronized ( ... )  {
...
}


But what about synchronization in cluster?
Tomcats in cluster will work in different JVM on different computers.
Is there a possibility of such synchronization in cluster?

Thank you,
Igor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Synchronization in cluster

2004-09-29 Thread Igor
Hello!

 if you are talking about distributed locking, then the answer is no

Thank you for reply !

Our web application uses locking and Singleton pattern. I am making researches - is 
there a possibility to move to cluster architecture or load balancing.

Distributed locking is not possible.
Distiributed Singleton (static variables) seems not to be possible too.

So web applications, that use locking or Singleton cannot use cluster architecture or 
load balancing.

Maybe there is indirect way of implementing distributed locking or distributed 
Singleton? For example, code that needs synchronization may be concentrated in main 
Tomcat, and other Tomcats will call this code via http or SOAP?

Is there any way to move web application with locking and Singleton to cluster or load 
balancing?

Thank you,
Igor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]