[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Demexp-dev] Does the server need to call the client?
From: |
David MENTRE |
Subject: |
Re: [Demexp-dev] Does the server need to call the client? |
Date: |
Sun, 03 Sep 2006 12:42:48 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Hello Augustin,
Augustin <address@hidden> writes:
> The problem is that the web client cannot know of the activity going on
> between the server and all the hard clients.
>
> I was thinking that the server could be set up to 'call' (via xml rpc) the
> web
> client, whenever another client is updating the data. This way the web client
> knows it needs to update its own internal records.
Currently, there is no API for the server to push information to clients.
> Now, I understand that this particular way of doing might be troublesome for
> you (requires much more coding).
Yes. :-)
> There is a probably much better way to do it, that would never require the
> server to call the web client.
A RSS feed is also available (updated for each new question or
response). Its format is currently not very good and might need a rework
for easier parsing by clients.
> I can use Drupal to schedule some cron jobs, and call the server at regular
> intervals: the method would be
> "what-has-changed-since-last-time-i-called-you?".
There is such a call in current API : get_timestamps(). This call
returns a compressed array of timestamps, one for each question. I'll
look at ways to have this on the XML RPC side.
> I don't know how you store the data, server side, and how the hard clients
> remain up to date, but I imagine you already use a similar system.
> Certainly you have a last-updated timestamp for each question...
Exactly.
> The question really is: what procedure do you currently use to make sure that
> the clients (hard clients or the web client) always have the most up to date
> data.
Currently, the hard client is getting the latest timestamps each time it
starts.
> I can tell you one thing, though: it would be too much resource intensive for
> the web client to call the server at each page view!
Sure. A regular cron job each 15 or 20 minutes would be frequent enough.
Best wishes,
d.
--
GPG/PGP key: A3AD7A2A David MENTRE <address@hidden>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A