Java sandbox for running multiple JVM platform languages -
i evaluating feasible of project build small web application provides repl programming environment similar of tryruby , codeacademy , have been looking @ possible solutions evaluate user submitted code safely, regarding server side solution have read jvm provides best sandboxing environment has built in security measures.
i read javatm scripting api , can used evaluate code on various script engines/ interpreters such rhino(javascript), jruby, jython , quercus(php). possible have single server running jvm evaluate user code in serval different languages? @ efficient? if not other options have?
would possible have single server running jvm evaluate user code in serval different languages?
yes feasible.
would @ efficient?
i'm not sure why efficiency particular concern. strikes me running small examples remote users not require efficiency. either way, take should efficient enough.
however, real concern here kind of service invites various kinds of abuse:
people may inclined try , break sandbox. , if haven't implemented (or if can exploit unpatched security flaw) may succeed, , rest of system.
people may inclined launch denial of service attacks. there various things security sandbox can't deal with; e.g. creating large data structures trigger gc overload , oomes, creating lots of threads, infinite loops.
or may of above accidentally.
if implement service 1 proposing, need strategy deal these things.
followup
regarding comment on efficiency, thought loading entire interpreter memory possibly single line of code, may not best approach take?
well normal way implement service on jvm-based language run multiple requests in same jvm instance. if did here wouldn't loading interpreter each time. you'd reinitializing it.
but either way, better off leaving efficiency problem later.
Comments
Post a Comment