|creating history records - potential clock issues [message #500236]
||Wed, 25 November 2009 08:12
| Tom Eugelink
Registered: July 2009
I've activated a history policy on one entity now. What I immediately noticed is that the start and end time values are provided as literal values. This is a potential source of problems.|
My applications are Swing fat clients. Because the values are literal values derived from the client's clock, issues with differences in the clocks on the clients maybe garble the data. Suppose one client has a clock that differs a few seconds from another client's (not uncommon). That may cause the start-end time to not be in sequence, or even worse: duplicate values (I set the timestamp to milliseconds to try and prevent that last one).
Naturally clock sync will cure this somewhat, but it's an external solution to what could also be solved internally by using the clock of the database instead of the client; by not providing literal values, but database variables. So instead of "2009-11-25 13:59:00.000" provide (in my case of using Informix's datetime) "current year to fraction".
Since using database variables is depending on the field type, default behavior should still be literal values, but configurable to use database variables.
Powered by FUDForum
. Page generated in 0.02381 seconds