Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to program under clustering  RSS feed

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I was asked to program under , clustering on Weblogic server.

Can anybody please let me know , from a Coding point of view , as a Developer how can i handle clustering issues of the server ??

In what level do i need to make chnages ??

Thanks

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody please help
 
Rajesh Nagaraju
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 issues (that I can think of) that a developer has to be wary of

1> Singletons are a problem - As the normal Singleton pattern ensures 1 object per JVM
2> Synchronization Access needs to be handeled carefully

The approach I can think of is,
1> Have a flag in the DB to ensure that there is only 1 instance of the Object created, and use serialization or something to ensure the same instance is available across the cluster... My answer is but cannot think of anytihng else
2> Same have a lock in the DB -- This is a better answer for this than the first case

Hope to see someone give better answers than my answers
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the usual (language-provided) synchronization methods only work when all participants are running in the same VM, and in a cluster, not only are different VMs required, but commonly different computers you may need to resort to external locking mechanisms if you need synchronization between the nodes of a cluster. In some cases, there may be a longer response time for some features, if the resource requested isn't on the same cluster node as the requester.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!