Micro services, nice to meet you

Dafna Ehrman
3 min readMay 29, 2022

--

I used to work on a big monolith. Working on a monolith in a micro services programming world is challenging

Monolith is a challenge. An even bigger challenge is becoming the owner of it after a period of time developing it. More than that, is working on the kind of a monolith that was the key ingredient for couple of different projects. As the owner I was in charge of introducing the code to developers and project managers from total different teams, beside the fact that I was almost the only developer working on its main features.

While trying to upgrade the introducing task into a more efficient one, my main thought was - I should refactor this into micro services. It was clear to me that so many lines of code shouldn’t be served together in such a way. At that point I realized that refactoring is not gonna happen (at least not at the moment), and my attitude was - let’s find a different way to get to know what everyone is talking about.

Photo by Danist Soh on Unsplash

The first step was easy, choosing a programming language. For a long time I wanted to sharpen my Python skills. Although the performance may not be the best for any purpose, it was definitely the best for my learning experience. Such a popular language and big community is a good starting point.

I started looking for tutorials and found some great ones (links are attached). I realized that the two common platforms for micro services with Python are Django and Flask. Time to make decisions!

Here I got to the ultimate perfectionist’s dilemma, how to choose between two guys before dating any of them? One of my ways to deal with it is to simulate ‘what if’ situations. How would it be to choose Django, how would I start. It turned out that the start with Django is the best part about it. It has the full experience of a well served platform. Very fast I got to the feature I like the most about Django - the admin page, which I will get to later. But here comes the moment when I started to flirt with Flask - when I needed flexibility. Of course I wanted the service to be my way, and it wasn’t always the easiest with Django.

After my main course of practicing micro services skills, a nice bonus for me was the use of Docker, which kept things easy and simple. There is nothing better for running a lightweight micro service than running it on his best friend, a light weight Docker container.

About the admin feature of Django, I will just get you to know the first line introducing it in the Django site:

One of the most powerful parts of Django is the automatic admin interface. It reads metadata from your models to provide a quick, model-centric interface where trusted users can manage content on your site.

I must say I was impressed from how easy is it to implement that specific feature.

Tutorials links for readers and watchers:

https://www.fullstackpython.com/microservices.html

--

--

Dafna Ehrman
Dafna Ehrman

Written by Dafna Ehrman

Senior Backend Engineer @ Moovit

No responses yet