Faculty of information technology


Download 1.67 Mb.
Pdf ko'rish
bet28/41
Sana17.06.2023
Hajmi1.67 Mb.
#1545014
1   ...   24   25   26   27   28   29   30   31   ...   41
Bog'liq
full thesis

4.6.1
Database
An SQLite relational database was chosen over the more complex databases like MySQL or
PostgreSQL. We don’t need a network access to the database. There will also not be many
database operations that would need to be done concurrently. In fact, our requirements are
fully met by SQLite and there is no need to use more complicated engines that would, in
all likelihood, operate more slowly under our conditions than this simple but fast C library.
4.6.2
External API
All external requests for creation of transactions will go through a single interface called
External API. The task of this interface is to validate the parameters of requests and then
prepare and write transactions into the database. In case of any errors, it will propagate an
error string through an exception back to the caller, so that the precise reason of failure can
be displayed. This layer detects any errors that have something to do with improper input
from the user (for example if he/she attempts to assign overlapping network addresses to
multiple LANs in public mode). Figure
4.4
shows how External API fits to the rest of the
system.
OVPN client files
Database
External API
CS-controller
Iptables/Ipset
Routes
Apache/proxy files
Website
Tests
on-connect/
on-disconnect
scripts
Figure 4.4: CS architecture overview
4.6.3
Pending configuration
For those parts of configuration that require synchronization with router, the database must
not only hold information about the current state (what is configured on router right now),
30


but also the information about the future state (what configuration user wants there). The
future state of a configuration is called pending configuration. This is specifically required
for LAN settings and static routes. Each pending configuration has its own database table.
A user will always be displayed the pending configuration. If it does not exist, he will be
shown the current configuration.

Download 1.67 Mb.

Do'stlaringiz bilan baham:
1   ...   24   25   26   27   28   29   30   31   ...   41




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling