Calling clients from web service

L

Lars

I am completely new to web services, but have learned that calling a web service from a VB.NET client to recieve data is a very trivial task. But how about the opposite?
How can I make a simple call from a web service to a function in a VB.NET client, anytime during the day? Not just immediately after sending a request to the service. The clients I have logs in to the service in the morning and logs out at the evening. During the day the clients needs to receive alerts sent from the service when data has been changed on the server side. Do I have to send a request every 5 seconds or so from all clients during the day, to ask the web service if data has been updated, or is it better way to do this that I have missed, like pushing an alert from the web service over http to the clients.
 
J

Jan Tielens

This is not possible by using webservices hosted on your server. You can use
a polling scenario as you described.

--
Greetz,
Jan
________________________
Read my weblog: http://weblogs.asp.net/jan

Lars said:
I am completely new to web services, but have learned that calling a web
service from a VB.NET client to recieve data is a very trivial task. But how
about the opposite?
How can I make a simple call from a web service to a function in a VB.NET
client, anytime during the day? Not just immediately after sending a request
to the service. The clients I have logs in to the service in the morning and
logs out at the evening. During the day the clients needs to receive alerts
sent from the service when data has been changed on the server side. Do I
have to send a request every 5 seconds or so from all clients during the
day, to ask the web service if data has been updated, or is it better way to
do this that I have missed, like pushing an alert from the web service over
http to the clients.
 
L

Lars

Yes, but thats not bandwidth-friendly. Imagine I have 100 or more clients making calls to the web service each 5 second..
 
J

Jan Tielens

I agree...

You could use .NET Remoting, but raising events in a distributed world is in
general not a very good idea...

--
Greetz,
Jan
________________________
Read my weblog: http://weblogs.asp.net/jan

Lars said:
Yes, but thats not bandwidth-friendly. Imagine I have 100 or more clients
making calls to the web service each 5 second...
 
N

news.icon.co.za

The polling method is the safest and most secure way. The implementation is
a trade-off between security and performance. The most secure way is to
force the clients to poll the server (which you can tune or load balance to
distribute the server volume). The most high-performance way (i.e. your
clients get the event as soon as it is fired) is to allow your server to
connect to the client and notify it of new events.

Either way, it depends on the requirements as defined in the contract
between your clients and your server. If they only want to check 5 times a
day, or lets say 1 per hour, then you can set a polling schedule to check
for events every hour.

Remoting is not recommended for distributed system connectivity unless you
are in a LAN environment. Even then it is by nature stateful, which is not
ideal for internet applications.

Regards,
Luke Venediger
http://blogdotnet.blogspot.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top