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

Segregate history entries by "session" #27

Open
sagebind opened this issue Mar 12, 2020 · 0 comments
Open

Segregate history entries by "session" #27

sagebind opened this issue Mar 12, 2020 · 0 comments

Comments

@sagebind
Copy link
Owner

It would be a useful distinction to be able to page through just the command history for a single session, or for history of all sessions.

To do this we have to figure out what a "session" is:

  • A random UUID generated whenever Riptide initializes. A meaningless value, but effective.
  • PID + timestamp: this should be unique enough that it will differ for all logical sessions, and has the advantage of being more meaningful.

To avoid duplicate storage, we could create a new table that is basically session_history and have command_history entries hace a foreign key pointing to the originating session. We could move pid from the command entries to the session entry in this scenario assuming a session can't span multiple PIDs.

Are forks the same session, or a new one?

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