[Ovirt-devel] [PATCH server] Revised attempt at refactoring the vm_controller using the service layer.

Hugh O. Brock hbrock at redhat.com
Wed Apr 22 00:48:19 UTC 2009


On Tue, Apr 21, 2009 at 09:49:15PM +0000, David Lutterkort wrote:
> On Tue, 2009-04-21 at 13:14 -0700, Ian Main wrote:
> > So with this service layer.. with it being included and setting local
> > properties of the object, will that be thread safe?  Or will we have
> > to do locking around each call?
> > 
> > I'm not sure yet if the agent will be threaded.. but it certainly
> > could have a thread per method invocation..
> 
> To echo what Scott said: I would prefer if we followed the rails model
> fairly closely, with some sort of notion of a 'QMF controller', and
> instantiate one for every method call from the QMF agent.
> 
> Given that we want to minimize the amount of things we keep in memory
> (mostly to avoid cache coherency issues between memory and DB), we want
> the QMF API to be as statefree as possible.

Yeah this is clearly the right way to do things... i.e. we already
have lots of code dedicated to handling simultaneous HTTP requests and
even multi-request sessions, why reinvent that for handling
simultaneous QMF sessions? Seems like a fairly straightforward
analogy... with the annoying exception perhaps that a QMF session
might be rather longer lived than an http request and therefore the
locking issues might be more serious. But I still think all of this is
manageable.

--H




More information about the ovirt-devel mailing list