Loading two separate instance of the same assembly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ZaX

    #1

    Loading two separate instance of the same assembly

    Good day folks,

    I'm working with a third-party transactionnal SDK, packaged into a few DLL.

    In a particular scenario, I need to have two sessions opened on the
    infrastructure I access thru the SDK, and I need programmatical control over
    the two sessions, so I can make changes in one session depending on the
    information I receive from the second session and so on.

    However, according to the third-party SDK support staff, a flaw in their
    architecture prevents me from running two sessions on a single instance of
    their assembly... So they suggested me to run two instances of my program
    instead. This works.

    But the code need to be extremely performant, so using System.Remoting to
    communicate between the two instances of an application would be the least
    acceptable option.

    So my idea was to try to link to two different instances of the assembly in
    some way... Any idea on how I would do that? Should I use system.reflecti on
    to instantiate my types?

    Other suggestions, comments?

    Thanks!

    ZaX


  • Tom Shelton

    #2
    Re: Loading two separate instance of the same assembly

    On 2005-07-01, ZaX <this.is.fake@e mail.com> wrote:[color=blue]
    > Good day folks,
    >
    > I'm working with a third-party transactionnal SDK, packaged into a few DLL.
    >
    > In a particular scenario, I need to have two sessions opened on the
    > infrastructure I access thru the SDK, and I need programmatical control over
    > the two sessions, so I can make changes in one session depending on the
    > information I receive from the second session and so on.
    >
    > However, according to the third-party SDK support staff, a flaw in their
    > architecture prevents me from running two sessions on a single instance of
    > their assembly... So they suggested me to run two instances of my program
    > instead. This works.
    >
    > But the code need to be extremely performant, so using System.Remoting to
    > communicate between the two instances of an application would be the least
    > acceptable option.
    >
    > So my idea was to try to link to two different instances of the assembly in
    > some way... Any idea on how I would do that? Should I use system.reflecti on
    > to instantiate my types?
    >
    > Other suggestions, comments?
    >
    > Thanks!
    >
    > ZaX[/color]

    ZaX...

    If I understand what your saying you want to load the same assembly
    twice in the same process. Well, you can do that using appdomains, but
    they are just going to use remoting to communicate across appdomain
    boundries. So...


    --
    Tom Shelton [MVP]

    Comment

    • ZaX

      #3
      Re: Loading two separate instance of the same assembly


      "Tom Shelton" <tshelton@YOUKN OWTHEDRILLcomca st.net> wrote in message
      news:OCC53isfFH A.3124@TK2MSFTN GP12.phx.gbl...[color=blue]
      > On 2005-07-01, ZaX <this.is.fake@e mail.com> wrote:[color=green]
      > > Good day folks,
      > >
      > > I'm working with a third-party transactionnal SDK, packaged into a few[/color][/color]
      DLL.[color=blue][color=green]
      > >
      > > In a particular scenario, I need to have two sessions opened on the
      > > infrastructure I access thru the SDK, and I need programmatical control[/color][/color]
      over[color=blue][color=green]
      > > the two sessions, so I can make changes in one session depending on the
      > > information I receive from the second session and so on.
      > >
      > > However, according to the third-party SDK support staff, a flaw in their
      > > architecture prevents me from running two sessions on a single instance[/color][/color]
      of[color=blue][color=green]
      > > their assembly... So they suggested me to run two instances of my[/color][/color]
      program[color=blue][color=green]
      > > instead. This works.
      > >
      > > But the code need to be extremely performant, so using System.Remoting[/color][/color]
      to[color=blue][color=green]
      > > communicate between the two instances of an application would be the[/color][/color]
      least[color=blue][color=green]
      > > acceptable option.
      > >
      > > So my idea was to try to link to two different instances of the assembly[/color][/color]
      in[color=blue][color=green]
      > > some way... Any idea on how I would do that? Should I use[/color][/color]
      system.reflecti on[color=blue][color=green]
      > > to instantiate my types?
      > >
      > > Other suggestions, comments?
      > >
      > > Thanks!
      > >
      > > ZaX[/color]
      >
      > ZaX...
      >
      > If I understand what your saying you want to load the same assembly
      > twice in the same process. Well, you can do that using appdomains, but
      > they are just going to use remoting to communicate across appdomain
      > boundries. So...
      >
      >
      > --
      > Tom Shelton [MVP][/color]

      Tom,

      Exactly what I'm trying to do...

      Thanks for your idea... Can you please provide me an idea on how to use
      AppDomains?

      I'll try that and I'll let you know if performance is acceptable.

      Thanks a lot!

      ZaX


      Comment

      Working...