On Fri, Jun 18, 2010 at 6:27 PM, Tarek Ziadé <span dir="ltr">&lt;<a href="mailto:ziade.tarek@gmail.com">ziade.tarek@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On Fri, Jun 18, 2010 at 6:44 PM, Ian Bicking &lt;<a href="mailto:ianb@colorstudy.com">ianb@colorstudy.com</a>&gt; wrote:<br>
&gt; With all the reliability discussion, I thought I&#39;d offer a kind of<br>
&gt; counterproposal, that we rewrite PyPI to use App Engine.<br>
&gt;<br>
&gt; Of course, this means writing code, etc., but I believe this is a reasonable<br>
&gt; goal.  I think if &quot;we&quot; (Catalog-SIG?  PyPI maintainers?) committed to using<br>
&gt; such an implementation (assuming it was of good quality) that we could find<br>
&gt; people (probably not on this list) to write and maintain the code.  People<br>
&gt; have already rewritten PyPI a couple times, but no one knows what exactly to<br>
&gt; *do* with the rewrite so they haven&#39;t gone anywhere.  And PyPI is not a<br>
&gt; particularly complicated application.  I think we can set the bar high on<br>
&gt; the implementation quality and that people will meet it, so long as they<br>
&gt; know their effort won&#39;t be in vain.<br>
<br>
</div>Out of curiosity : have you ever worked with the current implementation ?<br>
<br>
I have hard time to understand why some people say it&#39;s hard to work with it,<br>
I don&#39;t think its a valid argument.<br></blockquote><div><br>I haven&#39;t looked at it in years, but I&#39;ve poked around it some.  I found it difficult, yes.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">&gt; Why App Engine?  The primary reason I&#39;m proposing it is because it will be<br>
&gt; much easier to manage.  If it runs out of memory it won&#39;t bring down a<br>
&gt; machine.  If new people maintain the system it&#39;s easy to describe how to do<br>
&gt; deployments, for instance.  It&#39;s easy for people to install their own PyPI<br>
&gt; instances for development and to generate patches.  Hosted services can have<br>
&gt; downtimes of course, but unlike currently there are other people (the App<br>
&gt; Engine maintainers) who will resolve those problems.  There&#39;s still a class<br>
&gt; of bugs like badly indexed tables or weird locking issues that could bring<br>
&gt; PyPI down and &quot;we&quot; would have to fix it, and with a rewrite there&#39;s more of<br>
&gt; a risk of that, but... it&#39;ll just take some testing to make sure things are<br>
&gt; okay.<br>
&gt;<br>
&gt; In terms of cost, I expect we can get free hosting, and packages can be<br>
&gt; stored directly in the data store.  That doesn&#39;t preclude using a CDN like<br>
&gt; CloudFront, but that can be handled separately.  Also since the index just<br>
&gt; links to packages, packages can be incrementally uploaded to a CDN.<br>
<br>
</div>Even if I don&#39;t think its a priority in our concerns (community<br>
mirrors come first), I wouldn&#39;t mind having the main PyPI UI in GAE.<br></blockquote><div><br>The priorities that motivate me are:<br><br>1. Make installation more reliable with respect to PyPI<br>2. Decrease overall maintenance burden<br>

3. Decrease code liability<br><br>Community mirrors only address 1 while App Engine addresses 2 and a rewrite addresses 3.  And I think App Engine would be significantly more reliable than PyPI with mirrors.  It&#39;s less moving parts, and it&#39;s built on infrastructure that is highly automated.  Also because it requires less maintenance, if someone drops out of communication for a while or goes on vacation or something, it&#39;s not something that needs active tending.  <br>

<br>There&#39;s a significant number of failure conditions that a mirror network doesn&#39;t protect you from.  Connection refused, connection timed out, and 500 errors are the only really obvious errors that will make a tool look to the next mirror.  Because of potential synchronization problems there&#39;s a lot of new problems a mirror network could introduce.<br>

<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Although, if PyPI was to be ported to GAE, couldn&#39;t we reuse the<br>
existing code instead of rewriting from scratch ? we would just have<br>
to rewrite the DB layer.<br></blockquote><div><br>I don&#39;t think it&#39;s worth reusing that code.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">
&gt; Besides a commitment to using the code (which I think is really important to<br>
&gt; motivate people), a scrubbed dump of the database would be really helpful<br>
&gt; for development.  I know we&#39;ve passed around complete dumps to people, but<br>
&gt; it contains private information so we can&#39;t put it up publicly which creates<br>
&gt; a speed bump for developers.<br>
<br>
</div>Private information could be easily removed from those dumps;<br>
<br>
But I don&#39;t think it&#39;s so helpful since you have all the .sql scripts to create<br>
your own DB. But we could add a script to create some sample data on<br>
the top of those scripts.<font color="#888888"><a href="http://ziade.org" target="_blank"></a><br></font></blockquote><div><br>It&#39;s useful to have a representative data set to test with, especially for stuff like performance testing.<br>

</div></div><br>-- <br>Ian Bicking  |  <a href="http://blog.ianbicking.org">http://blog.ianbicking.org</a><br>