https://github.com/rayniel95/distributed-cms-massiel-villalba-rayniel-ramos
Distributed Content Management System with crash fault tolerance.
https://github.com/rayniel95/distributed-cms-massiel-villalba-rayniel-ramos
ansible chord-dht-peer chord-protocol distributed-systems docker docker-compose flask html jinja2 p2p-network peer-to-peer pyro4 python python3 remote-object sqlite3
Last synced: 3 months ago
JSON representation
Distributed Content Management System with crash fault tolerance.
- Host: GitHub
- URL: https://github.com/rayniel95/distributed-cms-massiel-villalba-rayniel-ramos
- Owner: rayniel95
- Created: 2021-04-13T21:00:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-13T15:18:43.000Z (about 4 years ago)
- Last Synced: 2025-01-17T04:13:31.784Z (4 months ago)
- Topics: ansible, chord-dht-peer, chord-protocol, distributed-systems, docker, docker-compose, flask, html, jinja2, p2p-network, peer-to-peer, pyro4, python, python3, remote-object, sqlite3
- Language: Python
- Homepage:
- Size: 1.5 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# About
The Distributed CMS (Content Management System) was my final project in my Distributed Systems course. The
idea was implement a crash fault tolerant system, this is solved using a [Chord][1] distributed hash table. I used the Chord original paper and modified some algorithms, for example, one adventage of my modified algorithms is that we only need one node for create a chord ring, of course, a problem with this is the high traffic in the network. I try to solve the network partition problem for two partitions saving the new neighbors nodes in a special list and asking if the actual node is not in the ring of that neighbor, a very simple algorithm. Because the system is crash fault tolerant you can add new nodes, add data to the system, deleting node, but the data will be remain in the system (if it have at least one node).## More
See in this repository:
- `cms-compartido.pdf`
- `chord.pdf`
- `1502.06461.pdf`# Requirements
## Docker compose network
docker
docker-compose
# How to execute
## Docker compose execution
Execute `sudo docker-compose up`
# How to use
This is a cft system, so, to test it you will need to create faults. This faults can be created removing chord nodes (containers) and wait some time to system stabilisation (1 - 3 minutes). If the data introduced still remain the system work ok.
## How to do a simple test
Ansible playbook will create 5 chords nodes accessible through localhost ports:
5000, 5001, ..., 5004. The web app running over chord try to emulate a cms.1. Go to `localhost:5000`, you will see (text is in spanish, of course):

2. Go to `Creador de Widgets`. A widget is a piece of html code and variables. The code use `Jinja` template engine for rendering.

3. Introduce widget name in first text box (without spaces), introduce variable names in second textbox, introduce your jinja html code in third textbox. Example:

4. Save it and create other.

5. You can see all widgets in the network in `Lista de widgets`, it can take some time (1 minute, the node need to ask to all others nodes for widgets), take a look:

6. Create one page, go to `Disenador de paginas`, you will see many sections. Add the name (without spaces). Instantiate widgets with parameters in the sections selected. Save it.

7. Go to `Lista de paginas`:

8. Select the page:

---
Start removing containers. Select a random container, remove it, wait one minute, select other container, remove it, wait one minute, select other container, remove it, wait one minute, go to `Lista de paginas`. The page will remain available!!!!! This is because system nodes can crash but data will remain (data is replicated). It is a fault tolerant system!!!!!!!!!!!!
**Note: I can not create a Kubernetes cluster because broadcast problem. It is a bit difficult to create a Kubernetes cluster using broadcast without knowledge about broadcasting ports.**
[1]: https://en.wikipedia.org/wiki/Chord_(peer-to-peer)#:~:text=In%20computing%2C%20Chord%20is%20a,to%2Dpeer%20distributed%20hash%20table.&text=Chord%20specifies%20how%20keys%20are,node%20responsible%20for%20that%20key.