Let's say I have two computers on a network. I want to write code in some language on machine A, send the code in an efficient way over a network, and run the code on machine B. It seems to me that this would be inherently slow and would run into a bundle of problems (not having required dependencies) but perhaps some work has already been done on this problem? Is there any known processes or systems that already do this?
$\begingroup$
$\endgroup$
8
-
$\begingroup$ Lots of work have been done by ... writers of viruses that execute remote code. $\endgroup$– John L.Commented Jan 12, 2019 at 18:23
-
1$\begingroup$ Cross-compiler if machine A and B differ, RPC if you have access to second machine. If this is about pure code, the standard way is to send all dependencies or package if the language supports it. Standard way is to do deployment (release), that is compiled or precompiled. In current form your goal is not clear to me. $\endgroup$– EvilCommented Jan 12, 2019 at 18:52
-
$\begingroup$ I don't really see how missing dependencies on B would be any bigger problem than missing dependencies on A. They're just one of the things you have to sort out when you want to compile and execute code. Just like you'd need to ensure that machine B had the executing-code-remotely software installed. $\endgroup$– David RicherbyCommented Jan 12, 2019 at 20:34
-
1$\begingroup$ Also, what are you looking for in an answer, here? Talking about known processes or systems makes this sound like more of a programming question (which would be off-topic) than a question about the underlying science. At the CS level, I'm not sure this is conceptually much different from RPC, except that you're sending the code across to the remote machine instead of invoking code that's already there. But code is just a fancy form of data, so RPC with the code as the function argument is a solution at the CS level. $\endgroup$– David RicherbyCommented Jan 13, 2019 at 9:57
-
1$\begingroup$ @Evil Oh, OK. It wasn't clear that that was what you meant by "have access." $\endgroup$– David RicherbyCommented Jan 13, 2019 at 15:03
|
Show 3 more comments
1 Answer
$\begingroup$
$\endgroup$
From memory Java applets and COM components could do this (But mostly discontinued due to security reasons) The approach was mostly based on a pull strategy. That is Machine B pulled code from Machine A and then executed in Machine B.
OS and application updates (e.g. Windows Update) also do this approach. They download the update from a different machine and execute locally.