Questions on .NET Remoting
-
Hi, I'm currently in the process of planning a Server-Client application and evaluating whether Remoting is a good way to go. I've already read some MSDN articles about remoting and also looked at some of the remoting articles here but there are still some questions: 1. Is the server side knowing which clients are currently connected? What I currently know is that connected clients can instaniate and fetch objects from the server. Calls on functions on those objects may either be run locally or on the serevr side. Is it possible to determine on the server side which clients currently hold those objects? I know I could define functions so that clients can explicitely notify their connection or disconnection but I think about lost connections or client side crahes where no explicit call is possible anymore. 2. Can the server send messages to the clients? In the examples I have investigated so far (mostly chat apps) the clients regulary poll for new data from the server. Is there a possibility that the server directly calls functions in all connected clients? 3. When a client makes a call in the server does this call create server side a new thread in which this call is processed? Is this the same for every call coming from the same client? Robert
-
Hi, I'm currently in the process of planning a Server-Client application and evaluating whether Remoting is a good way to go. I've already read some MSDN articles about remoting and also looked at some of the remoting articles here but there are still some questions: 1. Is the server side knowing which clients are currently connected? What I currently know is that connected clients can instaniate and fetch objects from the server. Calls on functions on those objects may either be run locally or on the serevr side. Is it possible to determine on the server side which clients currently hold those objects? I know I could define functions so that clients can explicitely notify their connection or disconnection but I think about lost connections or client side crahes where no explicit call is possible anymore. 2. Can the server send messages to the clients? In the examples I have investigated so far (mostly chat apps) the clients regulary poll for new data from the server. Is there a possibility that the server directly calls functions in all connected clients? 3. When a client makes a call in the server does this call create server side a new thread in which this call is processed? Is this the same for every call coming from the same client? Robert
Robert Rohde wrote:
2. Can the server send messages to the clients? In the examples I have investigated so far (mostly chat apps) the clients regulary poll for new data from the server. Is there a possibility that the server directly calls functions in all connected clients?
Yes, in fact, you can use the normal event mechanism to do that i.e server exposes an event and clients subscribe to it. There are a few gotchas though, like firewalls preventing incoming traffic. You would also have to make some config changes to allow clients to recieve calls (See TypeFilterLevel[^]).
Robert Rohde wrote:
3. When a client makes a call in the server does this call create server side a new thread in which this call is processed? Is this the same for every call coming from the same client?
Last I checked, remoting calls come in on a IOCP Thread. The .NET ThreadPool has a 1000 of them by default, in addition to the normal 25 threads per processor.
Regards Senthil [MVP - Visual C#] _____________________________ My Blog | My Articles | WinMacro
-
Hi, I'm currently in the process of planning a Server-Client application and evaluating whether Remoting is a good way to go. I've already read some MSDN articles about remoting and also looked at some of the remoting articles here but there are still some questions: 1. Is the server side knowing which clients are currently connected? What I currently know is that connected clients can instaniate and fetch objects from the server. Calls on functions on those objects may either be run locally or on the serevr side. Is it possible to determine on the server side which clients currently hold those objects? I know I could define functions so that clients can explicitely notify their connection or disconnection but I think about lost connections or client side crahes where no explicit call is possible anymore. 2. Can the server send messages to the clients? In the examples I have investigated so far (mostly chat apps) the clients regulary poll for new data from the server. Is there a possibility that the server directly calls functions in all connected clients? 3. When a client makes a call in the server does this call create server side a new thread in which this call is processed? Is this the same for every call coming from the same client? Robert
-
Hi, I'm currently in the process of planning a Server-Client application and evaluating whether Remoting is a good way to go. I've already read some MSDN articles about remoting and also looked at some of the remoting articles here but there are still some questions: 1. Is the server side knowing which clients are currently connected? What I currently know is that connected clients can instaniate and fetch objects from the server. Calls on functions on those objects may either be run locally or on the serevr side. Is it possible to determine on the server side which clients currently hold those objects? I know I could define functions so that clients can explicitely notify their connection or disconnection but I think about lost connections or client side crahes where no explicit call is possible anymore. 2. Can the server send messages to the clients? In the examples I have investigated so far (mostly chat apps) the clients regulary poll for new data from the server. Is there a possibility that the server directly calls functions in all connected clients? 3. When a client makes a call in the server does this call create server side a new thread in which this call is processed? Is this the same for every call coming from the same client? Robert
Hi! This article (Ingo Rammer about remoting best practices)[^] might be helpful.
Regards, mav -- Black holes are the places where God divided by 0...