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

Replayable command log? #140

Open
michielbdejong opened this issue Aug 24, 2022 · 2 comments
Open

Replayable command log? #140

michielbdejong opened this issue Aug 24, 2022 · 2 comments

Comments

@michielbdejong
Copy link
Member

Maybe we should rethink reset script vs idempotent pull and truth in db or in source docs.

The way the Nextcloud app currently works, it doesn't keep track of which source documents led to the current db state.
That means the db state is not ephemeral.

That is different from how time-pondersource-com works right now, because there the production db is ephemeral and the truth is in the source documents which we keep in a private git repo that exists specifically for this purpose.

We could leave this as two ways to use PreJournal, but it would maybe be an improvement if PreJournal had a replayable command log. The nice thing is we already have each write action, no matter what triggers it, go through the runCommand function, where the command is represented as an array of up to 8 strings, so it would be pretty easy to store that in a database table and then have a "replay log" meta-command.

michielbdejong added a commit that referenced this issue Aug 24, 2022
michielbdejong added a commit that referenced this issue Aug 24, 2022
@michielbdejong
Copy link
Member Author

Maybe there needs to be a layer just below "command", where the command issued by the user has already been translated to an action, e.g. decision about access control, filling in default values if values are missing, and e.g. applying the context wrt user and server mode, etc.

@michielbdejong
Copy link
Member Author

Also, don't need to include the read commands.

At some level, we could save the SQL logs of course! :)

Will think about it some more.

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

No branches or pull requests

1 participant