By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,245 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,245 IT Pros & Developers. It's quick & easy.

Web service with Push to client ?

P: n/a
Hi ,

I need to develop some feature of web service that can notify client -
"Push" operation - and fast
somebody know if it's possible , and how?
When I say "Push" I mean - pure push :) , not mechanism of client checking
for messages in interval...
thanks
Aug 7 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Not possible with web services. Web Services must be requested in order to
be invoked.

"semedao" <se*****@community.nospamwrote in message
news:Ou**************@TK2MSFTNGP04.phx.gbl...
Hi ,

I need to develop some feature of web service that can notify client -
"Push" operation - and fast
somebody know if it's possible , and how?
When I say "Push" I mean - pure push :) , not mechanism of client checking
for messages in interval...
thanks

Aug 7 '06 #2

P: n/a
Hi Semedao,

I agree with Scott, from standard webservice's perspective, there is no
server-side push mechanims or callback interface. And XML webservice is a
public service which expose its functionliaty through the service
contract(WSDL document) and let various clients to consume it. The
webservice itself should not have any sense of the client consumer or
platform. However, if we want the webservice to actively push/ping client
side, it will require our server-side service has sufficient information
about the client-side's programming interface and platform, this is
somewhat violating the webservice standard.

BTW, such server-side push(to multiple clients) is quite expense especially
for internet scenario. Is the webservice in your scenario work in intranet
or internet scenario? If convenient, you can provide us some further
background info so that we can look for some other solutions according to
your scenario.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 8 '06 #3

P: n/a
Hi Steven,
I need this behavior for P2P applicaiton that should be able to work also
behind NAT
if you see this article:
http://www.brynosaurus.com/pub/net/p2pnat/
We need that when client X try to connect client Y and both behind NAT ,
they need server that notify them to try connect each one , so , if I want
to implement the server as WS , I need also the option to notify client Y
that client X try to connect him , and that he also need to try connect to
client X.
If WS don't let me do it (I have the connection details of both clients) , I
will not be able to implement TCP hole punching via WS.
before I will decide to go to my own tcp server... there is still chance to
do something ? :)
thanks
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:8o**************@TK2MSFTNGXA01.phx.gbl...
Hi Semedao,

I agree with Scott, from standard webservice's perspective, there is no
server-side push mechanims or callback interface. And XML webservice is a
public service which expose its functionliaty through the service
contract(WSDL document) and let various clients to consume it. The
webservice itself should not have any sense of the client consumer or
platform. However, if we want the webservice to actively push/ping client
side, it will require our server-side service has sufficient information
about the client-side's programming interface and platform, this is
somewhat violating the webservice standard.

BTW, such server-side push(to multiple clients) is quite expense
especially
for internet scenario. Is the webservice in your scenario work in intranet
or internet scenario? If convenient, you can provide us some further
background info so that we can look for some other solutions according to
your scenario.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.

Aug 8 '06 #4

P: n/a
Hi Semedao,

WCF supports a P2P channel to expose services.
However, the client and the service both must use WCF, so I am not sure if
this is a good solution for you. If it is, you should take a look there.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

"semedao" <se*****@community.nospamwrote in message
news:Oz****************@TK2MSFTNGP02.phx.gbl...
Hi Steven,
I need this behavior for P2P applicaiton that should be able to work also
behind NAT
if you see this article:
http://www.brynosaurus.com/pub/net/p2pnat/
We need that when client X try to connect client Y and both behind NAT ,
they need server that notify them to try connect each one , so , if I want
to implement the server as WS , I need also the option to notify client Y
that client X try to connect him , and that he also need to try connect to
client X.
If WS don't let me do it (I have the connection details of both clients) ,
I will not be able to implement TCP hole punching via WS.
before I will decide to go to my own tcp server... there is still chance
to do something ? :)
thanks
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:8o**************@TK2MSFTNGXA01.phx.gbl...
>Hi Semedao,

I agree with Scott, from standard webservice's perspective, there is no
server-side push mechanims or callback interface. And XML webservice is a
public service which expose its functionliaty through the service
contract(WSDL document) and let various clients to consume it. The
webservice itself should not have any sense of the client consumer or
platform. However, if we want the webservice to actively push/ping
client
side, it will require our server-side service has sufficient information
about the client-side's programming interface and platform, this is
somewhat violating the webservice standard.

BTW, such server-side push(to multiple clients) is quite expense
especially
for internet scenario. Is the webservice in your scenario work in
intranet
or internet scenario? If convenient, you can provide us some further
background info so that we can look for some other solutions according to
your scenario.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.


