Skip to main content

Database Overview

Reliable and high-performance data storage for LibreApps Desktop.

Overview​

LibreApps Desktop uses a combination of relational and non-relational databases to meet the diverse data storage needs of its microservices. This "polyglot persistence" approach ensures that each service uses the best tool for the job.

Key Technologies​

1. PostgreSQL​

The primary relational database for LibreApps Desktop. It is used by most microservices (User Management, Account Service, etc.) to store structured data with strong consistency requirements.

2. Redis​

An in-memory data structure store used for high-performance caching, session management, and real-time data processing.

3. Vector Database (Optional)​

For AI-powered features like RAG (Retrieval-Augmented Generation), LibreApps Desktop can integrate with vector databases like Pinecone, Weaviate, or Milvus to store and search high-dimensional embeddings.

Database per Service​

In accordance with microservices best practices, each service in LibreApps Desktop owns its own database. This ensures that services are loosely coupled and can be scaled and updated independently.

Data Migration​

LibreApps Desktop uses Liquibase or Flyway to manage database schema changes. This allows for version-controlled, automated, and repeatable database migrations across different environments.

Best Practices​

  • ✅ Do this: Use PostgreSQL for all structured data that requires ACID compliance.
  • ✅ Do this: Use Redis to cache frequently accessed data and reduce the load on your primary database.
  • ❌ Don't do this: Allow one microservice to directly access the database of another microservice; always use APIs for cross-service data access.