Distributed Systems #0 - General System Architecture
This project is based on building an app in a distributed manner, using distributed systems principles, building blocks and practices at the best of my understanding and skill.
Project Description & Goals (Non Technical)
The app will be a medium + udemy with Mind Maps. Mind maps are a way to store information on different subjects to improve the learning experience through a visually structured hierarchical tree. Subjects are presented from top level views to more advanced topics that are related to each other and grouped between. The learning sources will be text-based.
The app will:
- Structure and Display subjects in a hierarchical manner
- Keep track of each user’s progress on a subject
- Track course reads and likeability
- Save user’s saved, clicked and liked courses
- User registration and auth
- Provide users with the possibility to upload their own mind-maps representations of the topics they want to share
Nice to have (depending on the time & complexity):
- Real time editing
- See current users reading a subject
- Comment sections
- User bookmark system
- Tag system and recommendations
- Role system
- Automatic hierarchy and node relations
System Architecture
- Front-end written with - React
- Api-Gateway written in - Elixir
- Back-end written in - Kotlin
- Identity will manage user registration and authorizations, ex:
- POST/PUT user info. Provide security token
- File Bucket will store the Subjects' documents, ex:
- POST/PUT/DELETE file
- Course Service - course hierarchy, relations, ex:
- POST/PUT subject
- User Dashboard will manage user saving/liking/progress/created subjects, ex:
- PUT
- saves
- likes
- progress
- POST/PUT/DELETE Subjects
- PUT
- Course Dashboard - course statistics, ex:
- POST/PUT/DELETE statistics
- Identity will manage user registration and authorizations, ex:
Backend communication example:
*Some back-end services of course could be merged together, but to showcase distribution they were purposefully split
Other Technicalities
Elixir Gateway
The functional programming language Elixir incorporates qualities that a well designed Distributed System should have: Scalable, Fault-Tolerant, Reliable, Concurrent are the most important ones. And a gateway is a very important piece of the system - if any of the backend system falls, the other should work just fine and we could still use the app in some way, the story with the gateway is very different. Elixir is built to last and endure high loads. It’s strategy for let it fail and supervision builds trust with the developer that the service will do fine.
SQL and NoSQL
Postgres (SQL) will be used to store users table which shouldn’t be subject to future change. Once well defined it shouldn’t be a problem to be left as is, and future modification will be improbable and we can rely on SQL’s performance to retrieve and store data. MongoDB (NoSQL) is a flexible document based NoSQL database, if there are any changes in the future or the system will scale, we can leverage its qualities to make those kind of transitions less problematic or even seamlessly compared to the SQL databases.
Kotlin
Kotlin has a powerful Reactive programming API which empowers Responsivness, Resiliency, Elasticity and is Message Driven - qualities which the system will only benefit from.