For the last 10+ years I’ve primarily been a C# / .NET developer. This ecosystem is great, there are thousands of great packages available. The one thing that’s been irritating me of late is the challenge of running .NET in containers such as Docker.
This undertaking began as an offer to help a friend out with a project he had been working on in his spare time. His prototype was working well but I didn’t think it would scale too well, so I offered to help refactor it a bit. This is when I got entirely carried away and picked a whole new tech stack.
Before, The original stack
MySQL, PHP, jQuery, Python
The original codebase worked fine, but in my eyes I could pick a couple of key areas where scaling or supportability was going to become challenging.
After, The ambitious new stack
MongoDb, Redis, Auth0, NodeJs, ExpressJs, Angular 2, Docker, Rancher, Drone, Azure
- Embrace the container world:
- Smaller services and decoupled architecture is great - there’s much less you need to keep in your head.
- The ability to add new data providers or other integration services at a later date without redeploying the whole solution has been great.
- The isolation of containers means you can test a lot more on a local development environment.
- Be aware of the pricing model of PaaS offerings. We have a BizSpark subscription, so I decided to use Azure DocumentDb with MongoDb support enabled. The problem with this approach is that you pay per collection! This meant that with 4-5 collections, our monthly credit rapidly ran out. I ended up using mLab’s hosted MongoDb for the time being to avoid having to set up a MongoDb cluster.
- Adopting new frameworks (Angular 2) is great, but be ready for instability and a constantly moving foundation. In a 2 month period the Angular 2 project changed the way the router worked and switched from SystemJs to Webpack for builds. The changes themselves are probably only 20% of the pain, you spend 80% of your time finding blog posts with answers to obsolete problems.
- When working on a startup project, don’t build stuff you don’t need to. There are so many services out there with free or low cost tiers:
- Auth0 for authentication, rather than dealing with the hassle of running a password database and all the associated work for resets and verifications - outsource that problem!
- mLab for MongoDb hosting. I’m no MongoDb expert, so I would rather not run my own instance just yet. (especially on Docker where I’m unsure of the failure modes)
I’m going to do some follow up posts on some of the details here. In particular Drone and Rancher.