Aug 8 '06 #5

P: n/a
Thanks for Pablo's informative inputs.

Hi Semedao,

If you also keep an eye on the WCF, you'll find it has provided many cool
communication features for distributed application. However, WCF is not a
purely and dedicated for webservice.

From your last message, you've got that in your scenario, there are clients
(also service machine?) that are locating in different network environment
and are not visible to each other directly due to the NAT. As far as I
know, there is no directly P2P support on XML webservice standard or
ASP.NET webservice implementation. However, the WSE (Microsoft webservcie
enhancement , latest version 3.0---for .net framework 2.0) support
webservice message routering. Normally, the webservice client/consumer
will establish a direct connection to the webservice server and such
connection is usally based on network protocol access point (ip address +
tcp port when using http or tcp ....), and this make the service client and
server endpoint protocol dependent and coupled.

the "Message Routering" in WSE just help abstract the webservice client and
server's actual network protocol access point(address). The client do not
need to directly access the ultimate service server, but can setup a
intermediate router (relay) which can get directly network communication
with the ultimate server. Thus, the client/consumer just need to send SOAP
message to the rounter machine (intermediate station) and let the rounter
forward the messate to the actual endpoint service. Surely, you need to
setup the rounter in your environment and configure the client/ rounter/
server correctly so that they can cooperate well.

Here are some reference about the service rounter through WSE 3.0:

#Routing SOAP Messages with WSE
http://msdn.microsoft.com/library/de...us/wse3.0/html
/b41230fb-d0e1-48b1-88c0-3daf7a40c9e8.asp

#Implementing Perimeter Service Router in WSE 3.0
http://msdn.microsoft.com/library/en...pPerimServRout
_WSE30.asp?frame=true

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 8 '06 #6

P: n/a
Pablo and Steven - thanks for your answers
I am not familiar with WSE and WCF , and I saw that there is large material
to read about both ...
let me try to avoid "digger" inside those issues and then see that it's not
satisfy my app needs.
I need that:
1. keep all connection and traffic secure from others outside the client and
server.
2. be able to make "push" to every client that is connected behind NAT - for
my opinion it's mean to keep alive the connection with him , because maybe
it's a coast performance issue , to keep alive so much sockets at the server
, I want to keep only those who are behind NAT.
3. to be able to transfer large size data blocks from and to those servers ,
for this issue I want that the security , XML and all WS points in the
middle will not convert my data from binary to ASCII.
4. the clients system requirements will be win 2000 and higher.

Is WSE 3.0 , or WCF support it?
does WCF is already working ? or something for future versions?

If there is not support for those needs , I think that MS should start
thinking about it , many apps today need to use P2P connections.

thanks a lot for your help

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:kk**************@TK2MSFTNGXA01.phx.gbl...
Thanks for Pablo's informative inputs.

Hi Semedao,

If you also keep an eye on the WCF, you'll find it has provided many cool
communication features for distributed application. However, WCF is not a
purely and dedicated for webservice.

From your last message, you've got that in your scenario, there are
clients
(also service machine?) that are locating in different network environment
and are not visible to each other directly due to the NAT. As far as I
know, there is no directly P2P support on XML webservice standard or
ASP.NET webservice implementation. However, the WSE (Microsoft webservcie
enhancement , latest version 3.0---for .net framework 2.0) support
webservice message routering. Normally, the webservice client/consumer
will establish a direct connection to the webservice server and such
connection is usally based on network protocol access point (ip address +
tcp port when using http or tcp ....), and this make the service client
and
server endpoint protocol dependent and coupled.

the "Message Routering" in WSE just help abstract the webservice client
and
server's actual network protocol access point(address). The client do not
need to directly access the ultimate service server, but can setup a
intermediate router (relay) which can get directly network communication
with the ultimate server. Thus, the client/consumer just need to send
SOAP
message to the rounter machine (intermediate station) and let the rounter
forward the messate to the actual endpoint service. Surely, you need to
setup the rounter in your environment and configure the client/ rounter/
server correctly so that they can cooperate well.

Here are some reference about the service rounter through WSE 3.0:

#Routing SOAP Messages with WSE
http://msdn.microsoft.com/library/de...us/wse3.0/html
/b41230fb-d0e1-48b1-88c0-3daf7a40c9e8.asp

#Implementing Perimeter Service Router in WSE 3.0
http://msdn.microsoft.com/library/en...pPerimServRout
_WSE30.asp?frame=true

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

Aug 9 '06 #7

P: n/a
Thanks for your reply Semedao,

