What are my choices for server side sandboxed scripting?

Posted by alfa64 on Programmers See other posts from Programmers or by alfa64
Published on 2012-03-04T04:31:57Z Indexed on 2012/04/03 23:40 UTC
Read the original article Hit count: 233

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.

© Programmers or respective owner

Related posts about JavaScript

Related posts about scripting