|
Posted by Piotr Nowak on 08/23/07 09:17
Piotr Nowak pisze:
> Hi,
>
> Say i have a server process which listens for some changes in database.
> When a change occurs i want to refresh my page in browser by notyfinig it.
>
> I do not want to refresh my page i.e. every 5 seconds, i just want to
> refresh it ONLY on server change just like desktop applications do.
>
> The problem is that refreshing evry n seconds has to much impact on my
> web server. The refresh action should be taken only when something
> really happens that makes sense
>
> Is it possible ?
>
> greets, peter
Let me put it in another way, to help you understand my problem:
Imagine you develop a online game, like ogame.
There's a lot action behind the scenes, players are making some actions
that take some time (training soldiers, building houses) which takes
some time (minutes, hours, even days). after time is up and soldier,
building is finished a browser should be refreshed to say - 'hey, your
request is done now !, you succesfully trained 5 soldiers and built one
house'.
So, it doesnt make sense to poll every 5 seconds if action of building a
house last 2 days ! Divide 2days by 5 seconds and you get number of
waisted requests to check if action is done.
was this enough clear for You ?
Navigation:
[Reply to this message]
|