From owner-freebsd-current@freebsd.org Tue Nov 17 09:11:05 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C85CA304DA for ; Tue, 17 Nov 2015 09:11:05 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D2671F31; Tue, 17 Nov 2015 09:11:04 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: by wmww144 with SMTP id w144so15982747wmw.0; Tue, 17 Nov 2015 01:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pz3TvXSQYD26qKeaHjGFYOpXFN/+9Khz7hMO7ciY1L8=; b=0TINepeHcO4d442RkfJCIAJ7L3aIqsGh/nBoRveepUCNLiZIxPXgWQnerLvdxL020g EoxqDz40VqDaRhuoaiIbcP54B01VlSPw3/lb6IUDY2BKwxeFBkZ89PZFZt1muXOYn2wu AUBR+II8GX9Mb9WmI6tWtxA5h23WUl6GcKB1q7KtSOUVp8vsPt19hiMl5+KB5mgjJIFT chnGR/4AfOnTv8/D6tr/WZ2ab0/ROLGEsQ4708qfNrAzdoNAMXYVuqED1Jp9cve4yXJr HEMJhOgcLVR8fZH0MNk4gWn0vszwE1Mt9s5OkhC2/iXjVByqDNVizB+ZGcO4v5N2NA4R 8Vaw== MIME-Version: 1.0 X-Received: by 10.194.86.161 with SMTP id q1mr49720508wjz.88.1447751463096; Tue, 17 Nov 2015 01:11:03 -0800 (PST) Received: by 10.28.16.206 with HTTP; Tue, 17 Nov 2015 01:11:02 -0800 (PST) In-Reply-To: <564AED8B.4080809@freebsd.org> References: <0650CA79-5711-44BF-AC3F-0C5C5B6E5BD9@rdsor.ro> <564AED8B.4080809@freebsd.org> Date: Tue, 17 Nov 2015 10:11:02 +0100 Message-ID: Subject: Re: libXO-ification - Why - and is it a symptom of deeper issues? From: Andreas Nilsson To: Julian Elischer Cc: Dan Partelly , Current FreeBSD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2015 09:11:05 -0000 On Tue, Nov 17, 2015 at 10:04 AM, Julian Elischer wrote: > On 11/15/15 8:54 PM, Dan Partelly wrote: > >> Hi all, >> >> I was looking at the new facility of dumping JSON,XML from many utils in >> base and after some funny minutes, I couldn't stop ask myself =E2=80=9C = Ok, this is >> funny , but why ? =E2=80=9C And I couldn't find a real answer. Ill outli= ne what I >> think: >> >> >> 1. Undoubtedly, it makes base code slightly harder to understand and >> maintain. >> 2. I have seen the idea that this makes the information dumped by >> utilities in the base easily accessible programatically. OK, maybe it do= es >> , but >> it doesn't fit with the current paradigm of "tool | filter | tool=E2=80= =9D at >> all. There are no tools able to accept JSON and filter it in any meaning= ful >> way, and I >> dont see too many ppl changing their code to read JSON instead of text. >> I don't even see the base tools changing. This output may be useful in >> corner cases only. >> 3. The integration of libxo IMO only points at a much deeper issue IMO. >> It is only an expression of the need of a mechanism aimed at binary code >> reuse. But it does not solve the problem, it only adds yet another >> possibility in a world where too much choices already result in too much >> splits and incompatible APIs. >> 4. This whole effort would have been IMO much better served by porting >> the bulk of ifconfig(8) , route(8) and wpaclient(8) to a library API, mu= ch >> like the libs for geom, zfs , etc , ready for reuse of 3rd party code. >> Eventually writing network control daemons in time over it , much like >> solaris does. >> >> 5. A port of partial OS config data to UCL =E2=80=A6. would induce yet i= nduce >> another orthogonality violation. What makes UCL better than the bestiary= of >> ad hoc databases already existing in BSDs ? Programatic readability, yes= . >> but it does not add any real much needed functionality such as >> *transactional databases* for system tools. Why not research a proper >> solution - easily accessible by other programs ,orthogonal , transaction= al, >> and ACL protected solution which can be used all over the place , fro= m >> OS boot, to ABI management, service management, network management, user >> management. I hope this day will come, a day when I will not have to ed= it >> a single config file manually, yet I would have access to all the config >> and system state easy with wrapper APIs. In the light of this point, wh= y >> go with UCL ? It is not orthogonal, it is not transnational, and editing >> the config files directly would result in the same old human errors whic= h >> bite as all from time to time. >> >> 5. It is my opinion that Solaris addressed some of those issue. Solaris >> FMRI and SMF are lightyears ahead of the very tired models we keep using= on >> BSDs. Why not build on the insight offered by those (or even on the insi= ght >> offered by Windows :P) , then inventing more adhoc solutions and ad-hoc >> databases, which do not address the real issues we have , like binary co= de >> reuse, service management issues, lack of a system wide published >> -subscriber bus ( not kdbus :P ) fault detection and reaction, fault >> reporting, all much needed parts of a modern OS. >> >> And now thee questions >> >> 1. Why lib XO ? Why burden the OS for some corner cases where it may be >> useful ? >> >> 2. Was there any real talk on how to bring FreeBSD up to speed regarding >> those issues ? A period of research on what exists, on what can be done= , >> and ensure important things are not showed in background and replaced wi= th >> yet another ad-hoc config database which lacks modern features ? >> >From where I am standing, this could be a project spawning multiple >> years , but it would be well worth it, and in my opinion it would be als= o >> worthy of >> the freeSBD foundation sponsorship for several years in a row. The >> features I touched upon became very important parts of oder OSes, and >> rightly so. >> >> Note: >> >> this message is serious and it is not intended to start flame wars, >> religious crusades, or offend anyone. >> > Amen. > > I have stated before that I believe this is a mistake... actually, no, no= t > "mistake" actually.. let's say "suboptimal and aesthetically dipleasing". > It has every hallmark of "the wrong answer" in my gut feeling. > I believe it is being pushed by Juniper to make it easier to make > appliances, but I'm not sure I remember correctly. > I remember that there was a set of slides somewhere that give the > justifications and thinking behind it. > But quick look failed to find it.. As a 'currently mostly inactive (kids > + $JOB ) I feel iti sn't my place to argue against it too much if current= ly > active deveelopers want it, but it doesn't ring quite right to me.. The > ifconfig issue is a separate issue, but yes that could be a good library = to > have. > > Personally I would have liked it if in '91 we had followed one very > serious suggestion, > and implemented every user command as a base 'library', and a tcl wrappe= r > script that gave the external behaviour. then every command could have be= en > made extensible to output various formats etc. by having an alternate tcl > script to run in that case. > > > I for one find this really really promising. I think it will really simplify adopting https://github.com/clicon/clicon to make a slick cli. UCL also has it's place in that vision. If the daemons should read from config files or query a "database" is a good question, where I see pros and cons for both approaches. Best regards Andreas > > > _______________________________________________ >> freebsd-current@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.or= g >> " >> >> >> > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " >