Beanshell is nice

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Beanshell is nice

I created a programming web application using beanshell on Google App Engine (GAE). Before using Beanshell, I tried a few other scripting engine but they are not supported by GAE. The Java 6 compiler is also not supported.

Luckily BeanShell works well. Also a few issues was identified and fixed (I have opened issues and committed the changes to the project).

Here's the app utilizing BeanShell purely for fun:

Test are appreciated. This may also help to identify BeanShell issues.

However I'm facing a big problem with BeanShell now. With calculation intensive tasks, and a restricted environment like GAE, the performance is not so good. First, the BeanShell itself is an interpreter which has much overhead, like implementing simple operation (e.g. ++) using function calls. Second the GAE checks all function calls for security. This is a multiplication... So are there any suggestion to improve (if any) the performance?

Another question is that is there anyway to restrict the user behavior in BeanShell? For example we know that we can write like things "this.interpreter" or access parent scope object. Any way I can forbid this in BeanShell?