------=_Part_15565573_1349566518.1412619571382
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Usage of AuditLogDirector in VdsBrokerObjectsBuilder is an illustration for a sub-optimal
design:
1. The methods it is used in them are checkTimeDrift and
reportInvalidInterfacesForNetwork. Both are:
public static and both should not be
Best regards,
____________________
Yevgeny Zaspitsky
Senior Software Engineer
Red Hat Israel
34 Jerusalem Road,
Ra'anana, Israel 43501
Tel: +972 9 7692098
Mobile: +972 52 6323656
Email: yzaspits(a)redhat.com
IRC: yzaspits
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs(a)redhat.com>
To: "Yevgeny Zaspitsky" <yzaspits(a)redhat.com>
Cc: devel(a)ovirt.org
Sent: Monday, October 6, 2014 5:23:25 PM
Subject: Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to its own
module
----- Original Message -----
> From: "Yevgeny Zaspitsky" <yzaspits(a)redhat.com>
> To: "Yair Zaslavsky" <yzaslavs(a)redhat.com>, devel(a)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(a)ovirt.org
> >
http://lists.ovirt.org/mailman/listinfo/devel
>
>
------=_Part_15565573_1349566518.1412619571382
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: times new roman, new york,
times, se=
rif; font-size: 12pt; color: #000000"><div><span
style=3D"font-family: aria=
l,helvetica,sans-serif;">Usage of AuditLogDirector in VdsBrokerObjectsBuild=
er is an illustration for a sub-optimal design:</span><br><span
style=3D"fo=
nt-family: arial,helvetica,sans-serif;">1. The methods it is used in them a=
re checkTimeDrift and reportInvalidInterfacesForNetwork. Both are:</span><b=
r><span style=3D"font-family: arial,helvetica,sans-serif;">public
static an=
d both should not
be</span><br></div><div><br></div><div><span
style=3D"fon=
t-family: arial,helvetica,sans-serif;"><span
name=3D"x"></span>Best regards=
, </span><br><span style=3D"font-family:
arial,helvetica,sans-serif;">_____=
_______________ </span><br><span style=3D"font-family:
arial,helvetica,sans=
-serif;">Yevgeny Zaspitsky </span><br><span
style=3D"font-family: arial,hel=
vetica,sans-serif;">Senior Software Engineer </span><br><span
style=3D"font=
-family: arial,helvetica,sans-serif;">Red Hat Israel
</span><br><span style=
=3D"font-family: arial,helvetica,sans-serif;">34 Jerusalem Road,
</span><br=
<span style=3D"font-family:
arial,helvetica,sans-serif;">Ra'anana, Israel =
43501
</span><br><div><br></div><span
style=3D"font-family: arial,helvetica=
,sans-serif;">Tel: +972 9 7692098 </span><br><span
style=3D"font-family: ar=
ial,helvetica,sans-serif;">Mobile: +972 52 6323656 </span><br><span
style=
=3D"font-family: arial,helvetica,sans-serif;">Email: yzaspits(a)redhat.com
</=
span><br><span style=3D"font-family:
arial,helvetica,sans-serif;">IRC: yzas=
pits </span><br><span
name=3D"x"></span><br></div><div><br></div><hr
id=3D"=
zwchr"><blockquote style=3D"border-left:2px solid
#1010FF;margin-left:5px;p=
adding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decora=
tion:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From:
=
</b>"Yair Zaslavsky"
&lt;yzaslavs(a)redhat.com&gt;<br><b>To: </b>"Yevgeny Zas=
pitsky" &lt;yzaspits(a)redhat.com&gt;<br><b>Cc:
</b>devel(a)ovirt.org<br><b>Sen=
t: </b>Monday, October 6, 2014 5:23:25 PM<br><b>Subject: </b>Re:
[ovirt-dev=
el] [ENGINE] splitting AuditLogDirector to its own
module<br><div><br></div=
<br><div><br></div><hr
id=3D"zwchr"><br>> From: "Yevgeny Zaspitsky" <=
;yzaspits(a)redhat.com&gt;<br>&gt; To: "Yair Zaslavsky"
&lt;yzaslavs(a)redhat.c=
om>, devel(a)ovirt.org<br>&gt; Sent: Sunday, October 5, 2014 11:31:18
AM<b=
r>> Subject: Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to it=
s own module<br>> <br>> Hi Yair and All,<br>>
<br>> As soon as =
you turned our attention to dependencies problems in oVirt, I<br>> guess=
would worse to mention that vdsbroker is directly dependent on dal<br>>=
(very weird to me).<br>> That is because some business logic found its =
way into vdsbroker code<br>> and uses dal directly. Using dal should be =
allowed to bll module only.<br>> Next to allowing ourselves using dal in=
vdsbroker, we've found very<br>> creative way to use bll commands in
vd=
sbroker completing by that a<br>> circular dependency ring.<br>>
<br>=
> The current situation when vdsbroker is directly dependent on dal and =
in<br>> fact dependent on bll is sever violation of a good design practi=
ce IMHO.<br>> <br>> I'm in favor solving that dependency
mesh asap pr=
ior it become more<br>> difficult. We should strive to extract the busin=
ess logic from vdsbroker<br>> (and any other module) and move that to bl=
l module where its natural<br>> place is, then fix the dependencies chai=
n (that have to be a tree and<br>> not any geometric
figure).<br>> <b=
r>> When that will happen, we'd be able to figure more easily what
the<b=
r>> natural place for AuditLogDirector should be, I guess that'll be uti=
ls<br>> package.<br>> <br>>
Regards,<br>> Yevgeny<br><div><br><=
/div>git grep will show you that it is in VdsBrokerObjectsBuilder which cre=
ates the entities from the XMlRpcStruct maps.<br>The calls to AuditLogDirec=
tor simply "report" of various issues during the "transformation" to
the au=
dit log, to be presented at UI. The objects builder class already involves =
business entities.<br>I agre usage of AuditLogDirector there seems ackward.=
<br><div><br></div><br>> <br>> On
03/10/14 20:03, Yair Zaslavsky wrot=
e:<br>> > Hi all,<br>> > I just reviewed a patch
regarding Audi=
tLogDirector and I thought to myself<br>> > - why is it located in
DA=
L?<br>> > Our maven dependencies are built in a way that both bll
and=
vdsbroker<br>> > depend on DAL, and if you perform git grep
AuditLog=
Director you will see<br>> > it is used<br>> > by
bll and vdsbr=
oker.<br>> > But that this is not necessary a reason to include
Audit=
logDirector in DAL.<br>> > I think DAL should be our Data Access
Laye=
r, and for audit log (which is a<br>> > class that uses our DAOs) we
=
should have a separate module.<br>> ><br>> >
Thoughts on this a=
re welcome,<br>> ><br>> > Yair<br>>
> ___________________=
____________________________<br>> > Devel mailing
list<br>> > D=
evel(a)ovirt.org<br>&gt; >
http://lists.ovirt.org/mailman/listinfo/devel<b=
r>> <br>>
<br></blockquote><div><br></div></div></body></html>
------=_Part_15565573_1349566518.1412619571382--