Skip to content

Commit 125e052

Browse files
weber-chrisbjester
authored andcommitted
adding documentation sections
1 parent bd61ff5 commit 125e052

4 files changed

Lines changed: 45 additions & 0 deletions

File tree

docs/devsetup/index.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Dev Setup
2+
========
3+
4+
Installation
5+
Dependencies
6+
7+
Tests
8+
SQLite
9+
Postgres
10+
Integrationtest->Kolibri
11+
12+
Soft-deletion
13+
-------------
14+
15+
Typically, deletion merely hides records, rather than actually erasing data.
16+
17+
When a record for a subclass of ``SyncableModel`` is deleted, its ID is added to the ``DeletedModels`` table. When a subsequent serialization occurs, this information is used to turn on the ``deleted`` flag in the store for that record. When syncing with other Morango instances, the soft deletion will propagate to the store record of other instances.
18+
19+
This is considered a "soft-delete" in the store because the data is not actually cleared.
20+
21+
22+
Hard-deletion
23+
-------------
24+
25+
There are times, such as GDPR removal requests, when it's necessary to actually to erase data.
26+
27+
This is handled using a ``HardDeletedModels`` table. Subclasses of ``SyncableModel`` should override the ``delete`` method to take a ``hard_delete`` boolean, and add the record to the ``HardDeletedModels`` table when this is passed.
28+
29+
On serialization, Morango clears the ``serialized`` field entry in the store for records in ``HardDeletedModels`` and turns on the ``hard_deleted`` flag. Upon syncing with other Morango instances, the hard deletion will propagate to the store record of other instances.
30+

docs/gettingstarted/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Getting Started
2+
========
3+
4+
Syncable Models
5+
6+
Actions
7+
8+
Hooks

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Morango is a Django database replication engine written in pure Python. It is de
1010

1111
overview/index
1212
architecture/index
13+
devsetup/index
14+
gettingstarted/index
1315
syncing/index
1416
counters/index
1517
merging/index

docs/syncing/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ In the illustration below, the application layer (on the right) is where app dat
2525

2626
.. image:: ./sync_process.png
2727

28+
Store vs. Buffer
29+
30+
Dirty-Bit
31+
32+
Example:
2833

2934
Orchestration
3035
-------------

0 commit comments

Comments
 (0)