[DGD] Persistent Users
Gary
gary at mups.co.uk
Fri Sep 23 23:10:54 CEST 2016
On 23/09/16 21:36, Raymond Jennings wrote:
> And in general, any savings you could gain by caching will be outranked by
> any shortfalls caused by corruption. If your data can become stale,
> inconsistent, corrupted, or worse sabotaged, its not worth the speed
> gains. So generally, security should come first, as all the efficiency in
> the world won't help you if your data gets compromised.
Totally agree.
> Also, consider what would happen if an administrator (or the user) changes
> the account data and makes any cached copies of it stale.
>
I had indeed considered that exact situation as I expect the two main
cases for account data changes to be via the user or an admin. Which
would require care and coordination between various objects to ensure
caches were correctly invalidated. A good enough reason to avoid caching
unless performance is an issue and why I was not too keen on the idea
(option 2 in my earlier email) that involved the LWO storing data.
I generally take the approach safety first, efficiency only when it
becomes a problem. That is to say, avoiding premature optimisation
whilst at the same time avoiding premature pessimisation :)
The account system is unlikely to need caching due to how infrequently I
expect it to be accessed for any given users. However, it does make for
a useful basis to discuss a more general case of data storage and access
for a subsystem that might work in a similar way but be accessed more
frequently making avoiding lookups a little more important.
Regards,
Gary
More information about the DGD
mailing list