DEV Community

From Monolith to Microservices in One Year

Kristijan Kanalaš on July 18, 2019

So, there I am a year ago, living a carefree life working on a legacy monolith — a codebase written in CodeIgniter 2. Not the best framework in the...
Collapse
 
archtaqi profile image
Muhammad Taqi

Very well written, I'm also working in Micro-services env with symfony. We use Symfony console components to keep the data sync btw the services. Now as the arch is scaling it's becoming bit challanging. I wonder that Cron-Manager is for this thing? Can you explain bit about that also?

Collapse
 
kristijankanalas profile image
Kristijan Kanalaš

Thank you, sorry it took a while to reply.

Sure, I would love to explain it. So if a service has to do some data sync or garbage collection we would write a command inside that service and in Cron Manager we would set up a cron that would send a message to RabbitMQ queue and the consumer inside the said service would trigger the command. For now it proved to be a pretty good solution for scheduling tasks in services.
The cron manager has an option to trigger an endpoint too but it is somewhat cleaner to have stuff separate, in commands and to trigger them with RabbitMQ.

We have a cron manager open sourced but it's still in development and doesn't have documentation but if you want to have a look here is the link github.com/Vodzo/docker-cron-manager

Collapse
 
spuhpointer profile image
spuhpointer

Check the Enduro/X middleware, it has some nice microservices concept, basically it is C/C++/Go/Java application server, which allows to start several executables where each executable offers services. Number of copies started for each binary is configurable. All calls to services are load balanced. Binaries are governed by Enduro/X, start, restart operations are managed by server. There are transparent clustering options. These concepts comes from XATMI api standart, which has already 20 years and more :)

Collapse
 
kristijankanalas profile image
Kristijan Kanalaš • Edited

Thanks for advice I will check it out for sure. Currently we are using kubernetes with rancher and are very happy with it for now, but as I said I will check it out :)

Collapse
 
fmertins profile image
Fernando Mertins

Hi there, great post, thanks!
Any suggestion for other developers (like me) when moving from CodeIgniter to Symfony? These days I'm using CI 3, Composer and some namespaces with my own classes.
All the best!
Fernando from Brazil

Collapse
 
kristijankanalas profile image
Kristijan Kanalaš

Thank you for reading the post. 😊

Only one major advice comes to my mind.
At my company we often joke how CI is an mvc framework but altho it looks like you are writing object oriented code you end up writing procedural code. So when you jump over to Symfony be patient and give yourself time to get used to writing real object oriented code. Symfony has a good documentation, reading it helps a lot.

Collapse
 
thevetdoctor profile image
Obafemi

Beautiful and very encouraging. I hope to get a remote job soon. I live in Nigeria.

Collapse
 
kristijankanalas profile image
Kristijan Kanalaš

Thank you! :)

I wish you luck in finding a job and if you ever need some help feel free to contact me, I followed you back.

Collapse
 
thevetdoctor profile image
Obafemi

Thanks. Am open to remote jobs. I work with JS, Python, PHP. Fullstack. SDLC.

Collapse
 
jodyshop profile image
Waleed Barakat

Nice story, but what is the final product? And how you planning to monetize it?

Collapse
 
kristijankanalas profile image
Kristijan Kanalaš • Edited

Hi Waleed, thanks for the comment.

The final product is a software for applicant tracking. In ideal world we would monetize it as a SaaS but as we are a job board our clients get to use the software for free when they buy a job ad. For now we will try to come up with cool features and eventually have a paid tier for our software.

Demo

Collapse
 
nebojsac profile image
Nick Cinger

Awesome write up! Love seeing real-world use cases for microservices, especially with a monolith starting point. Thanks for taking the time to write it :)

Collapse
 
kristijankanalas profile image
Kristijan Kanalaš

Thank you for reading it, I hope the information can be useful to you in the future. 🙂