Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - solving problems larger than memory limit

Tags:

java

algorithm

I was recently pondering the following scenario: suppose you have a huge database and you want to perform some calculations while loading some of its part. It can be the case, that even small part of that database might not fit into Java's heap memory which is quite limited. How do people go about solving these obstacles? How does google perform analysis on Terabytes of data with limited memory space?

Thanks in advance for your replies.

like image 606
Bober02 Avatar asked Dec 20 '25 11:12

Bober02


1 Answers

The short answer is that you need to process the data in chunks that do fit into memory and then assemble the results of these chunked computes into a final answer (possibly in multiple stages). A common distributed paradigm for this is Map Reduce: see here for details on Google's original implementation, and Hadoop for an open-source implementation.

like image 166
Alex Wilson Avatar answered Dec 22 '25 02:12

Alex Wilson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!