[ovirt-devel] [ENGINE] splitting AuditLogDirector to its own module

Yair Zaslavsky yzaslavs at redhat.com
Mon Oct 6 14:23:25 UTC 2014



----- Original Message -----
> From: "Yevgeny Zaspitsky" <yzaspits at redhat.com>
> To: "Yair Zaslavsky" <yzaslavs at redhat.com>, devel at ovirt.org
> Sent: Sunday, October 5, 2014 11:31:18 AM
> Subject: Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to its own module
> 
> Hi Yair and All,
> 
> As soon as you turned our attention to dependencies problems in oVirt, I
> guess would worse to mention that vdsbroker is directly dependent on dal
> (very weird to me).
> That is because some business logic found its way into vdsbroker code
> and uses dal directly. Using dal should be allowed to bll module only.
> Next to allowing ourselves using dal in vdsbroker, we've found very
> creative way to use bll commands in vdsbroker completing by that a
> circular dependency ring.
> 
> The current situation when vdsbroker is directly dependent on dal and in
> fact dependent on bll is sever violation of a good design practice IMHO.
> 
> I'm in favor solving that dependency mesh asap prior it become more
> difficult. We should strive to extract the business logic from vdsbroker
> (and any other module) and move that to bll module where its natural
> place is, then fix the dependencies chain (that have to be a tree and
> not any geometric figure).
> 
> When that will happen, we'd be able to figure more easily what the
> natural place for AuditLogDirector should be, I guess that'll be utils
> package.
> 
> Regards,
> Yevgeny

git grep will show you that it is in VdsBrokerObjectsBuilder which creates the entities from the XMlRpcStruct maps.
The calls to AuditLogDirector simply "report" of various issues during the "transformation" to the audit log, to be presented at UI. The objects builder class already involves business entities.
I agre usage of AuditLogDirector there seems ackward.


> 
> On 03/10/14 20:03, Yair Zaslavsky wrote:
> > Hi all,
> > I just reviewed a patch regarding AuditLogDirector and I thought to myself
> > - why is it located in DAL?
> > Our maven dependencies are built in a way that both bll and vdsbroker
> > depend on DAL, and if you perform git grep AuditLogDirector you will see
> > it is used
> > by bll and vdsbroker.
> > But that this is not necessary a reason to include AuditlogDirector in DAL.
> > I think DAL should be our Data Access Layer, and for audit log (which is a
> > class that uses our DAOs) we should have a separate module.
> >
> > Thoughts on this are welcome,
> >
> > Yair
> > _______________________________________________
> > Devel mailing list
> > Devel at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/devel
> 
> 



More information about the Devel mailing list