none
Is there a way to share memory in CLR similar to for Sing#/Singularity does it? RRS feed

  • Question

  • Continuing on my questions about add-ins and app domains, I want to develop a good plugin system for a web application. I want this plugin system to be able to interface things in the web application. Anyway, add-ins pass MarshalByRefObjects (correct?) and Serialize data to keep consistency, while string is passed via pointer, because the runtime garantuees that it is immutable.

    Singularity and the extension they use of C#/Spec# use the compiler to verify that pointers to shared memory may not be held by more than one process (SIP) at any given time. Hence, you have to copy data if you want a copy of it. Say I don't want a copy of it, but only want to pass it across boundaries, is there a way to do this similar to how the string class does it? The single pointer to it kind of garantuees that they won't corrupt shared memory.

    By extension, I want to be able to pass an HttpApplication class or use HttpContext.Current in an add-in. I guess I could use HttpContext.Current, but it would be even nicer if I could specify that "no I don't want shared concurrent access to it; you, plugin, go and do your thing, and call me back when you're done, so I can get ownership of the httpapplication again".
    Saturday, June 6, 2009 12:15 AM

All replies

  • Add-ins for a web application makes no sense at all.  There's no way that the web server administrator is going to let anybody within a 100 feet radius of the server room, giving them a chance to destabilize a well-working server with some kind of addin.  Addins are for client side apps.

    Hans Passant.
    Saturday, June 6, 2009 1:54 AM
    Moderator
  • Why do you have to have access to the server room? And if that's a metaphor for saying that it requires some sort of special security demand for using appdomains, could you please say that, I don't quite understand you.

    Why are add-ins only for client-side apps?
    Saturday, June 6, 2009 3:03 AM