anonymous
2009-01-13 09:02:58 UTC
The application will run on n computers which will work together to calculate as many digits of pi as possible. I'm thinking one server computer which then breaks the problem apart and delegates subproblems out to other computers that are running the application. Since you can buy a terabyte HD for $100 I would like to fill up an entire terabyte with the digits of pi. So that's the basic idea. Do you have any advice or guidance?
Some things I am thinking about:
1. The algorithm. How to break the problem apart. e.g. 8/2 = 4. 4/2 to computerA 4/2 to computerB. How I am going to write it and send out the subproblems to the other computers?
2.Determining connection speed? Does the connection speed of any given computer create a bottleneck in the program? In other words, would it just be faster to do it on one computer than send it to other computers for processing? This could involve having to analyze each computers hardware to determine if it's worth sending the subproblem couldn't it?
3. I will use Java or C# but I wont be able to use primitive data types because they don't have any numbers that big. So what do I use?
4. Is Java a bad language to use for this? I know scientific programming languages are usually used but these are the only two languages that I know well enough to attempt this problem. The JVM would slow things down wouldn't it? That is, the same program with C# would be faster right? But then if I use Java I'll be able to run it on more computers.
5. I'm not sure how the numbers will be stored but since I will only be using 10 different characters it doesn't seem very effecient to store them in a format that allows for many more than 10 characters. Like, in ANSI each character will be stored as 1 byte but I would only need 4 bits (1010 = 10). How on earth would I go about doing this? Of course, I would also have to partition the hard drive to a multiple of 4 bits.
I think I can do this but it will be a huge challenge for me. I am not even in the planning phase right now. Just the dreaming phase. Any help at all would be appreciated.