On May 7, 2010, at 3:34 , gary ng wrote:

> 
> 
> On Thu, May 6, 2010 at 10:49 AM, Heinz N. Gies <he...@licenser.net> wrote:
> If I may :) since I'm the sandbox guy.
> 
> 
> Is it possible to use the sandbox functionalities without the future/thread 
> part ?
Currently no, if it is really important and the following does not solve your 
problem I can add it so.
> 
> Basically, I am trying to create a chatty REPL(say HTTP POST based).
On a side note you should talk to Raynes about that ;).

> the thread would be created by the app container and the container already 
> has its own protection against endless loop style attack or other typical 
> restrictions for a web based application.
The use of an additional timeout would allow you to gracefully handle this 
situations, say returning a 'Sorry this code timed out' instead of a 500 which 
just tells the user 'meh something broke'

> I just want to ensure that each thread runs within its own namespace and 
> would not be able to get into the neighbour  namespace(or other 
> shared/referred namespaces like clojure.core) and do a .alterroot style 
> thing. But if possible, still be able to use most clojure features.
When I understand you right you want each sandbox to run in it's own namespace. 
This is a feature clj-sandbox already handles for you. All code is put in a own 
namespace - either one you define one or it takes a generated one. The sandbox 
compiler will use, after being created once, the same namespace for every code 
executed in it, the sandbox will use a one shot one unless given one that 
already exists. And as far as I can tell it is not possible to change the 
namespace with the current whitelists.

Regards,
Heinz

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to