It seems like plumbing API from one environment to another is one of the activity I do the most. And if you dare doing a joke about my Italian-ness and Super Mario... you will be pointed in the direction of the door.
Here I want to share a couple of findings.
Rhino is not bad at all
Yes, I said it. And who has worked in the past with me, knows how my opinion are hard to change. But they do sometimes, fortunately.
In facts, Rhino is not bad at all. I was initially very dubious of his quality (Java, ehm...) but I have to slap my own hand: it not only provides good execution time, but it also has a very, VERY nice API. And Neustar Webmetrics runs it's whole business on it!
What I liked the most? 2 things:
propyou just have to provide
getPropmethod. And if you want the property to be writable, provide a
setProp. The engine will take care of mapping
R-VALUESusages to the correct getter/setter.
- Two, the
NativeFunctionClass is neat and easy to use: extremely simple to allow the scripter to provide an event handler. Almost brain-dead-simple.
There are not many implementation of WebSockets out there yet (particularly for Java). I believe the main reason being the unstable and still-changing specs (take a look at this table).
So, KUDOS to Nathan!