How can we do Parallel Programming in Java? Is there any special framework for that? How can we make the stuff work?
I will tell you guys what I need, think that I developed a web crawler and it crawls a lot of data from the internet. One crawling system will not make things work properly, so I need more systems working in parallel. If this is the case can I apply parallel computing? Can you guys give me an example?
Short answer with example library
If you are interested in parallel processing using Java, I would recommend you to give a try to Hazelcast Jet.
No more words needed from my side. Just check the website and learn by their examples. It give you pretty solid background and imagination about what does it meen to process data paralelly.
https://jet.hazelcast.org/
Java supports threads, thus you can have multi threaded Java application. I strongly recommend the Concurrent Programming in Java: Design Principles and Patterns book for that:
http://java.sun.com/docs/books/cp/
You might try Parallel Java 2 Library.
On the website Prof. Alan Kaminsky wrote:
In early 2013 when
PJ2
wasn't yet available (although an earlier version was), I triedJava Parallel Processing Framework
(JPPF). JPPF was okay but at first glancePJ2
looks interesting.Have you looked at this:
http://www.javacodegeeks.com/2013/02/java-7-forkjoin-framework-example.html?ModPagespeed=noscript
The Fork / Join Framework?
I am also trying to learn a bit about this.
You want to look at the Java Parallel Processing Framework (JPPF)
Is the Ateji PX parallel-for loop what you're looking for ? This will crawl all sites in parallel (notice the double bar next to the for keyword) :
If you need to compose the results of crawling, then you'll probably want to use a parallel comprehension, such as :
Further reading here : http://www.ateji.com/px/whitepapers/Ateji%20PX%20for%20Java%20v1.0.pdf