Apache::Singleton::Server got me thinking about Cache::Cache
and locking again. if i'm going to have a server-global
object, i am going to need to protect against multiple
processes updating it simultaneously, right?

we've already talked about this in regards to sessions. most
folks seem to feel that "last one wins" is sufficient for
session data. but what about for objects for which this
policy is not good enough?

if locking is necessary in some instances, even if we can
only contrive theoretical examples right now, how might it
be done in a performant way, especially for objects that can
be modified multiple times while handling a single request?
seems like if you synchronized write access to the object
and caused each process to update its local copy after each
modification, you'd have a hell of a lot of serialization
and deserialization going on in each request.

thoughts?

Reply via email to