< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] upcoming changes to DUM's RegistrationPersistenceManager and ServerRegistration



On Jun 6, 2005, at 15.04, Adam Roach wrote:



I propose refactoring ServerRegistration so we pass a list of operations (memory owned by DUM) in the ServerRegistrationHandlers. The application can inspect the operations and/or the original request. accept() would cause the list of operations to be committed to the database (quick lock/ unlock), return the current list of registered contacts (with and without instances), and free the list of operations. reject() would free the memory.

That sounds like a good design to me.


We can use the same operations for updates from other cluster members when we add high availability.


Yep. I like that.


My comments:

One thing to pay attention to is the lock-lifetime vis exceptions. We don't want to open ourselves to a situation where throwing an exception results in a lock-state leak. This is arguably a weakness of mixing procedural and OO design in general. This isn't an apple-pie post either -- there have been resource and exception safety issues in the past; they are surprisingly easy to introduce.
;-)

Cheers,
Alan


a l a n a t j a s o m i d o t c o m