<div>
Again, thanks Paul. Some sound advice.
</div><div><br></div><div>Once we've decided on an approach I'll post again to let people know what we've done. Might be useful for the next guy.</div>
<div><div><br></div><div>Cheers.</div><div>-- </div><div>Ed James</div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>
<p style="color: #A0A0A8;">On Friday, 7 September 2012 at 10:17, Paul Robinson wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>On 7 Sep 2012, at 09:02, "Ed James (Alt)" <<a href="mailto:ed.james.spam@gmail.com">ed.james.spam@gmail.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div>The scripts do sometimes fail, but they are restarted by a monitoring daemon. The issue is not that they sometimes fail and restart (which they do), but that once our changes are deployed the way these jobs process data will change.</div></blockquote><div><br></div><div><br></div><div>Can I suggest then a dual setup going into separate databases? One doing it the old way, one doing it the new way? This means that if you need to get back to the old way, your old processes will have been busily working away keeping your old DB ticking along. A few weeks after you're sure you never need the old processes, you can clear them - and their data - out of the way.</div><div><br></div><div><br></div><blockquote type="cite"><div>The Beta environment allows us to see application changes in a production environment using live data. It means we don't always have to put new beta features behind things like beta flags or introduce conditions into the code. This is quite common practice as far as I know (Facebook do something similar). </div></blockquote><div><br></div><div><br></div><div>To me it feels... odd. It might be common practice, it might even be useful, but it sounds like you're using it as a means to get around the fact you don't have UI test coverage (indicated below), which seems strange.</div><div><br></div><div>There has to be UX testing, and product owner sign-off and all that, but doing it with live data, using the same production data set as your live production deployment seems to me to be a little like trying to juggle chainsaws: it's pretty clever, until it all goes wrong, and then you're just left with a bloody mess... :-)</div><div><br></div><div><br></div><blockquote type="cite"><div>Using production snapshots in a staging environment gives us real data to play with. Test data can only take you so far, because you have to create that test data.</div></blockquote><div><br></div><div><br></div><div>Completely agree with this, and there's only so many tests you can write to emulate people clicking random things in ways you never anticipated.</div><div><br></div><div><br></div><blockquote type="cite"><div>There are also parts of our system (mainly the UI) that are not covered by automated tests (I know…). Our application is several years old and the database snapshot is over 2GB. Using snapshots also means when we deploy to our staging environment we are testing the deployment itself.</div></blockquote><div><br></div><div><br></div><div>That seems reasonable, providing you've got measures to protect live users from getting confused by it. I've been wary about this approach before because I've seen situations where staging servers populated with live data suddenly start firing off emails to live users because observers in the staging environment are firing, have valid SMTP capability, and real world email addresses in the DB :-)</div><div><br></div><div><br></div><blockquote type="cite"><div>Yes, while it would be technically possible to roll back, it's just not feasible. We would lose data (i.e. money) and our users would also lose statistical data. We also have a large number of tables and a fairly complex schema, so restoring data integrity post-rollback would also be a very tricky task, and something we want to avoid having to do.</div></blockquote><div><br></div><div><br></div><div>In this particular circumstance I'd go with a dual database setup if possible - one which is mimicking old behaviour, one which is your new behaviour. Have your background workers write to both for a little while, and that way you've got a bit of security if you need to roll back - your data is still being written in the old way for at least a couple of weeks until you're happy.</div><div><br></div><div>That doesn't stop you doing all the other stuff you're doing with staging/beta, etc. - it just gives you an extra level of safety.</div><div><br></div><div>Paul</div><div><br></div><div>_______________________________________________</div><div>Chat mailing list</div><div><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></div><div><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>