What are my choices for server side sandboxed scripting?
- by alfa64
I'm building a public website where users share data and scripts to run over some data. The scripts are run serverside in some sort of sandbox without other interaction this cycle:
my Perl program reads from a database a User made script, adds the data to be processed into the script ( ie: a JSON document) then calls the interpreter, it returns the response( a JSON document or plain text), i save it to the database with my perl script.
The script should be able to have some access to built in functions added to the scripting language by myself, but nothing more.
So i've stumbled upon node.js as a javascript interpreter, and and hour or so ago with Google's V8(does v8 makes sense for this kind of thing?).
CoffeeScript also came to my mind, since it looks nice and it's still Javascript.
I think javascript is widespread enough and more "sandboxeable" since it doesn't have OS calls or anything remotely insecure ( i think ).
by the way, i'm writing the system on Perl and Php for the front end.
To improve the question:
I'm choosing Javascript because i think is secure and simple enough to implement with node.js, but what other alternatives are for achieving this kind of task?
Lua? Python? I just can't find information on how to run a sandboxed interpreter in a proper way.