|
-
Jul 25th, 2005, 01:11 PM
#1
Thread Starter
Frenzied Member
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.
-
Jul 25th, 2005, 01:27 PM
#2
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!!
-
Jul 25th, 2005, 01:48 PM
#3
Thread Starter
Frenzied Member
Re: Remoting and Proxy
 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.
-
Jul 25th, 2005, 01:51 PM
#4
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!!
-
Jul 25th, 2005, 01:54 PM
#5
Thread Starter
Frenzied Member
Re: Remoting and Proxy
Guess not - the client would need to know about what happens and I have to avoid that.
-
Jul 25th, 2005, 02:13 PM
#6
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!!
-
Jul 25th, 2005, 08:51 PM
#7
Thread Starter
Frenzied Member
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.
-
Jul 25th, 2005, 09:12 PM
#8
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!!
-
Jul 26th, 2005, 08:20 AM
#9
Thread Starter
Frenzied Member
Re: Remoting and Proxy
 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?
-
Jul 26th, 2005, 09:36 AM
#10
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!!
-
Jul 26th, 2005, 10:46 AM
#11
Thread Starter
Frenzied Member
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.
-
Jul 26th, 2005, 11:36 AM
#12
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!!
-
Jul 26th, 2005, 11:50 AM
#13
Thread Starter
Frenzied Member
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?
-
Jul 26th, 2005, 12:02 PM
#14
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!!
-
Jul 27th, 2005, 02:56 AM
#15
Thread Starter
Frenzied Member
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.
-
Jul 28th, 2005, 09:37 AM
#16
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|