Our tech team uses a process similar to the Github Flow, whereby all changes are pushed to the main branch
of a repo by way of Github pull requests. We use this internally, but it is also the most common mechanism for open source projects to get community contributions on Github. We think it’s a great way to encourage code reviews and incremental improvements prior to going into a main production pushable branch, however it’s not without its pain points.
While experimenting with Node.js for a coding game we are working on called Node Defender1 for the Ultimate Developer Conference, many asynchronous problems arose that we were unaccustomed to dealing with since we are primarily a PHP shop (read: synchronous). The examples covered in this post are specific to MongoDB, but the essence can be applied to any asynchronous process.
A while back we open sourced Mongounit, a PHPUnit extension for testing models utilizing mongodb. One key issue that we’ve discovered as we incorporate MongoDB into more of our data models is that extending Mongounit’s TestCase class limits that unit test towards Mongo only as the datasource. Since only a portion of our data is in Mongo while the remaining is in MySQL, limiting a test case to work with one datasource or another is too limiting.