Skip to content

Data Persistency Architecture

Michael Appiah Dankwah edited this page Oct 25, 2023 · 2 revisions

Architecture of susdb (Secured User Strings Database)

The susdb project is an elegant and efficient solution for managing user-specific data. It provides a structured architecture that simplifies the storage and retrieval of hashed and secured user strings. Here's a comprehensive overview of the architecture:

  1. Data Storage Layer User Data Records: susdb organizes user data into structured records, each uniquely identified by a user-specific UUID. These records serve as containers for storing various user-related information.

Data Encryption: Robust encryption mechanisms are applied to protect sensitive user data, ensuring its confidentiality and security.

  1. User Authentication and Security Password Hash Management: susdb ensures secure user authentication by managing password hashes. Passwords are securely hashed and stored, safeguarding them from data breaches and unauthorized access.

Access Token Handling: The system efficiently manages user access tokens, providing secure access to protected resources within applications. This simplifies token storage and retrieval.

Data Storage and Hashing

In the susdb architecture, user data is stored in structured records, each uniquely identified by a user-specific UUID. These records serve as containers for storing various user-related information. Data integrity and security are paramount in this system.

String Storage:

User strings are stored in the database using a file-based DBM (Database Manager) storage system. Each user-specific database file is uniquely identified by a UUID (e.g., user_db_<uid>), where <uid> is the unique user identifier. This structure allows for the organized storage of user data.

Hashing for Security:

To ensure data security, user strings are hashed using the Argon2 password-hashing algorithm. Password hashing is a crucial step in protecting user data from data breaches and unauthorized access. The hashed user strings are stored securely in the database.

Data Integrity Checks

The susdb architecture incorporates data integrity checks to maintain the consistency and reliability of stored data. Integrity checks are performed to ensure that data remains intact and unaltered. These checks help prevent data corruption and loss.

User Verification

User verification is an essential aspect of susdb. The architecture offers a method to verify users based on their stored data. When a user attempts to authenticate, the provided user string is hashed and compared with the stored hash. If the hashes match, the user is successfully verified, allowing access to protected resources. Verification is essential for user authentication and data security.

File-Based DBM

The file-based DBM storage system simplifies data storage and retrieval in susdb. It allows the creation of structured database files within the system's file structure. The databases are accessible through these files. Data is written, updated, and retrieved through this file-based storage system. This method provides efficient data organization and management.

Data Serialization

To ensure seamless data processing, all data coming into the susdb system is serialized to a JSON string. Serialization is the process of converting structured data into a format that can be easily stored, transmitted, and interpreted. This serialization ensures that data is stored and processed consistently and simplifies data exchange within the architecture.

In summary, susdb employs a robust architecture that prioritizes data security, user verification, data integrity checks, and efficient data storage. The use of file-based DBM, along with hashing and data serialization, simplifies the management of user-specific data while maintaining a high level of security and reliability.