<div dir="ltr"><div><div>I was thinking about the design here and I wanted to share some thoughts.<br><br></div>For the MVP, I think a publisher implemented by a plugin developer would write all files into the working directory and the platform will "atomically publish" that data into the location configured by the repository. The "atomic publish" aspect would copy/stage the files in a permanent location but would use a single symlink to the top level folder to go live with the data. This would make atomic publication the default behavior. This runs after the publish() implemented by the plugin developer returns, after it has written all of its data to the working dir.<br><br></div><div>Note that ^ allows for the plugin writer to write the actual contents of files in the working directory instead of symlinks, causing Pulp to duplicate all content on disk with every publish. That would be a incredibly inefficient way to write a plugin but it's something the platform would not prevent in any explicit way. I'm not sure if this is something we should improve on or not.<br><br></div>At a later point, we could add in the incremental publish maybe as a method on a Publisher called incremental_publish() which would only be called if the previous publish only had units added.<br><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 17, 2017 at 4:22 PM, Brian Bouterse <span dir="ltr"><<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>For plugin writers who are writing a publisher for Pulp3, what do they need to handle during publishing versus platform? To make a comparison against sync, the "Download API" and "Changesets" [0] allows the plugin writer to tell platform about a remote piece of content. Then platform handles creating the unit, fetching it, and saving it. Will there be a similar API to support publishing to ease the burden of a plugin writer? Also will this allow platform to have a structured knowledge of a publication with Pulp3?<br><br></div><div>I wanted to try to characterize the problem statement as two separate questions:<br><br></div><div>1) How will units be recorded to allow platform to know which units comprise a specific publish?<br></div><div>2) What are plugin writer's needs at publish time, and what repetitive tasks could be moved to platform?<br><br></div><div>As a quick recalling of how Pulp2 works. Each publisher would write files into the working directory and then they would get moved into their permanent home. Also there is the incrementalPublisher base machinery which allowed for an additive publication which would use the previous publish and was "faster". Finally in Pulp2, the only record of a publication are the symlinks on the filesystem.<br><br></div><div>I have some of my own ideas on these things, but I'll start the conversation.<br><br>[0]: <a href="https://github.com/pulp/pulp/pull/2876" target="_blank">https://github.com/pulp/pulp/<wbr>pull/2876</a><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div>-Brian<br></font></span></div>
</blockquote></div><br></div>