S
Sunny
Hi,
I have to implement client/server application. The client have to
instaniate an remoting object via http and pass some auth info. If the
auth is OK, the client should invoke a method (or sequence of methods)
which will do the actual work (prepare a binary file) and return it to
the client.
It seems (after all the reading) that in order to prevent passing the
auth info every method call, I have to implement Client activated
object, and to make the client independent, I have to use Interface
approach.
So now I have a couple of questions, for which I couldn't find clear
answers so far.
I'd appreciate every single answer on any of the questions.
The developing environment is VS.Net 2003, framework 1.1, language C#.
Server - 2K or 2003.
The questions are:
0. I have read somewhere (I can not find it again) that using the
Interface approach is not recommended. Is there something true? Why?
Alternatives?
1. Is it possible to use https (SSL) instead plain http and how to
implement it (I'd like to use a custom port also).
2. Are events possible thru http request? Or do I have to open
additional channel for events? I'd like server to notify client for the
actions taken so far.
3. When server creates a new instance for connected clients, are these
instances created in different threads (I.e. do the methods for every
client run independently).
4. Because a large amount of unmanaged resources will be created for
every client (approx. 300-500K), how do I control the lifecicle of the
object, so I can be sure that they are released if something happens
(like broken connection)?
5. Can I return a stream (or BinaryStream) property to the client, so I
can track the process of transferring the file from server to client? Or
any other suggestion how to track the transfer?
6. May I control somehow the number of connected clients (in order to
prevent overloading of the server)? I have found a good link in the
csharp newsgroup for semaphores, so I'm wondering if it will work for
that purpose, because it seems that if I go that way, I have to trigger
the semaphore in constructor and destructor(Dispose).
7. Do I have to include the Dispose method in the interface, or I have
to implement it only in the server implementation of the object?
8. Is there a way explicitly to invoke the end of life of the object
from the client?
Thanks a lot for reading all this.
Sunny
I have to implement client/server application. The client have to
instaniate an remoting object via http and pass some auth info. If the
auth is OK, the client should invoke a method (or sequence of methods)
which will do the actual work (prepare a binary file) and return it to
the client.
It seems (after all the reading) that in order to prevent passing the
auth info every method call, I have to implement Client activated
object, and to make the client independent, I have to use Interface
approach.
So now I have a couple of questions, for which I couldn't find clear
answers so far.
I'd appreciate every single answer on any of the questions.
The developing environment is VS.Net 2003, framework 1.1, language C#.
Server - 2K or 2003.
The questions are:
0. I have read somewhere (I can not find it again) that using the
Interface approach is not recommended. Is there something true? Why?
Alternatives?
1. Is it possible to use https (SSL) instead plain http and how to
implement it (I'd like to use a custom port also).
2. Are events possible thru http request? Or do I have to open
additional channel for events? I'd like server to notify client for the
actions taken so far.
3. When server creates a new instance for connected clients, are these
instances created in different threads (I.e. do the methods for every
client run independently).
4. Because a large amount of unmanaged resources will be created for
every client (approx. 300-500K), how do I control the lifecicle of the
object, so I can be sure that they are released if something happens
(like broken connection)?
5. Can I return a stream (or BinaryStream) property to the client, so I
can track the process of transferring the file from server to client? Or
any other suggestion how to track the transfer?
6. May I control somehow the number of connected clients (in order to
prevent overloading of the server)? I have found a good link in the
csharp newsgroup for semaphores, so I'm wondering if it will work for
that purpose, because it seems that if I go that way, I have to trigger
the semaphore in constructor and destructor(Dispose).
7. Do I have to include the Dispose method in the interface, or I have
to implement it only in the server implementation of the object?
8. Is there a way explicitly to invoke the end of life of the object
from the client?
Thanks a lot for reading all this.
Sunny