[IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released)

Dino Viehland dinov at exchange.microsoft.com
Wed May 2 02:36:15 CEST 2007

I'm not actually the one working on the engine APIs so that's the reason I've tended to be vague.  I'll talk to the people doing it and let you know what I hear.

But the more info you can give us the better decision we'll be able to make.  For example what do you actually need to be isolated?  Do you need multiple system states so they get their own modules, console, etc...  do you need everything in sys isolated?  Do you need to guarantee the isolation even if .NET code is called (e.g. they could smuggled data via a static field).  If they do need some rather high level of isolation are app domains good enough?  Do you need to marshal a lot of data in/out?  Or is the effort to spin up and use app domains correctly?

Ultimately understanding the scenarios where this is being used might end up with us coming up with an even better solution.

The reasons why I ask that is because there are already many options on isolation depending upon what you're trying to do.  For example in the dynamic language support for ASP.NET we're executing the same code in multiple modules.  That gives each thread it's own set of globals but could allow sharing through system state.  It also means that the different requests get to share imported modules.  That's not much isolation but it could be enough for a lot of scenarios.  On the other extreme is full app domain isolation.

The more info we get here the more likely we'll capture the right result.  The real challenge here is it's actually impossible for us to offer full isolation w/o going to app domain isolation.  So anything we create will be less;  for example Michael Foord noted that the recursion enforcement is a global setting and it's hard to not make that global.  So we just need to figure out the right "less" that is both useful, maintainable, and understandable.

From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Tony Djordjevski [tony at v-sim.com]
Sent: Tuesday, May 01, 2007 2:45 PM
To: Discussion of IronPython
Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released)

Hi Dino,

You indicated that multiple engine support might be available in the
coming changes with the hosting APIs.  Is there any chance that we can
get a definitive answer one way or another?  And if so, will it be
available for 2.0 final?

Our product depends on IronPython being able to run multiple scripts in
isolation from each other.  At some point in the future, we'd also like
to be able to run scripts in parallel.  Now, I don't know if there is
another mechanism planned (or currently available) that would allow us
to do this, but I believe multiple engine instances would give us
these capabilities.

Thanks for the consideration,

Dino Viehland wrote:
> Yeah, incase the release notes aren't obvious there's a bunch of things that go with this: IronPython in the web browser (IE, FireFox, and Safari - yes, there's Mac support as well) via Silverlight.  There's an ASP.NET Futures which has also launched (linked from our home page on CodePlex), not to mention the DLR.
> Anyway, back to the hosting APIs :).  They don't support multiple instances now but we still have an additional round of changes to go through w/ the hosting APIs.  I'm not sure what will happen with that.  I'm also not sure that we actively prevent creating 2 instances but I know we've made some spots singleton's that used to not be - therefore if you tried it you'd likely run into issues.  Additionally the entire hosting API surface is also quite different.  I have a version that wraps the v2.0 APIs and exposes a v1.x-esque engine which I'll make available somewhere in a couple of days.
> ________________________________________
> From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Michael Foord [fuzzyman at voidspace.org.uk]
> Sent: Monday, April 30, 2007 4:58 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython 2.0 Alpha 1 Released
> Hello Dino,
> Wow - this seems like a big deal. :-)
> Does IronPython 2 still support hosting multiple IronPython engines ?
> Thanks
> Michael Foord
> http://www.voidspace.org.uk/ironpython/index.shtml

users mailing list
users at lists.ironpython.com

More information about the Ironpython-users mailing list