session:time-source in a thin client world

Posted by jankeir on 17-Dec-2008 09:24


I've got a question. Session:time-source allows to sync all your clients time. But what do you do in a thin client world with no database connections to sync with? Is a something like NTP at the OS level the only solution or is there a way to sync the time with the appserver?



All Replies

Posted by Admin on 17-Dec-2008 13:30

AFAIK there's no way to synchronize the time with an AppServer. A question would be how often the client would need to query the time from the AppServer - in a WAN environment each call - just for the time - would be problematic.

I personally would got with an NTP server.

If the time is a critical unit in your application, I'd only assign time's on the AppServer. You could also periodically (or at least at login) send the clients time to the server and accept a difference with the servers time of +/- 2 seconds or so... If the difference is more than 2 seconds the server could refuse the connection or the execution of critical calls.

Message was edited by:

Mike Fechner

Message was edited by:

Mike Fechner

Posted by Thomas Mercer-Hursh on 17-Dec-2008 13:48

Seems to me that for thin client, if you want to base everything on the time standard of the server, all you need is the timezone offset of the client.

Posted by Admin on 17-Dec-2008 13:52

The timezone offset controls the difference in hours (or half hours).

I assume, the bigger problem for some applications with time critical data can be offsets of seconds or a few minutes caused by PC clocks that are a little behind of beyond the server time.

Here the best garantee would be to write all time data on the server - not on the client.

Posted by Thomas Mercer-Hursh on 17-Dec-2008 14:22

Yes, the original question seemed to be oriented toward using server time, which is sensible in a distributed application, but if one cared about the time at the client, then the timezone offset could be supplied for the client. Otherwise, of course, there is no problem at all since recording everything as server time requires no work at all other than not bothering to send a time from the client. There are times, though, where one would care about the relative time at the client and, for that, timezone offset does the trick.

Posted by jankeir on 19-Dec-2008 02:26

Thanks for your replies. I guess I will have to live without the time statement on the client-side and always get time from the server if I need it.

This thread is closed