Mailinglist Archive: yast-devel (129 mails)
| < Previous | Next > |
Re: [yast-devel] SCR usage statistics.
- From: Lukas Ocilka <lukas.ocilka@xxxxxxx>
- Date: Fri, 16 Nov 2007 10:11:49 +0100
- Message-id: <473D5ED5.4080008@xxxxxxx>
Klaus Kaempf napsal(a):
Sounds great!
Nevertheless I don't see *any* benefit when comparing to the current
implementation. What I see are these drawbacks:
* Broken backward compatibility - and we know we need backward
compatibility in such important tasks as access to system is.
We just can't rewrite the whole YaST overnight (OES, SLEPOS, ...).
* Confuses developers - currently we have clearly written: 'Read',
'Write', 'Execute' or 'Dir'.
The proposal of replacement for SCR::Read vs. SCR::Execute is almost
the same:
any cmd_out = client.foo.bar ( v1 )
any value = client.foo.bar
any cmd_out = SCR::Execute (.foo.bar, v1)
any value = SCR::Read (.foo.bar)
* It's not a fun to rewrite all the existing code :) ;) and it's not
easy either! ;)
The current SCR implementation expects caching the changed values, all
are written to disk at once to make it faster. I don't see any clear
/object-oriented/ syntax to rewrite it to be still understandable.
Anyway, if we are talking about SCR -> 'client', WFM would need to be
'system' or something similar. Which, on the other hand, would bring
another confusedness.
IMO: All in all, this is not worth changing. But please, convince me it is.
Bye
Lukas
PS: The current documentation of SCR agents is generated from sources
for every release. See these pages, for instance:
SCR:
http://forgeftp.novell.com/yast/doc/SL10.3/scr/index.html
http://forgeftp.novell.com/yast/doc/SL10.3/scr/136.root.wgetrc.html
http://forgeftp.novell.com/yast/doc/SL10.3/scr/152.sysconfig.SuSEfirewall2.html
SCR how-to document:
http://forgeftp.novell.com/yast/doc/SL10.3/tdg/documentation_SCR.html
--
Lukas Ocilka, YaST Developer (xn--luk-gla45d)
-----------------------------------------------------------------
SUSE LINUX, s. r. o., Lihovarska 1060/12, Praha 9, Czech Republic
* Justin Haygood <jhaygood@xxxxxxxxxxx> [Nov 15. 2007 19:06]:
From experience, SCRs are just plain hard to use unless you are a rocket
scientist. Writing and consuming SCRs (or their potential replacement)
should be a lot easier and more "fun".
Agreed !
And I forgot one more point in my list:
- Object orientation
The 'backend api' should pick up properties of object-orientation.
Examples:
Old New
--- ---
value = SCR::Read( .foo.bar ) -> value = client.foo.bar
SCR::Write( .foo.bar, value ) -> client.foo.bar = value
SCR::Execute( .foo.bar, v1, v2) -> client.foo.bar( v1, v2 )
I think this fulfills the 'easy' and 'fun' requirements ;-)
Sounds great!
Nevertheless I don't see *any* benefit when comparing to the current
implementation. What I see are these drawbacks:
* Broken backward compatibility - and we know we need backward
compatibility in such important tasks as access to system is.
We just can't rewrite the whole YaST overnight (OES, SLEPOS, ...).
* Confuses developers - currently we have clearly written: 'Read',
'Write', 'Execute' or 'Dir'.
The proposal of replacement for SCR::Read vs. SCR::Execute is almost
the same:
any cmd_out = client.foo.bar ( v1 )
any value = client.foo.bar
any cmd_out = SCR::Execute (.foo.bar, v1)
any value = SCR::Read (.foo.bar)
* It's not a fun to rewrite all the existing code :) ;) and it's not
easy either! ;)
The current SCR implementation expects caching the changed values, all
are written to disk at once to make it faster. I don't see any clear
/object-oriented/ syntax to rewrite it to be still understandable.
Anyway, if we are talking about SCR -> 'client', WFM would need to be
'system' or something similar. Which, on the other hand, would bring
another confusedness.
IMO: All in all, this is not worth changing. But please, convince me it is.
Bye
Lukas
PS: The current documentation of SCR agents is generated from sources
for every release. See these pages, for instance:
SCR:
http://forgeftp.novell.com/yast/doc/SL10.3/scr/index.html
http://forgeftp.novell.com/yast/doc/SL10.3/scr/136.root.wgetrc.html
http://forgeftp.novell.com/yast/doc/SL10.3/scr/152.sysconfig.SuSEfirewall2.html
SCR how-to document:
http://forgeftp.novell.com/yast/doc/SL10.3/tdg/documentation_SCR.html
--
Lukas Ocilka, YaST Developer (xn--luk-gla45d)
-----------------------------------------------------------------
SUSE LINUX, s. r. o., Lihovarska 1060/12, Praha 9, Czech Republic
| < Previous | Next > |