As a network administrator, I’m always looking for ways to make our sites quicker and more efficient. Our development teams are constantly using new technologies to create quick, responsive sites, but I’m most excited about a big change that will help us across the board. We’ve talked before about what our change to the MEAN stack from a .NET framework will mean for us and our clients, but we want to show how we’ll be implementing that in development.
Feel the Power
When we saw the power that was behind Node.js, we knew we had to harness that power for ourselves and our clients. For us, this means a lot of big changes and a lot of work. Since we’ve been a .NET shop for more than a decade, we are transitioning away from the WISA stack (Windows, Internet Information Services, SQL server, ASP.net) to adopt the MEAN stack (MongoDB, Express, Angular, Node) as well as incorporating Linux as our new development environment.
Major changes like this are never easy, so why would we bother making this colossal swap? The answer to that is simple: for unparalleled power and speed.
Node.js (or simply Node) is based on Google’s V8 runtime engine and is written entirely in C code. The simplicity of the code is one part of the speed equation, but we’re most excited that Node applications are created with entirely non-blocking code. This means that unlike other languages, Node applications will not need to wait for each line of code to finish executing before the next begins.
This asynchronous design structure gives Node an extra boost of speed during loading. So rather than waiting for individual server queries before sections of the page begin to load, we’ll be able to create sites that execute quicker and more seamlessly.
All Your Database
Node offers a huge advantage, but it’s only the first piece of the puzzle that is the MEAN stack, and the one I’m most excited about (as a support guy) is MongoDB. For anyone unfamiliar with MongoDB, it’s a far cry from the SQL server that we all know and love to hate.
MongoDB is what is known as a document database. Unlike relational databases (SQL server, MySQL, etc.) document databases use NoSQL, which was created to fix many of the issues with SQL. NoSQL provides MongoDB with a performance-driven model that is extremely scalable and can easily cope with large volumes of structured or unstructured data. Since our agile web development process is built around constant iteration and change, this flexibility is crucial to launching healthy projects.
Express.js and Angular.js are both frameworks that assist in the development and testing of Node applications. Both frameworks also provide additional functionality making the MEAN stack extremely versatile. With Express.js and Angular.js, we can write less code to do the same things in Node, which converts to an even faster load time for our web applications.
The core benefit of these frameworks will be future-proofing our code base. While our previous code base is fragmented between multiple programming languages to accomplish individual tasks, our new projects will be streamlined in a single language. The simplicity of our new code will become an incredible strength for our development teams and our clients.
Migrating to Linux
The final part of this great migration is the operating system. While Node can perform properly on a Windows server, the only way to truly unlock the potential that the MEAN stack provides is to run all of this on a Linux server.
Linux provides a much more efficient operating system, which means you get much more power from your hardware than Windows could ever provide. While Windows server 2012 could use up to 2 gigabytes of your servers RAM for the operating system alone, an Ubuntu server wouldn’t need more than 64 megabytes of RAM to run*. This means savings on hosting hardware as well as savings on hosting software since this new stack is comprised entirely of free and open source software.
We’ll be officially launching our transition to the MEAN stack this weekend, but it has already presented many interesting challenges for us. As a network admin, my biggest challenge has been moving from a Windows environment to working in Linux. I personally have sufficient Linux experience to do what I need to do, but I am in a unique position, and much of our staff started this transition with little more than a cursory knowledge of Linux.
As we slowly trade in our graphical tools for command line alternatives, we all find ourselves getting closer and closer to becoming experts in Linux.
With big changes coming soon, the 352 DevOps team, myself included, have been working hard to familiarize ourselves with all of these new technologies to ensure that we know them inside and out by the time we start development. As we navigate these uncharted waters, we hope to post updates along our journey along with any tips and tricks we learn with the hopes that anyone else considering a similar transition can benefit from the lessons that we learn as we make the swap from Windows to Linux.
* Numbers provided by minimum requirements for windows server 2012 and Ubuntu server.