Skip to content

olivernybo/leviathan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leviathan

Leviathan is a platform for me to deploy applications and cron jobs with ease. It will be built with containers in mind, so the platform can be scalable.

I've taken a lot of inspiration from Devon Crawford, especially this video.

Diagrams

All diagrams are made with mermaid.

Command for generating mermaid images:

mmdc -t dark -b #0d1117 -s 5 -i inputfile.mmd -o outputfile.png

Services

If a service (node) has rounded corners, it indicates it is scalable.

The services are colored in the way that red services are yet to be worked on, orange services are in progress, and no color is finished.


This diagram consists of 3 groups, UI, System and Data.

The UI group will be what the user sees, but it will also include minimal logic in the form of a sign in feature.

All the other logic services are in the System group. These services consists mostly of API's, but there are also other low level system services.

For all the data that will horde up in all the services, the Data group will manage all of it.

Technologies

The primary technology that will be used is Docker. This will allow me to create all the services independently and with their own technology.

To implement the scalability, I will most likely either use Docker Swarm or Kubernetes. Both are yet to be researched, so a final conclusion has not been made.

These were my initial thoughts. I have now concluded the project will use Kubernetes, because support for Docker Swarm will come to a halt in the comming years.

Services

In this section, I will be describing all the services and what their purpose for the project is.

Website

The website will hold a frontend for my public projects and be the link to Leviathan. The website will also have an API to communicate securely with the Database Handler.

JWT Authentication Server

This server will handle all authentication for Leviathan with the industry standard RFC 7519 protocol.

Leviathan

Leviathan is the "administration" page for all my future needs. It will have a dedicated API that will communicate with the Cron and App Manager.

Cron and App Manager

The Cron and App Managers job is to handle the management of the Cron Jobs and Applications. The tasks will include booting, deletion, activation, deactivation and whatever else I come up with.

Database Handler

This service has the responsibility to handle requests to the database and cache data that is frequently used.

Initially my plan was to have a dedicated database handler and caching server, but after learning more about Redis, I've decided to merge the two services into a single service.

Command for Redis nodes:

docker run --name leviathan-redis -p 6379:6379 -d redis redis-server --appendonly yes
docker run --name leviathan-session-redis -p 6380:6379 -d redis redis-server --appendonly yes