Grid Computing API

I want to write a distributed software system (a system in which you can run programs faster than on one computer) that can run different programs. (Since this is a school project, I will probably run programs such as Prime Finder and Pi Calculator)

My preference is that it should be written for C # with .NET, have good documentation, be easy to write (not new in C # with .NET, but I'm not a professional) and be able to write tasks for the grid easily and / or download programs to the network directly from .exe.

I looked a little at:

Which one is better for my business? Do you have experience with them?

ps. I know a lot of similar questions here, but they were either outdated or correct answers, or did not answer my question, and so I decided to ask again.

+4
source share
2 answers

I just contacted the founder of Utilify (Krishna Nadiminti), and while the active development stopped, he kindly released all the source code here on Bitbucket .

I think that it is worth continuing this project, because at present there is practically no comparable alternative (even commercial). I can start working on this, but do not wait for me :).

+2
source

A similar problem. I tried NGrid, Alchemi and MS PI.net. In the end, I decided to start my own open source project to watch it here: http://lucygrid.codeplex.com/ .

UPDATE:

See what the PI example looks like: The function passed to AsParallelGrid will be executed by the grid nodes. You can play with him by running the DEMO project.

/// <summary> /// Distributes simple const processing /// </summary> class PICalculation : AbstractDemo { public int Steps = 100000; public int ChunkSize = 50; public PICalculation() { } override public string Info() { return "Calculates PI over the grid."; } override public string Run(bool enableLocalProcessing) { double sum = 0.0; double step = 1.0 / (double)Steps; /* ORIGINAL VERSION object obj = new object(); Parallel.ForEach( Partitioner.Create(0, Steps), () => 0.0, (range, state, partial) => { for (long i = range.Item1; i < range.Item2; i++) { double x = (i - 0.5) * step; partial += 4.0 / (1.0 + x * x); } return partial; }, partial => { lock (obj) sum += partial; }); */ sum = Enumerable .Range(0, Steps) // Create bucket .GroupBy(s => s / 50) // Local variable initialization is not distributed over the grid .Select(i => new { Item1 = i.First(), Item2 = i.Last() + 1, // Inclusive Step = step }) .AsParallelGrid(data => { double partial = 0; for (var i = data.Item1; i != data.Item2 ; ++i) { double x = (i - 0.5) * data.Step; partial += (double)(4.0 / (1.0 + x * x)); } return partial; }, new GridSettings() { EnableLocalProcessing = enableLocalProcessing }) .Sum() * step; return sum.ToString(); } } 
0
source

Source: https://habr.com/ru/post/1443048/


All Articles