3

I see an emerging trend in "cloud" computing to move work load to a third-party server and get charged pennies for amount of work done in this way. This could be anything from file hosting to user authentication. So I thought about this for a bit and thought, why can't these services be offered in a peer-to-peer way rather than the traditional client-server way.

So my idea is to create (to the best of my abilities to describe it) a black box virtual machine. Some program which hosts a web service on that computer which allows any other computer with this software to ask it to perform calculation of any kind, with the condition that the same can be asked from the host, with no financial "cost" of any kind.

Obviously, it would be a security risk without proper precautions, therefore the following must be observed:

  1. This software has the power to refuse execution requests or halt execution at any time.
  2. Parameters are passed which request certain access permissions, among which include but are not limited to:
    • Memory usage - How many megabytes are going to be at the program's disposal.
    • Disk usage - How much disk space can be consumed.
    • Namespace - Context for this program, which determines if it'll have access to disk space written by other programs with this namespace.
    • CPU usage - Maximum % of the CPU which can be used during idle moments and non-idle moments.
  3. "Disk" access is a black box with root "/" which is simulated, hiding actual disk contents. When a program is executed, a folder is created with its name under "/prog/" and is given free reign to read and write in any folder (including folder of other programs, perhaps with a parameter which requests it explicitly). Only other programs under the same namespace can see each other, but a program can be under multiple namespaces.
  4. Some sort of analysis framework which statistically determine if porting multi-threaded jobs to other black box virtual machines is convenient and if so, will automatically attempt it. However it won't ask any work from a computer with resource parameters higher than the resource parameters it itself provides other computers. Meaning, you only get what you give in short.
  5. If no limits are placed on certain types of resources, some sort of fail safe to ensure that the stability of the computer is not put at risk.
  6. Some sort of powerful module system which allows people to write programs to work with this system.
    • These modules would have a friendly way to install themselves from installations on peer computers or alternatively a way to download and install itself from an internet site.
    • These modules would have to follow the same guidelines as a program executed on this sytem.

My question is, a) what if anything, exists already which does this to some extent and 2) what language, platform, operating system would you advise to build this program?

I was leaning towards Java, since a virtual machine has complete access to how its programs are run, hence I would only have to rework how files are read/written to the file system, however nothing is written in stone. Any advice would be appreciated, even if it is advice which suggests this type of thing is not possible. Also, if anyone has a good name for this program, I'm all ears. :)

5
  • This would be getting very close to Beowulf cluster's and high performance distributed computing. Commented Apr 19, 2012 at 10:15
  • @Andrew_Finnell I understand there are diminishing returns, so it would have to be done well or otherwise it's a gimmic.
    – Neil
    Commented Apr 19, 2012 at 10:17
  • You might want to take a look at automated Bitcoin agents. Mike Hearn of Google has imagined something similar to what you're proposing: en.bitcoin.it/wiki/Agents
    – Gary
    Commented Apr 19, 2012 at 21:40
  • That is interesting. Thank you for the link, @GaryRowe
    – Neil
    Commented Apr 20, 2012 at 9:47
  • Are you trying to design a kind of Software_agent ? Or are you more interested in Grid_computing?
    – k3b
    Commented May 19, 2012 at 16:20

1 Answer 1

0

The behavior of letting run a program on some "available" machine already exists and is known as "queuing system" such as the sun grid engine.

The input is a set of jobs you want to perform, and the engine will distribute them among the machines currently available, given the resource requirements, the priorities, etc.

So, what you would do is a kindof distributed queing engine with fault-tolerance if I get it right. Why not. Dunno if it already exists or not.

5
  • Right, except such a queuing system requires full permissions in order to work, meaning it's either got an anti-virus on its back or it's used in very specific circumstances. I think limiting what a program could do could make it more widely used.
    – Neil
    Commented Apr 19, 2012 at 13:28
  • Well, usually it's used in a thrusted environment, like in a company for instance, using idle PCs for other computations. So it's fairly straightforward in such an environment. On the opposite, what you want has to be something which requires high monitoring/regulation. I mean, you have to check for viruses, that you don't run spam bots, that you run in a sandbox, distributed firewall settings, etc... In either case, I think your permission and security concerns are far greater.
    – dagnelies
    Commented Apr 19, 2012 at 14:53
  • Right, that's the context of my question. I need ideas on how to implement this well, since security is an issue. This evidently doesn't have these checks, so I'm asking if this can be adapted for that use or not.
    – Neil
    Commented Apr 19, 2012 at 15:07
  • Well, "ideas" won't get you very far. You'll need knowledge and a lot of work. I also think your question is far too broad and vague to be answered precisely. Have you an idea what the task involves at all? As for the java choice, IMHO I wouldn't choose it. Java cannot kill non-java-spawned processes natively and there is this bug bugs.sun.com/bugdatabase/view_bug.do?bug_id=4770092. Heck, do you even know how to track child spawned processes and how to check what they are doing?
    – dagnelies
    Commented Apr 19, 2012 at 16:40
  • Is this relevant at all to answering my question? The whole point of this was to find a direction to take. I suppose if I knew enough to know Java was an unwise choice, I probably would not have proposed it nor would I have posted this question in the first place. Though this sort of reasoning is not productive in the scope of finding a solution.
    – Neil
    Commented Apr 20, 2012 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.