-
Notifications
You must be signed in to change notification settings - Fork 15
How it works internally
Bernardo Ramos edited this page Jun 3, 2019
·
1 revision
AergoLite is implemented in modules. There is the AergoLite core and the plugins.
The core
is directly related to the SQLite source code and it deals with database functions as:
- Maintaining the WAL files for local and consensus branches
- Managing integer row ids
- Managing the plugin interface
The plugin
modules implement:
- Node discovery
- Communication between the nodes
- Consensus protocol
Each plugin can implement one or more consensus protocols as well as node discovery methods.
The consensus protocol will define the final order of transactions for all the nodes.
The application uses the same SQLite API as usual and it has no direct interface to the plugin.
app : app
| : |
core <-> plugin <-----> plugin <-> core
| : |
database : database
The application can choose which plugin should be used for a given database connection.
The plugin runs on a separate thread.