Parallel processing
Relatively speaking, I'm new to java, although I feel I have a pretty good handle on the basics of the language now and have successfully created a few of my own programs.
I am now looking to take them a step further though, by incorporating in some features of parallel processing (the programs are computationally intensive - and no, there isn't a way around it).
I've been reading about JINI, RMI, CORBA and EJB as a means of distributing the workload. JINI seems promising, but most of the publications seem to be from around 1999-2000 with a noticeable gap afterwards.
I was hoping to get a sense of what people are using to implement parallel processing in Java these days. What is the up-to-date way of doing it, and are there any resources that you'd recommend (especially if they provide examples)? I've been going through the Sun tutorials, but what I invest my time in learning depends on what kinds of recommendations I'd get.
Thanks!
You might try searching for things like "grid computing" on Google.
Grid computing is the term used for projects like the SETI Screen Saver, which is what I think you may be looking for.
Visit http://www.theserverside.com/ there are articles on Grid Computing there and there was a recent announcement about a Java Grid Computing project being released.
You may have to register with TheServerSide however it registration is free and easy to do.
Hope this helps.
Hi
In order to clarify :
Threads at java level permits parallel processing inside a single JVM. You can do paralel processing in some sense, synchronize objects and so on, but not with cooperation of multiple host (only a JVM)
RMI is the middleware from java. JINI, EJB are based on RMI. With RMI you can invoke remote methods from outer machines, like CORBA, but with java flavor only. RMI is a nice tech. With RMI you can do a workload with N JVM but synchronization can be done only inside a JVM. Each remote method call is executed at remote JVM machine inside a Thread and all serialization/desereialization problem is solved by RMI.
I think, for a computational intensive job is well situed a multithreaded app running on a JVM at a good hard/soft.
Hope this helps
The system you use depend on how distributed/parallel you need the application to be.
1) Can you run the application on one machine in one JVM => use Threads. Note you cannot use more CPUs than you have. i.e. on a two CPU machine only 2 threads can actually be running at once.
2) Do you need the application to run accross multiple JVMs or multiple machines => Look at RMI.
3) Do you need to share data with non-java CORBA enabled applications => use CORBA.
4) Do you need to share data with small highly distributed devices => Use JINI.
5) Do you need to share data via a shared database => use EJB if the database performance is not an issue.