Results 1 to 16 of 16

Thread: Remoting and Proxy [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Resolved Remoting and Proxy [Resolved]

    Anyone ever played with the idea of redirecting remoting method calls to another server using a custom proxy? I'd really appreciate any thoughs, not to say relative URL pointers.
    Last edited by ntg; Jul 27th, 2005 at 02:57 AM.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  2. #2
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    When you say redirecting remoting method calls to another server, you mean apposed to the default remoting server or the local machine?

    I haven't found may good articles online for remoting, although it's been a while since I've looked. MS press's VB.NET cookbook has a very usefull chapter on it though. I'd be more than happy to answer any question you have as well.
    TPM

    Add yourself to the VBForums Frappr Map!!

  3. #3

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    Quote Originally Posted by -TPM-
    When you say redirecting remoting method calls to another server, you mean apposed to the default remoting server or the local machine?
    The idea is this: the remoting server starts up and clients begin calling Singleton objects. Instead of simply allowing the remoting infrastructure to control the object creation on the remoting server, I'd like to be able to force the object creation elsewhere.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  4. #4
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    Hmm ok, interesting idea. I'd probably have the initial server pass back the proxy config for the next server, then have the client connect directly to the second server. Make sence?
    TPM

    Add yourself to the VBForums Frappr Map!!

  5. #5

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    Guess not - the client would need to know about what happens and I have to avoid that.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  6. #6
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    Why would the client need to know? You'd do it all in code at runtime.
    The only other way I can think of knowing where it's being created would be to create another proxy at the server, but that wouldn't seem worth while..
    Why exactly do you want to set where the object is created? For load balancing?
    TPM

    Add yourself to the VBForums Frappr Map!!

  7. #7

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    I was refering to the client's need to know that it would be redirected so it would connect to the next server. I want to pass a method call to another system but I don't want to change client code. This will be configurable as new object instantiations or method calls may be redirected to other servers.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  8. #8
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    Ok so you mean you don't want to change the client application.

    Well I don't see a problem with creating a proxy from the main server to another remote object on another server and passing the request on. Of course it won't be as efficient as if you where directly connecting.
    TPM

    Add yourself to the VBForums Frappr Map!!

  9. #9

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    Quote Originally Posted by -TPM-
    Well I don't see a problem with creating a proxy from the main server to another remote object on another server and passing the request on
    That's what I'm searching for. How would you do that?
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  10. #10
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    You'd just setup a client connection on the server, it shouldn't be any different than any other connection...
    You can use the same method to pass events to clients.
    TPM

    Add yourself to the VBForums Frappr Map!!

  11. #11

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    I see what you mean. That would involve changing the code every time I needed to redirect an instantiation. As I said, this is going to be configurable so changing the server code is out.

    Perhaps I didn't explain properly what I have in mind. By "proxy" I'm refering to custom proxying an object with a class that inherits from RealProxy. Using a realproxy scheme, you can control object instantiation and method invokation but without writing/changing anything on the classes that are used to instantiate remoting objects.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  12. #12
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    Why would you need to change the server code?
    You just want to log the calls and pass them to other servers right?
    Maybe I'm just being dumb....
    TPM

    Add yourself to the VBForums Frappr Map!!

  13. #13

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    Maybe it's me . Can you explain how you'd proceed about passing the method calls to another server in more detail?
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  14. #14
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy

    ok well something like this:
    client calls method
    server1 logs call
    server1 looks in a config file, DB, array set by an admin app. for the server (say server2) that handles that method.
    server1 then sets up a connection and passes method call on to server2.
    TPM

    Add yourself to the VBForums Frappr Map!!

  15. #15

    Thread Starter
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Remoting and Proxy

    So you're saying that the response would pass to the client through the same sink it made the call...yeah, that would do it . I didn't get it at first, so it was me after all.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  16. #16
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Remoting and Proxy [Resolved]

    Maybe I just wasn't explaining it very well....

    Just in case you did get what I ment about the client I'll explain it the same way:

    client call's the logging method and passes an id for the method they need
    server1 looks up the server that handles it (same way) passes back the connection details
    client connects directly to server2 and calls the method

    I'd say if you can that this way would probably be a better aproach, depending on the number of different servers you have.
    TPM

    Add yourself to the VBForums Frappr Map!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width