This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes Programming for clusters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Programming for clusters" Watch "Programming for clusters" New topic
Author

Programming for clusters

Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
i read somewhere that the JVM has to be made aware of the cluster, that the JVM wont use all the resources of the cluster unless it is told so, and will just run on the host computer. how do we make the JVM aware of the cluster?


Ali
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
To the best of my knowlege the JVM does not have to ability to cluster by itself. If you are talking about running a clustered web app then the clustering is done through the web server and/or the container (ie. Apache/Tomcat). Again this is to the best of by knowlege, I don't have much experience setting up or running a clustered web service.
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
i meant a stand alone application, that i wrote for a single XP machine, how do i get it to realize the cluster and run on it?

Ali
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Do you mean grid computing, as in several computers networked together running the same (usually very processor intensive) program?
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
yes, PC's networked together. but the program would be initiated on the main host, which would then automatically use the other resources to run the program, i want to know how?

Ali
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
The only way I know of is to either use a grid framework such as mygrid or do the footwork yourself, create several clients that would get jobs from a server, run them, and return the results.

I'm pretty sure the JVM has no such ability built into it.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
Although Java was designed from the beginning to facillitate cooperation between computers, the standard library only has packages such as java.io java.rmi and java.net to manage simple communication. More complex issues of coordination are handled in specialty tools such as JINI.
See this JINI site for examples.
Personally I like the JavaSpaces concept for coordinating work by clusters of Java systems. See the "Distributed Java" forum here at the ranch.
Bill
[ June 30, 2005: Message edited by: William Brogden ]

Java Resources at www.wbrogden.com
Ali Gilani
Ranch Hand

Joined: Mar 01, 2002
Posts: 137
and what is the javaspaces concept?

Ali
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
See the post I just made in the "Distributed Java" forum.
Archies Gomes
Ranch Hand

Joined: Jun 19, 2005
Posts: 34
Hi Ali,
Are you talking something to do with the mobile agents ...if yes, then i think you have to go in for aglet framework...which allows stationery and mobile agents to have their work done on a user's behalf.....so that you can start a main process from your pc and rest of the work in handled by the mobile agents......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Programming for clusters
 
Similar Threads
cluster computing questions
Service Locator EJB Component - Clustering -oracle9iAS
Timer Task
Using OscacheProvider for second level cache
How to run code on server startup?