Skip to content

JGabrielGruber/mesa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mesa

Simple Key Value registry built with Elixir

Introduction

Mesa is similar to Redis, but with lot less functionality, it stores buckets->keys->value, it communicates trough Telnet and supports a multi-node setup, where it'll manage the buckets trough different nodes.

Code Structure

The project is composed of a Umbrella project, where it have two apps, the mesa and mesa_server.

Mesa

Mesa App is responsible for managing the buckets, monitoring them and dispatching requests to the correct node. It's composed of four custom modules:

  • Mesa.Supervisor: Runs and monitors the modules:
    • Mesa.BucketSupervisor: A DynamicSupervisor used for each Bucket
    • Mesa.Registry: A GenServer responsible for managing Bucket's names
    • Mesa.Router: Dispatch requests to the appropriate node on the cluster, using the table provided to the Application env; it defaults to the current node only.

MesaServer

MesaServer App is responsible for listening for TCP connections, it's composed of two modules:

  • MesaServer.Application: A Application that runs the MesaServer.Supervisor and manages the modules:
    • MesaServer.TaskSupervisor: Used for running each received connection as a Task
    • Supervisor: Used to run the MesaServer module and listen for requests
  • MesaServer.Command: Parses received telnet lines into commands; running then on Mesa.Router, for creating; and Mesa.Bucket, for getting and modifying.

About

A simple Key Value storage written in Elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages