Moving Away from Monolithic Architecture 👋🏾

Faith Chikwekwe
Jan 22, 2019 · 5 min read
Image for post
Image for post
Nature has no problem with using monolithic architecture every once in a while.

When learning to develop web applications, many times a programmer will begin by creating their server-side architecture monolithically. This program structure is exactly what it sounds like: a monumental chunk of code or the proverbial “big ball of mud.”

There are a lot of large, successful companies whose main product started as a large pillar of uniform code such as Google, Netflix and Amazon. However, for reasons that this article will discuss, all of these companies have moved to multiple server-side executable programs with microservices and APIs that serve different portions of the given application.

We are going to discuss why it is a good idea to move away from the traditional, monolithic server-side structure to service-oriented architecture as you continue development on a program. We will even go over why it might even been a good idea to start out using microservices early in your development process.

Image for post
Image for post
Writing good, clean code is hard to do.

Why is Monolithic Architecture Still a Thing? 🤷🏾‍♀️

Image for post
Image for post
FoodPrint, an environmental app by Panda Dreams.

Learning by Using Monolithic Architecture 📝

Another reason why you might stick with a monolithic model, is that it is much easier to write tests with good coverage for all of your endpoints. If you analyze the code and documentation for FoodPrint, you’ll see that I have complete test coverage for the various endpoints represented. Since all of the HTTP requests and other logic are contained in one place, thinking about possible edge cases and handling issues is as simple as switching files. When you are still new to development, this can help problems to remain accessible.

Image for post
Image for post
Technical debt is not fun. Its also avoidable if you know what to do.

Why use Service-Oriented Architecture? 🤔

Image for post
Image for post
Bugs, crashes and security risks all loom large over the monolithic application.

Reducing Crashes and Overall Downtime 💪🏾

Recently I created another app called name-ly. Its a name generator which creates unique names for the user, giving them the option to save names they like to their profile, or browse names that others have saved. This application was built with two parts: the main web application and a Markov model microservice to create the unique names. While the main function of the application (taking a quiz to get unique names) is dependent on both the microservice and the web app to work, if there were a serious bug in the Markov chain, the user’s profile and saved names within the web application would not be affected. Likewise the microservice functions as a separate API, accessible outside of the main name-ly app. If I took name-ly off the web, a developer would still be able to use the name-ly API’s documentation to get unique names sent via POST request.

Image for post
Image for post
Growing as a developer means better, more modular code that can stand the test of time.

Having grown as a developer over the last several months, name-ly is my most modular program yet. As I continue to fix bugs that come up and add features to the program, I know that I will have less technical debt to deal with since I decided to create and use a microservice for this application.

What about you? Are there any other benefits to service-oriented architecture you’d like to discuss? Do you have any stories of your growth as a developer while learning the benefits of enhanced design?

Faith Chikwekwe is a back-end web developer and data engineer who is currently leveling up her skills at Make School and looking for internships in the San Francisco Bay Area.

Image for post
Image for post

This story is published in The Startup, Medium’s largest entrepreneurship publication followed by +414,678 people.

Subscribe to receive our top stories here.

Image for post
Image for post

The Startup

Medium's largest active publication, followed by +771K people. Follow to join our community.

Faith Chikwekwe

Written by

Software Engineer. Currently in the language development space. Passionate about well-documented code and open source.

The Startup

Medium's largest active publication, followed by +771K people. Follow to join our community.

Faith Chikwekwe

Written by

Software Engineer. Currently in the language development space. Passionate about well-documented code and open source.

The Startup

Medium's largest active publication, followed by +771K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store