First off, I know very little about networking programming, like, I know how to use cURL from C and how to make simple socket connections.
Basically, I'm looking for a way to encapsulate a persistent command-line program, namely an interpreter, using pipes and send/receive that text via a web interface. It'd be a lot like this: MathCloud - Share Matlab / Octave scripts and data here and do your computing in the cloud. You'd see your past input/output and give new commands to a program running on the server. That site uses Java server pages and I don't want to use Java.
It sounds like it'd be a trivial task but I really have no idea where to start. It'd be dead simple if you just had to run one command in the interpreter and then exit, you could do that with PHP I believe. The trick here is keeping that interpreter open so that all your variables and stuff are persistent.
I'd like to do this with a scripting language if possible...like...I'm thinking I could call a Python script that would connect to an existing running process of the interpreter (can you encapsulate an already running program with pipes?), send the command and get the output, and send that back to the client. I'm also not really sure how that would come together on the client side, like I guess I could use JavaScript (to keep record of the inputs) and input forms to POST commands to the script.
I mostly want to figure this out on my own, but a point in the right direction would be great. Thanks in advance for reading this.