Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Research: Initial implementation for saving metadata, application state, etc. #14

Open
atc0005 opened this issue May 3, 2020 · 4 comments

Comments

@atc0005
Copy link
Owner

atc0005 commented May 3, 2020

As noted on GH-13, there are already strong leanings toward using a database to track events, even for short-term use (e.g., to identify when a temporary IP block should be removed). To that end, I think we'll need to identify a database backend and start designing a database schema to support our goals.

@atc0005 atc0005 added this to the v0.2.0 milestone May 3, 2020
@atc0005 atc0005 self-assigned this May 3, 2020
@atc0005
Copy link
Owner Author

atc0005 commented May 3, 2020

I don't have a lot of experience with db design, nor properly/programmatically handling migrations between schema changes, so any initial implementation will be just that, a first stab at the problem with the hope that someone more skilled can step in later and rewrite/replace, or at the very least, extend the initial work to be easier to use.

For the purposes of simplicity, I'm thinking of a file-based database like SQLite. I have some experience with using it in the past for smaller tools and there seem to be a number of available guides for Golang/SQLite, so this could be our first step.

@atc0005
Copy link
Owner Author

atc0005 commented May 3, 2020

Some potential resources:

Note: Whatever guide/direction I go, I'm looking to stick with the standard library database/sql package so that we will have the potential to fairly easily swap to another database backend (e.g., MariaDB) if we need to centralize the data for other purposes (e.g., central backups).

@atc0005 atc0005 changed the title How to track metadata/state? Research: Initial implementation for saving metadata, application state, etc. May 3, 2020
@atc0005 atc0005 pinned this issue May 3, 2020
@atc0005
Copy link
Owner Author

atc0005 commented May 3, 2020

Note: I have a real-world use-case for testing Go/SQLite, so I may take on that project in order to get more familiar with Go/SQLite before pushing hard on this.

@atc0005
Copy link
Owner Author

atc0005 commented May 3, 2020

As noted on GH-13, there are already strong leanings toward using a database to track events, even for short-term use (e.g., to identify when a temporary IP block should be removed). To that end, I think we'll need to identify a database backend and start designing a database schema to support our goals.

As of #13 (comment) I'm thinking that a database might actually not be required for the initial implementation. I think a later version of this app could certainly benefit from extensive logging of metadata (managed by some sort of automated purging or sanitization of privacy-related details), but reducing the TODO list for the first implementation would help us get this ready for testing/proving a lot faster than waiting on this.

In short, it's probably best to place this on the back-burner for now.

@atc0005 atc0005 unpinned this issue May 3, 2020
@atc0005 atc0005 modified the milestones: v0.2.0, Future May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant