<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Time to revise the subunit protocol</title>
	<atom:link href="http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/feed/" rel="self" type="application/rss+xml" />
	<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/</link>
	<description>Someone near you is coding</description>
	<lastBuildDate>Fri, 12 Apr 2013 02:40:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: rbtcollins</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1831</link>
		<dc:creator><![CDATA[rbtcollins]]></dc:creator>
		<pubDate>Fri, 12 Apr 2013 02:40:04 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1831</guid>
		<description><![CDATA[That is an interesting question; one the one side does the protocol need to know, and the other side is the stream the right unit to assess this on?

Lets consider a related bit of information, what version of a dependency (e.g. subvertpy for bzr-svn) is present when the test run is started.

Further, consider a distributed testing case, where we have two machines A and B both running tests (partitioned from the whole suite). In this scenario we have three streams: A - tests from A, B - tests from B, and C- the multiplexed stream once testrepository has combined the streams. Ideally we could recover this dependency information for any test, regardless of source stream A or B. So, &#039;stream&#039; is the wrong granularity. 

In V2 we have the route_code (or tags could be used for V1 compat) which can uniquely group all the tests for the same context within a stream. So we could associate some structured data with that.

A slightly weaker thing though, that doesn&#039;t need any test support, is to just use an attachment.

Given a subunit v2 serialiser, something like:

serializer.status(file_name=&quot;version-info&quot;, file_bytes=bzrlib.version_info....().encode(&#039;utf8&#039;), mime_type=&quot;text/json; charset=utf8&quot;)

emitted from the test runner will capture that data, and you can recover it at any later point by starting with the test, and then looking for the version-info that matches the route code within the combined stream.]]></description>
		<content:encoded><![CDATA[<p>That is an interesting question; one the one side does the protocol need to know, and the other side is the stream the right unit to assess this on?</p>
<p>Lets consider a related bit of information, what version of a dependency (e.g. subvertpy for bzr-svn) is present when the test run is started.</p>
<p>Further, consider a distributed testing case, where we have two machines A and B both running tests (partitioned from the whole suite). In this scenario we have three streams: A &#8211; tests from A, B &#8211; tests from B, and C- the multiplexed stream once testrepository has combined the streams. Ideally we could recover this dependency information for any test, regardless of source stream A or B. So, &#8216;stream&#8217; is the wrong granularity. </p>
<p>In V2 we have the route_code (or tags could be used for V1 compat) which can uniquely group all the tests for the same context within a stream. So we could associate some structured data with that.</p>
<p>A slightly weaker thing though, that doesn&#8217;t need any test support, is to just use an attachment.</p>
<p>Given a subunit v2 serialiser, something like:</p>
<p>serializer.status(file_name=&#8221;version-info&#8221;, file_bytes=bzrlib.version_info&#8230;.().encode(&#8216;utf8&#8242;), mime_type=&#8221;text/json; charset=utf8&#8243;)</p>
<p>emitted from the test runner will capture that data, and you can recover it at any later point by starting with the test, and then looking for the version-info that matches the route code within the combined stream.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dylan McCall</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1830</link>
		<dc:creator><![CDATA[Dylan McCall]]></dc:creator>
		<pubDate>Fri, 12 Apr 2013 01:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1830</guid>
		<description><![CDATA[What do you think about providing more information about the program being tested as a part of the stream? Just a space to include the program&#039;s name and version (and exact code revision, where possible) would be quite useful. Right now we seem to just assume that a particular subunit stream is for a particular revision of a particular program, but there&#039;s nothing to specify either way. Granted, my measure of that situation is from frantically poking at testrepository / subunit / testtools / bzr to do what I need them to do in a hurry, so I could be missing something obvious :)]]></description>
		<content:encoded><![CDATA[<p>What do you think about providing more information about the program being tested as a part of the stream? Just a space to include the program&#8217;s name and version (and exact code revision, where possible) would be quite useful. Right now we seem to just assume that a particular subunit stream is for a particular revision of a particular program, but there&#8217;s nothing to specify either way. Granted, my measure of that situation is from frantically poking at testrepository / subunit / testtools / bzr to do what I need them to do in a hurry, so I could be missing something obvious <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbtcollins</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1681</link>
		<dc:creator><![CDATA[rbtcollins]]></dc:creator>
		<pubDate>Mon, 04 Mar 2013 10:05:42 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1681</guid>
		<description><![CDATA[It is true, or msgpack or bson or ... however most / all of those options are not designed for even slightly noisey channels. For instance msgpack doesn&#039;t have a checksum itself, and will happily serialise 2GB of data in a single stream - and when reading it back does a single malloc for that rather than chunking it. It is a lot easier to be sure of the semantics if I do the whole stack - though sure, it won&#039;t be as simple as just reusing an existing stack. I ended up doing my own wire protocol definition after having another look around, and it performs acceptably, particularly compared to the (not particularly slow) v1 parser which was line based.

The extensability thing is a mixed blessing. As far as malicious input, there are lots of ways to get things wrong - see the msgpack issue above, which is arguably intrinsic to the msgpack definition.]]></description>
		<content:encoded><![CDATA[<p>It is true, or msgpack or bson or &#8230; however most / all of those options are not designed for even slightly noisey channels. For instance msgpack doesn&#8217;t have a checksum itself, and will happily serialise 2GB of data in a single stream &#8211; and when reading it back does a single malloc for that rather than chunking it. It is a lot easier to be sure of the semantics if I do the whole stack &#8211; though sure, it won&#8217;t be as simple as just reusing an existing stack. I ended up doing my own wire protocol definition after having another look around, and it performs acceptably, particularly compared to the (not particularly slow) v1 parser which was line based.</p>
<p>The extensability thing is a mixed blessing. As far as malicious input, there are lots of ways to get things wrong &#8211; see the msgpack issue above, which is arguably intrinsic to the msgpack definition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Pool</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1574</link>
		<dc:creator><![CDATA[Martin Pool]]></dc:creator>
		<pubDate>Thu, 21 Feb 2013 10:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1574</guid>
		<description><![CDATA[(somewhat drive-by comments)

I don&#039;t see anything here that would conflict with using protobufs (or Thrift, or probably Datomic.)

If you want to write your own byte-packing code yourself (maybe to run on a teeny microcomputer), producing protobufs will not be much harder than the format you allude to here.

On the other hand protobufs seem easier in some ways:

- the bottom layer of encoding is already done for people who want to read/write it from a new language
- importantly, probably more safely against malicious input than a by-hand parser
- you get a formal grammar essentially for free
- there is a clear systematic way to add new fields in future, without breaking old peers, which seems likely to be useful]]></description>
		<content:encoded><![CDATA[<p>(somewhat drive-by comments)</p>
<p>I don&#8217;t see anything here that would conflict with using protobufs (or Thrift, or probably Datomic.)</p>
<p>If you want to write your own byte-packing code yourself (maybe to run on a teeny microcomputer), producing protobufs will not be much harder than the format you allude to here.</p>
<p>On the other hand protobufs seem easier in some ways:</p>
<p>- the bottom layer of encoding is already done for people who want to read/write it from a new language<br />
- importantly, probably more safely against malicious input than a by-hand parser<br />
- you get a formal grammar essentially for free<br />
- there is a clear systematic way to add new fields in future, without breaking old peers, which seems likely to be useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbtcollins</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1528</link>
		<dc:creator><![CDATA[rbtcollins]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 22:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1528</guid>
		<description><![CDATA[Disttrial has exactly the buffering I&#039;m looking to fix with this major revision: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.3.0/twisted/trial/_dist/distreporter.py#L87]]></description>
		<content:encoded><![CDATA[<p>Disttrial has exactly the buffering I&#8217;m looking to fix with this major revision: <a href="http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.3.0/twisted/trial/_dist/distreporter.py#L87" rel="nofollow">http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.3.0/twisted/trial/_dist/distreporter.py#L87</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbtcollins</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1527</link>
		<dc:creator><![CDATA[rbtcollins]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 19:55:51 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1527</guid>
		<description><![CDATA[I&#039;ll do a detailed wire protocol - EBNF probably - tomorrow. It is a lot easier to reason about behaviour on the wire IME. I think thats a large reason. I&#039;m also hesitant to use something with arbitrary extensability. I&#039;d like to know where and how it is extending. Perhaps I should use protobufs etc, but then it also increases porting overhead for new languages.

backend and runner and runner and supervisor are ambiguous because testrepository is a runner runner :). The supervisor is a process that has a UI on one side and a number of subunit emitting processes on the other. Those are backends from the supervisor perspective. When the supervisor&#039;s UI is subunit, then the supervisor can act as a backend for another supervisor...

disttrial is indeed interesting, but AFAIK it doesn&#039;t concern itself with muxing, by having a single depth hub and spoke network. Got a link to an english description of its workings?]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ll do a detailed wire protocol &#8211; EBNF probably &#8211; tomorrow. It is a lot easier to reason about behaviour on the wire IME. I think thats a large reason. I&#8217;m also hesitant to use something with arbitrary extensability. I&#8217;d like to know where and how it is extending. Perhaps I should use protobufs etc, but then it also increases porting overhead for new languages.</p>
<p>backend and runner and runner and supervisor are ambiguous because testrepository is a runner runner <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . The supervisor is a process that has a UI on one side and a number of subunit emitting processes on the other. Those are backends from the supervisor perspective. When the supervisor&#8217;s UI is subunit, then the supervisor can act as a backend for another supervisor&#8230;</p>
<p>disttrial is indeed interesting, but AFAIK it doesn&#8217;t concern itself with muxing, by having a single depth hub and spoke network. Got a link to an english description of its workings?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lange</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1525</link>
		<dc:creator><![CDATA[Jonathan Lange]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 14:05:13 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1525</guid>
		<description><![CDATA[Link spam! https://github.com/Datomic/fressian/wiki]]></description>
		<content:encoded><![CDATA[<p>Link spam! <a href="https://github.com/Datomic/fressian/wiki" rel="nofollow">https://github.com/Datomic/fressian/wiki</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lange</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1524</link>
		<dc:creator><![CDATA[Jonathan Lange]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 14:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1524</guid>
		<description><![CDATA[I tried to reply yesterday. tl;dr, NEEDSINFO

- I don&#039;t understand the protocol you are describing. If you could present a packet diagram or a grammar or something that would help a lot.  Maybe some example packets

- Are you developing your own binary protocol anyway? Why? The &quot;Dependencies&quot; section makes it clear that it wasn&#039;t an option for v1, but there seems to be no reason now.

- I&#039;m struggling to follow the &quot;Selecting&quot; case, I think it&#039;s because &#039;supervisor&#039;, &#039;backend&#039;, and &#039;runner&#039; are terms that now carry weight but aren&#039;t defined. 

- `disttrial` has some prior art here. It&#039;s built using AMP, a bidirectional asynchronous binary protocol, which might break a couple of requirements here, but it&#039;s worth mentioning.]]></description>
		<content:encoded><![CDATA[<p>I tried to reply yesterday. tl;dr, NEEDSINFO</p>
<p>- I don&#8217;t understand the protocol you are describing. If you could present a packet diagram or a grammar or something that would help a lot.  Maybe some example packets</p>
<p>- Are you developing your own binary protocol anyway? Why? The &#8220;Dependencies&#8221; section makes it clear that it wasn&#8217;t an option for v1, but there seems to be no reason now.</p>
<p>- I&#8217;m struggling to follow the &#8220;Selecting&#8221; case, I think it&#8217;s because &#8216;supervisor&#8217;, &#8216;backend&#8217;, and &#8216;runner&#8217; are terms that now carry weight but aren&#8217;t defined. </p>
<p>- `disttrial` has some prior art here. It&#8217;s built using AMP, a bidirectional asynchronous binary protocol, which might break a couple of requirements here, but it&#8217;s worth mentioning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbtcollins</title>
		<link>http://rbtcollins.wordpress.com/2013/02/14/time-to-revise-the-subunit-protocol/#comment-1521</link>
		<dc:creator><![CDATA[rbtcollins]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 01:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://rbtcollins.wordpress.com/?p=356#comment-1521</guid>
		<description><![CDATA[And of course I missed buts. Followup on http://rbtcollins.wordpress.com/2013/02/15/more-subunit-needs/.]]></description>
		<content:encoded><![CDATA[<p>And of course I missed buts. Followup on <a href="http://rbtcollins.wordpress.com/2013/02/15/more-subunit-needs/" rel="nofollow">http://rbtcollins.wordpress.com/2013/02/15/more-subunit-needs/</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