For the several requests you mentioned, here are my understanding(for WSE
3.0):

1. keep all connection and traffic secure from others outside the client
and
server.
==============================
Sure, WSE is capable of this since it can provide message layer security
(encrypte and sign) so that our SOAP message content can not be inspected
on transport protocol layer( tcp/http)

2. be able to make "push" to every client that is connected behind NAT -
for
my opinion it's mean to keep alive the connection with him , because maybe
it's a coast performance issue , to keep alive so much sockets at the
server
, I want to keep only those who are behind NAT.
===============================
This is the problem so far. I don't think WSE can help service actively
push or notify client machines. Even if we utilize the "message rounter" I
mentioned previously, it can only help us address the following scenario:

suppose we have three machines A , B ,C

A , B is in the same local intranet(and protected through NAT), C is at
external network

B is visible to both A and C, so we can setup the WSE message rounter on B

Anyway webservice request(WSE based) from A to B will be rountered to C,
and the webservice response (WSE based) from C will first arrive B and
finally return to A. Of course, we need to use WSE and perform certain
configuration on all the three machines.

3. to be able to transfer large size data blocks from and to those servers
,
for this issue I want that the security , XML and all WS points in the
middle will not convert my data from binary to ASCII.
===============================
This is supported because WSE provide message layer security so the data
won't be cracked at transport layer. Also, the intermediate router(WSE
message router) only care the source and target url address ,but not the
content.


4. the clients system requirements will be win 2000 and higher.
=================================
No problem. WSE 3.0 is depending on .net framework 2.0, and win 2000 and
later windows OS certainly support .net framework 2.0
Anyway, I think the WSE message routering is worth having a look though is
can not 100% address your "push" request.

In addition, I agree that P2P is a trend and support on P2P communication
is really important. However, as for webservice, due to its original design
purpose, I think it's quite hard to implement P2P communication in it(
basically rely on http). I recommend submit the request to the WCF in the
future version of .net framework 3.0(for Vista), WCF is not specific and
limited to webservice only, but a complete communication framework on
Vista, so it's reasonable to make it also P2P enabled:

http://connect.microsoft.com/wcf/Feedback

Please let me know if there is any other information you wonder.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Aug 10 '06 #8

P: n/a
Thanks a lot for your good & detailed response!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Px**************@TK2MSFTNGXA01.phx.gbl...
Thanks for your reply Semedao,

For the several requests you mentioned, here are my understanding(for WSE
3.0):

1. keep all connection and traffic secure from others outside the client
and
server.
==============================
Sure, WSE is capable of this since it can provide message layer security
(encrypte and sign) so that our SOAP message content can not be inspected
on transport protocol layer( tcp/http)

2. be able to make "push" to every client that is connected behind NAT -
for
my opinion it's mean to keep alive the connection with him , because maybe
it's a coast performance issue , to keep alive so much sockets at the
server
, I want to keep only those who are behind NAT.
===============================
This is the problem so far. I don't think WSE can help service actively
push or notify client machines. Even if we utilize the "message rounter"
I
mentioned previously, it can only help us address the following scenario:

suppose we have three machines A , B ,C

A , B is in the same local intranet(and protected through NAT), C is at
external network

B is visible to both A and C, so we can setup the WSE message rounter on B

Anyway webservice request(WSE based) from A to B will be rountered to C,
and the webservice response (WSE based) from C will first arrive B and
finally return to A. Of course, we need to use WSE and perform certain
configuration on all the three machines.

3. to be able to transfer large size data blocks from and to those servers
,
for this issue I want that the security , XML and all WS points in the
middle will not convert my data from binary to ASCII.
===============================
This is supported because WSE provide message layer security so the data
won't be cracked at transport layer. Also, the intermediate router(WSE
message router) only care the source and target url address ,but not the
content.


4. the clients system requirements will be win 2000 and higher.
=================================
No problem. WSE 3.0 is depending on .net framework 2.0, and win 2000 and
later windows OS certainly support .net framework 2.0
Anyway, I think the WSE message routering is worth having a look though is
can not 100% address your "push" request.

In addition, I agree that P2P is a trend and support on P2P communication
is really important. However, as for webservice, due to its original
design
purpose, I think it's quite hard to implement P2P communication in it(
basically rely on http). I recommend submit the request to the WCF in
the
future version of .net framework 3.0(for Vista), WCF is not specific and
limited to webservice only, but a complete communication framework on
Vista, so it's reasonable to make it also P2P enabled:

http://connect.microsoft.com/wcf/Feedback

Please let me know if there is any other information you wonder.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

Aug 13 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.