Shereland is a site for sharing books. It is useful for finding what books your friends could lend to you.
It was developed using Python Django, being a good playground for trying new technologies and learning.
But after a lot of new things at my last company, I wanted to change it, using microservices, graphql and Go.
Microservices - I like infrastructure and microservices will help me to make a better infrastructure for my projects.
Graphql - It is awesome. Very easy to update and work with.
Go - Actually, I am still learning. I could make it much faster with node.js and Python. So, I am forcing myself to do things in Go and learn it.
It is composed of 8 Docker images:
- Caddy Server - HTTP Server with Let’s Encrypt (not mine: source)
- Graphql - Front service working as an API (source). It is too big (now) because I added all logic to it. It is supposed to be separated into more microservices.
- Monolithic DB - The database for everything. It is supposed to be split into several databases, one for each microservice (MariaDB).
- MySQL Docker Backuper - Service for backup the database (source).
- Shereland - The Python Django project that I created (closed-source).
- Redis DB - Store users sessions and on future work as a cache.
- Thumbnail - Only for albuns from the blog, using imaginary (not mine: source). Actually, it is temporary. I want the album thumbnail being generated when the photo is uploaded (instead of resizing when a user opens the post page).
- Web - Front service for HTML (source).
It is accessible via beta. After bugfixes and more tests, I will use it as default.
I wanted the first release very simple. All requests to
/blog/* are redirected to the new service. I wanted to improve it first because it has a lot of access (SEO).
But if I would take the decision again, I would start with something even simpler, with only graphql and HTML handled by the legacy website.
About the tests
web microservice has nice tests (Unit Tests and Integration Tests with Pact). But I didn’t code tests for graphql. Why?
A little time after developing the web microservice I saw an interesting post about monitoring “Testing Microservices, the sane way”. I also saw the “Service Reliability Hierarchy” from Google SRE Book. So, I decided to focus on monitoring.
There are a lot of work to do on Shereland. My focus will be automation and later monitoring. The first and second way (check The Three Ways).
Automation: Build the pipeline for
Monitoring: Add Prometheus to check my performance metrics.