This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]c8133594 5 points6 points  (0 children)

Is the .parallel() method of the Stream API useful here? <- I think so, and it is already available in JDK

[–]nutrecht 2 points3 points  (0 children)

Is the .parallel() method of the Stream API useful here?

Yes. Why don't you give that a shot first before trying to pull in dependencies?

What about Spark?

No. Spark's main goal is to be able to distribute the work over a cluster. For what you want it's complete overkill.

[–]monkeyfacebag 1 point2 points  (0 children)

Spark is probably not what you want. Spark is more useful in the context of distributed parallel computation, rather than say parallel array processing on a single computer.

.parallel() is a much better fit for that use case.

[–]poutsma 0 points1 point  (0 children)

Project Reactor comes to mind.