Hi, I wanted to give the list a heads up about something a number of us discussed at the recent XenSummit. We would like to simplify Xend by utilizing more of the standard Python library and relying on less of our own code. The most obvious thing here is the current S-Expression/HTTP RPC interface. We would like to replace this with XML-RPC using Python''s builtin support (xmlrpclib and SimpleXMLRPCServer). I''ve got some initial code and more details on the wiki (http://wiki.xensource.com/xenwiki/Xend/XML-RPC). Early estimates are that this would reduce the code in Xend by about 33% (5k slocs). We would also like to standardize this XML-RPC interface so that third-parties write apps to this interface without worrying about massive breakage. Thoughts? Regards, Anthony Liguori _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anthony Liguori wrote:> Hi, > > I wanted to give the list a heads up about something a number of us > discussed at the recent XenSummit. > > We would like to simplify Xend by utilizing more of the standard Python > library and relying on less of our own code. The most obvious thing > here is the current S-Expression/HTTP RPC interface. We would like to > replace this with XML-RPC using Python''s builtin support (xmlrpclib and > SimpleXMLRPCServer). > > I''ve got some initial code and more details on the wiki > (http://wiki.xensource.com/xenwiki/Xend/XML-RPC). Early estimates are > that this would reduce the code in Xend by about 33% (5k slocs). We > would also like to standardize this XML-RPC interface so that > third-parties write apps to this interface without worrying about > massive breakage.I think moving from s-exp''s to XML is a bad move. If you want, use your s-expression library from LANL; it''s used worldwide, and has done the job for a lot of projects. I know of at least one project that moved from XML to s-exp''s, using our library, because XML is just plain unwieldy. thanks ron _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
For those who don''t know the library Ron speaks of... http://sexpr.sourceforge.net/ -m On Jan 31, 2006, at 2:36 PM, Ronald G Minnich wrote:> Anthony Liguori wrote: >> Hi, >> I wanted to give the list a heads up about something a number of >> us discussed at the recent XenSummit. >> We would like to simplify Xend by utilizing more of the standard >> Python library and relying on less of our own code. The most >> obvious thing here is the current S-Expression/HTTP RPC >> interface. We would like to replace this with XML-RPC using >> Python''s builtin support (xmlrpclib and SimpleXMLRPCServer). >> I''ve got some initial code and more details on the wiki (http:// >> wiki.xensource.com/xenwiki/Xend/XML-RPC). Early estimates are >> that this would reduce the code in Xend by about 33% (5k slocs). >> We would also like to standardize this XML-RPC interface so that >> third-parties write apps to this interface without worrying about >> massive breakage. > > > I think moving from s-exp''s to XML is a bad move. If you want, use > your s-expression library from LANL; it''s used worldwide, and has > done the job for a lot of projects. > > I know of at least one project that moved from XML to s-exp''s, > using our library, because XML is just plain unwieldy. > > thanks > > ron--- Matthew Sottile (matt@lanl.gov) Advanced Computing Laboratory (CCS-1) Los Alamos National Laboratory Los Alamos, NM 87545 Phone: (505)665-6057 Web: http://ddma.lanl.gov/~matt/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ronald G Minnich wrote:> I think moving from s-exp''s to XML is a bad move. If you want, use > your s-expression library from LANL; it''s used worldwide, and has done > the job for a lot of projects.Python supports XML-RPC out of the box. Using that code will remove 5k lines of code from Xend. With Python, all you have to do is register functions with the XML-RPC handler and use a proxy object. We won''t have to write any XML code at all. I''m quite indifferent to XML/S-Expressions actually. It''s just about simplifying things. Regards, Anthony Liguori> I know of at least one project that moved from XML to s-exp''s, using > our library, because XML is just plain unwieldy. > > thanks > > ron >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Jan 31, 2006 at 03:25:58PM -0600, Anthony Liguori wrote:> Hi, > > I wanted to give the list a heads up about something a number of us > discussed at the recent XenSummit. > > We would like to simplify Xend by utilizing more of the standard Python > library and relying on less of our own code. The most obvious thing > here is the current S-Expression/HTTP RPC interface. We would like to > replace this with XML-RPC using Python''s builtin support (xmlrpclib and > SimpleXMLRPCServer). > > I''ve got some initial code and more details on the wiki > (http://wiki.xensource.com/xenwiki/Xend/XML-RPC). Early estimates are > that this would reduce the code in Xend by about 33% (5k slocs). We > would also like to standardize this XML-RPC interface so that > third-parties write apps to this interface without worrying about > massive breakage. > > Thoughts?Going to XML is fine by me, the only drawback I can think of is in term of versatility and larger (but stabler) dependancies. To be a bit more explicit on the first point if you pass an S-exp it''s some kind of free form function call, the caller may pass more arguments or a slightly different set without breaking fundamentally the interface, the callee may still be able to extract the set of informations he needs to prepare the call, the same applies in terms of result set too. Think about the call gathering informations about a running domain, version 4.0 of xen may return a superset of what 3.0 returns without harming 3.0 based clients, so there is clearly some added flexibility compared to a normal RPC operation. On the other hand being able to feeze a clear RPC based API would be a good sign, that we know exactly how we intend to keep the APIs in the future. And when it comes to the final API design, the current ones are IMHO too name oriented when it comes to naming domains, I would really prefer the final XML-RPC ones to be more id and uuid oriented, as I think they are more safe (especially when one considers the rename capacity, this may lead to numerous races between the time one client does the uuid -> name resolution and the next name based next call). thanks for starting this ! Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Jan 31, 2006 at 02:36:43PM -0700, Ronald G Minnich wrote:> Anthony Liguori wrote: > >Hi, > > > >I wanted to give the list a heads up about something a number of us > >discussed at the recent XenSummit. > > > >We would like to simplify Xend by utilizing more of the standard Python > >library and relying on less of our own code. The most obvious thing > >here is the current S-Expression/HTTP RPC interface. We would like to > >replace this with XML-RPC using Python''s builtin support (xmlrpclib and > >SimpleXMLRPCServer). > > > >I''ve got some initial code and more details on the wiki > >(http://wiki.xensource.com/xenwiki/Xend/XML-RPC). Early estimates are > >that this would reduce the code in Xend by about 33% (5k slocs). We > >would also like to standardize this XML-RPC interface so that > >third-parties write apps to this interface without worrying about > >massive breakage. > > > I think moving from s-exp''s to XML is a bad move. If you want, use your > s-expression library from LANL; it''s used worldwide, and has done the > job for a lot of projects. > > I know of at least one project that moved from XML to s-exp''s, using our > library, because XML is just plain unwieldy.Firstly, Anthony, apologies for not writing up the conversation that we had at the Xen Summit. I am currently on vacation, and will write it up when I''m back at work (though it looks like you''ve got most of it on the wiki already). On the subject of the proposed changes themselves -- the issue is not just a replacement of s-expressions with XML, but with the whole protocol layer with one based upon XML-RPC -- i.e. with standardised marshalling as well, and often stub generation from an interface definition too. This should mean that there''s less code for people to write when they wish to interface with Xend (as with Redhat''s libvir or IBM''s in-house work) as XML-RPC libraries already exist for every mainstream language, AFAIK. Yes, there is an s-expression library available from LANL, but that only gets you half the advantages that moving to XML-RPC would bring, as you would still have to implement the message dispatch and argument demarshalling. As Anthony says, a further advantage is inside Xend, where we can use the existing SimpleXMLRPCServer to implement the server-side messaging layer, significantly reducing the size of Xend. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel