aspose file tools
The moose likes Threads and Synchronization and the fly likes Synchronize in Clustered Environment Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Synchronize in Clustered Environment" Watch "Synchronize in Clustered Environment" New topic
Author

Synchronize in Clustered Environment

nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
Hi ,

Recently i came to encounter a situation where code works fine in single environment using synchornization block but now code has to move in clustered environment. I was wondering how can we prevent same thing in clustered environement. Any idea is appreciated.

Thanks
nitin
Yi Yang
Greenhorn

Joined: Aug 09, 2010
Posts: 2
Go for terracotta
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
What terracota can do in this scenario? I think "Terracota" is a company with lot of products under its belt.
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
I wrongly marked this thread as a resolve but actually it is not. So can admin help here to reopen this thread or should i start new?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16482
    
    2

I flagged it as "unresolved".
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 16681
    
  19

nitin pokhriyal wrote:What terracota can do in this scenario? I think "Terracota" is a company with lot of products under its belt.


The main Terracotta product does what you want -- don't know the name though (but it's not the ehcache product).

Basically, the product includes a class loader that will change synchronization calls to remote calls to a services that will do the synchronization. This allows multiple JVM to do synchronization together.

Obviously, you will pay a price -- as there is a big diff between a lock grab (in memory) and a network call and response to a service to do a lock grab. So, you definitely don't want to do this with every lock.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
Thanks for your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Synchronize in Clustered Environment
 
Similar Threads
problem in database fail-over in weblogic5.1 cluster env
Helper - Singleton or Static?
Clustering environment in WAS
Database fail over in weblogic5.1 cluster environment
Clustered JBoss Application Server nodes synchronization ?