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:
- This software has the power to refuse execution requests or halt execution at any time.
- 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.
- "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.
- 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.
- 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.
- 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. :)