Moving From Monolithic To Microservice Architecture: A Case Study
There were numerous cases when MobiDev was addressed to promptly augment an in-house team to build a software product together. For some clients, MobiDev evolved standalone software products into a single ecosystem. It was done under a robust technology stack, which offered the simplest solutions to the most challenging technical tasks. Today's case involves both of these situations.
GrowthHackers is a community of marketers and growth professionals who use modern methods and analytics for business development. When they addressed us, they had an in-house team that included a designer and several software developers, and two software products. The first one was Community, a social blog based on WordPress and PHP. The second one was Projects, a Ruby on Rails-based web product at the earliest stage of its development.
MobiDev allocated a dedicated team of software developers and QA engineers to join the in-house GrowthHackers team. As our mutual efforts progressed, both products gradually exceeded the initial functionality, reliability, and scalability. Currently, the entire system has undergone transitioning to microservices, as well as enhanced with implemented testing and deployment. Therefore, support and maintenance require considerably less effort. Frequent and stable product deliveries ensure minimal time to market.
How did we achieve all this? Read the story to find it out in detail!
How it started
MobiDev started work with GrowthHackers in September 2014. They had an urgent need for team augmentation. Search for in-house candidates would take too much time and would be too costly in the future. Instead, they opted for a reliable remote team. Finding one is always a challenge, and the client was quite careful in that respect. GrowthHackers required professionals that would form a team with flexible, close, and long-term collaboration processes. They needed to ascertain our reliability and ability to deliver products continuously, on time and budget. Nothing should be unforeseen or unexpected. That's what most businesses value.
Quick testing, release, integration, then feedback and quick changes according to the current needs of users, with the stability of the live product kept intact. Agile development principles were put to practice from the very start.
As we mentioned above, GrowthHackers comprised two major software products that we worked on:
• GrowthHackers Community brings its members exclusive content (e.g. real-life cases, growth stories and best practices), opportunity of discussions, and plenty of fellow contributors, including famous guests and representatives of well-known companies, including NASA and Twitter.
• GrowthHackers Projects, to quote GrowthHackers themselves, is "a purpose-driven software to help teams achieve their growth objectives" and "to support fast paced growth teams in a rapidly changing environment." Here's a short and engaging promo video about it.
Moving to microservices and Ruby on Rails
We had the task of supporting the already popular Community website. When it came to new functionality and scalability, the limitations of a WordPress-based blog became evident. A redesign was necessary as well. Our primary goal was to overcome this technological dead end. Our first forward-looking suggestion concerned decomposing monolith to microservices and rebuilding Community with Ruby on Rails. It would unify all the elements of the entire system, free it from technological limitations and provide all the speed and capabilities RoR is renowned for. The only potential issue lay in performance; however, we suggested optimization of interactions with smart caching and use of Redis. This solution was approved, and easy data migration ensured smooth transition to a flexible architecture based on microservices.
The initial problem of distributed tasks between teams was simply solved by splitting responsibility for different microservices between teams. We synced and parallelized our efforts, keeping up with the pace of updates and standardizing all processes. Tools like Jira and HipChat were quite helpful. Quality Assurance was correspondingly active: like, regression testing in the morning and release in the evening. Quite soon it was clear that MobiDev was exactly the right kind of software partner that our Clients had looked for.
Taking the system to the next level: growth and automation
Before migrating to microservices, the monolith product architecture of GrowthHackers was quite simple.
The system gained auxiliary software as its functionality was growing. The main parts of the system included user authentication service, integration service, billing service, marketing and conference-related websites. These parts required different procedures of testing and deployment. They had to be launched simultaneously and interact seamlessly as a system. The use of Docker provided us with high-performance virtual containers, with larger products divided into interacting microservices.
The products had an intense release cycle—at least twice a week. We had 2 weekly calls with CTO, usually on Tuesday and Thursday. Of course, we remained available for the remainder of the time.
Automation of testing and deployment became crucial to this system. Initially, the products were based on different cloud platforms, which naturally required separate setups. We decided to migrate and unify the system under Heroku and PostgreSQL.
One of the vital solutions was Semaphore. This is how it works: deployment is executed according to the queue. The code is pushed, the processor (Worker) runs the tests, and deployment of the product is reduced to a pushed button. What might be even more important, it eliminates errors and brings absolute stability to deployment.
The crowning achievement is the use of Domain Driven Design. The Trailblazer library allowed us to implement DDD on RoR, and we divided the business logic into entities: card, project, integration, and so on. The entire architecture was based on the subject matter and these entities. It meant that any new team member—or even an entirely new team—would be able to study the project very quickly. Needless to say that documentation was properly maintained for the same reasons.
After moving to microservices, the new architecture became a new level for the product and for the entire GrowthHackers world.
As you can see, the main characteristic of this system is its continuous evolution: not only in terms of functionality, but technology just as well. Here is the list of technologies currently applied for this project.
Front End: Angular, Webpack, Vue.js
Back End: Ruby on Rails, MySQL, PostgreSQL, Redis, Trailblazer, Microservices, Active Admin, Capybara, Sidekiq, EventBus, Selenium, Rspec, MiniTest
Integrated 3rd-Party Services: Pivotal, Twitter, Clearbit, GUA, Segment, Optimizely, Jira, Kissmetrics, Logentries, Papertail, Algolia Search, Embedly, Rollbar, Stripe, Buffer, Slack, HipChat, Zapier, Sentry
Automated Deployment & Cloud Hosting: Docker, Vagrant, Ansible, Heroku, Codeship, Semaphore, Monit, Capistrano, AWS
Both products were designed for desktop browsers, and Google Chrome was the main priority. Besides that, full Community support and partial Projects support were added for mobile devices.
The Client's impressions
We were glad that GrowthHackers found a reliable team in us: a dedicated team that made them feel no physical distance between. From the very start, we quickly joined forces with the existing team and worked steadily ever after, involving experts in cases of need. We actively participated in the product development with ideas. They did not hesitate to entrust us with complex tasks. They were glad they found us, and our efforts, processes and ability to work hard and fast were recognized as essential for their business.
Nothing is better than a personal recommendation, so we would like to end this case study with the Client's tweet that speaks for itself.
July 09, 2018
Forget about the hype: by 2020, the Internet of Things is predicted to generate an additional $344B in revenues, as well as to... more →
July 06, 2017
Hello again! It's time to continue the making of Pluto the Robot. Since the events described in Part I and Part II, our Pluto has... more →
September 26, 2016
RedRoute is on a mission to help people make the most of their free time, by connecting them to the people and places that... more →