Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenant persistence with in-memory key-value storage #144

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

wcalderipe
Copy link
Collaborator

@wcalderipe wcalderipe commented Mar 1, 2024

This PR introduces logic to persist a tenant using an in-memory key-value storage. Later on, we'll switch to a PostgreSQL backend for both development and likely production.

It also kicks off a refactor to employ schemas for generating domain types. This approach will enable us to use these schemas to encode and decode information from the storage backend, thereby increasing type safety at runtime.

However, this PR does not yet include data encryption. Nonetheless, in 99% of cases, data should be encrypted because the storage backend may be located outside the engine's boundary, making it an untrustable component.

Key-value Storage

We've opted for a key-value model for the storage backend due to its simplicity. This choice was largely inspired by HashiCorp Vault's storage model. Given that Narval might not control the storage backend, using a straightforward key-value system simplifies supporting multiple types of persistence layers with minimal effort – it's relatively easy to construct a kv data model almost anywhere.

@wcalderipe wcalderipe self-assigned this Mar 1, 2024
@wcalderipe wcalderipe merged commit 3ae44da into main Mar 4, 2024
3 checks passed
@wcalderipe wcalderipe deleted the feature/tenant-persistence branch March 5, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant