[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Will this client/server to client/server thing work?

CheeseToast

8/20/2004 1:53:00 AM

I am going to attempt this anyway. but if someone can give me some helpful
input I would appreciate it. (Sorry this is so long)

I have a distributed processing project where several systems need to do
some intensive work assigned by a controlling system. Most of the engineers
on the project are UberGeek PhDs and not programmers, so I need to provide a
simple framework for them to work within.

Basically I would like to have both ends be both a client and a server. I
have been doing this in COM, and it is simple there to just pass an interface
pointer and connect two client/servers. Using events is just a little too
complicated for these propeller heads -- they will probably be changing
things constantly.

What I am thinking is this: Both client and server (singletons) create both
a client and server channel and use RegisterWellKnownServiceType to set up
their respective services. The client calls a Connect method on the server
and passes its URI as a parameter. Upon receiving this call, the server
turns around and also uses Activator.GetObject using the URI provided.

Will this work? If not, why not? If so, are there threading considerations
that have to be addressed? Is there a simpler way to do this?

I've already tried passing a client object reference directly to the server,
that doesn't seem to work very well, or maybe I did something wrong?

Thanks for any input.

Cheese


1 Answer

Sam Santiago

8/20/2004 6:19:00 AM

0

This sounds like it should work. You should be able to pass a
MarshalByRefObject to the server from the client. All objects passed this
way are CAOs though, so you must override the InitializeLifetimeService
method to return nothing for a lifetime lease.

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"CheeseToast" <CheeseToast@discussions.microsoft.com> wrote in message
news:793B9510-326F-4A18-87F2-CF7695CC14F6@microsoft.com...
> I am going to attempt this anyway. but if someone can give me some helpful
> input I would appreciate it. (Sorry this is so long)
>
> I have a distributed processing project where several systems need to do
> some intensive work assigned by a controlling system. Most of the
engineers
> on the project are UberGeek PhDs and not programmers, so I need to provide
a
> simple framework for them to work within.
>
> Basically I would like to have both ends be both a client and a server. I
> have been doing this in COM, and it is simple there to just pass an
interface
> pointer and connect two client/servers. Using events is just a little too
> complicated for these propeller heads -- they will probably be changing
> things constantly.
>
> What I am thinking is this: Both client and server (singletons) create
both
> a client and server channel and use RegisterWellKnownServiceType to set up
> their respective services. The client calls a Connect method on the server
> and passes its URI as a parameter. Upon receiving this call, the server
> turns around and also uses Activator.GetObject using the URI provided.
>
> Will this work? If not, why not? If so, are there threading
considerations
> that have to be addressed? Is there a simpler way to do this?
>
> I've already tried passing a client object reference directly to the
server,
> that doesn't seem to work very well, or maybe I did something wrong?
>
> Thanks for any input.
>
> Cheese
>
>