Interview: Attila Szegedi Discusses Rhino
From the interview:
Ok, my use case was something a little bit maybe exotic. I really needed to have a system that is able to run an absurd amount of concurrent processes, I think in tens of thousands at once. And you obviously can't do that with Java threads because they don't scale to ten thousand threads at any one time. But what you can do here, you can use continuations. Continuations are something that is a really nice concept but it's not really as widely used in the industry as I would like it to be widely used, and at that time there was a version of Rhino that actually had continuations, which was the Apache Cocoon, which is a private fork of Rhino. And I actually started working with then-current developers of Rhino to add this continuation support in the mainline Rhino. Basically continuations are the objects that represent your stack trace, so you can just capture a snapshot of your stack trace, save it away and then restore it and run it later, and you don't have to keep a physical thread running for that particular stack trace at all times, you can just freeze it into a database and restore it afterwards and that really allows you to scale to really any number of concurrent so to say virtual threads running at any one time.
A few points from the interview:
- It has its own sandbox to impose security restrictions
- It comes bundled with Sun's Java 6 implementation
Sling is a fairly new project, and is still evolving quite a lot, so anyone who wants to have a look at it is very welcome.
Anatole Tresch Mar 03, 2015