self-refresh of client according webservice answer

F

Frank Dzaebel

Hello,
I want a client-side to refresh itself when a webservice-
answer says "ok,refresh,new data".
..
I do not want a permanent submit() like this:
window.setTimeout("document.Form1.submit()",2000);
Similar to a refresh-meta-tag this would be too much
communication traffic.
..
So a small webservice-method, telling me "new data is
available" would be nice. But that call must be on the
client side !
How can I accomplish that ?

Thanks, an answer would be great, Frank
 
D

Dino Chiesa [MSFT]

If what you are getting at is how to inform the client that there is new
information, this is a general problem that has been well explored.

There are two common approaches:
Polling. the client polls the server, asking "Any new info?" every once
in a while. this is a lightweight call and doesn't necessarily send the new
info (although it may do so).

Pub/sub. The client registers interest with the server on a particular
topic ("subscribes"), and provides to the server a way to communicate with
the client. The Server tracks when information is updated (a "publish
event), then notifies the registered interested parties. [NB: pub/sub =
publish / subscribe ]

These approaches are general, and can be implemented using a variety of
technologies (RPCs, message queues, whatever). Both work with web services,
of course. In the latter case the "client" must actually listen for
incoming SOAP requests; in other words, the client becomes a server. This
may be a blocking factor in some networks.


An approach that is generally dismissed as non-scalable, but which may work
in your scenario, is to have the client send a request, and allow the
request to block at the server indefinitely, until such time as there is
fresh information to send. Only then will the server respond with the
information. This tends to consume threads, memory, and other resources on
the client but also (and more significantly) on the server, and for this
reason will not scale well. But it may work in your situation.

-dino
 
F

Frank Dzaebel

Thanks Dino, valuable answer as is!
ok, if I decide to do Polling, what can I do?
Is it the right decision?
I also thought on 'Remote scripting', but that seemed to
be an ASP-only solution to be (so no ASP.NET).

The Scenario: Intranet with 15 Clients(WindowsCE4.1) and
1 Server(W2k), Full trust, everyone has IExplorer,
ASP.NET-hosted Website[C#].

The Problem is that the CE4.1-IExplorer-BEHAVIOR-
attribute does not work there.

So I must use Polling a webservice without BEHAVIOR-
attribute. How is that possible ?

thanks, Frank

-----Original Message-----
If what you are getting at is how to inform the client that there is new
information, this is a general problem that has been well explored.

There are two common approaches:
Polling. the client polls the server, asking "Any new info?" every once
in a while. this is a lightweight call and doesn't necessarily send the new
info (although it may do so).

Pub/sub. The client registers interest with the server on a particular
topic ("subscribes"), and provides to the server a way to communicate with
the client. The Server tracks when information is updated (a "publish
event), then notifies the registered interested parties. [NB: pub/sub =
publish / subscribe ]

These approaches are general, and can be implemented using a variety of
technologies (RPCs, message queues, whatever). Both work with web services,
of course. In the latter case the "client" must actually listen for
incoming SOAP requests; in other words, the client becomes a server. This
may be a blocking factor in some networks.


An approach that is generally dismissed as non-scalable, but which may work
in your scenario, is to have the client send a request, and allow the
request to block at the server indefinitely, until such time as there is
fresh information to send. Only then will the server respond with the
information. This tends to consume threads, memory, and other resources on
the client but also (and more significantly) on the server, and for this
reason will not scale well. But it may work in your situation.

-dino



Frank Dzaebel said:
Hello,
I want a client-side to refresh itself when a webservice-
answer says "ok,refresh,new data".
.
I do not want a permanent submit() like this:
window.setTimeout("document.Form1.submit()",2000);
Similar to a refresh-meta-tag this would be too much
communication traffic.
.
So a small webservice-method, telling me "new data is
available" would be nice. But that call must be on the
client side !
How can I accomplish that ?

Thanks, an answer would be great, Frank


.
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top