P2P Chat w/Web Services

  • Thread starter Thread starter Pepe Le Peu
  • Start date Start date
P

Pepe Le Peu

I have been looking at Remoting and Web Services and I think I can do almost
anything I want with Web Services.

Here's my intellectual puzzle though:

Suppose I wanted to create a P2P application using just web services.

It would work something like this:

1) Assume a client (A) with a button and a text box.

2) Assume the client is aware of an identical client (B) on another machine.

3) The client has a web method, Update(string Str)

4) When the method is called it sets the label.Text = Str


So the idea is this is a very basic chat application.

Client A cals ClientB.Update()

and

Client B calls ClientA.Update()

The thing I need to figure out is how a c# windows form client can expose a
web method such as Update() ?

Is it possible ?

Is there an easy way to put a web services method into a regular client
app ?
 
You could use WSE 2.0 and its messaging features. You can have a
SoapReceiver instance in the client that listens to a TCP port. No IIS
required.

Check out http://msdn.microsoft.com/msdnmag/issues/03/09/XMLFiles/ .
(Unfortunately the samples were written for the WSE 2.0 Technology Preview.
There are some differences so the code will not compile as-is with WSE 2.0.
The concepts are still applicable though.)

Regards,
Sami

Excellent, Sammi. I just finished reading about WSE 2.0 and it sounds
exactly what I was trying ( not very well to describe ). This essay:

http://www.iona.com/hyplan/vinoski/pdfs/IEEE-Web_Services_Notifications.pdf

Basically says that, yes, Web Services are lacking in callbacks and
notifications that would allow me to create a chat service using them.
However, the WSE 2.0 spec, if implemented, would by including callbacks
and WS-Events

My feeling is that .NET Remoting is /too/ much for many applications. A
2-way web service, used in instances where latency can be measured in
centiseconds rather than milliseconds.
 
Back
Top