Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

History view #349

Open
okdistribute opened this issue May 2, 2017 · 10 comments
Open

History view #349

okdistribute opened this issue May 2, 2017 · 10 comments

Comments

@okdistribute
Copy link
Collaborator

okdistribute commented May 2, 2017

With the new SLEEP version, dat can download, save the changes, and revert to a previous point in history. It can also see a diff of which files changed. It could also see the content of the files that changed, but let's just have this iteration focus on looking at the history of changes and restoring to a previous point in time.

Here are some examples:

Restore to earlier version
image

While a file is open
image

Table view
image

GitHub history

image

GitHub Desktop App

image

@yoshuawuyts
Copy link
Contributor

cool, thanks for sharing!

@Kriesse
Copy link
Collaborator

Kriesse commented May 23, 2017

Example from Dropbox:

image

@martinheidegger
Copy link
Collaborator

DAT creates a lot of versions in a short time. It would be good to allow a DAT client to have some sort of "bundled versions" that act a little bit like Keyframes in Movies. Is there a system for this in place?

@martinheidegger
Copy link
Collaborator

@dkastl
Copy link
Contributor

dkastl commented Nov 17, 2018

For me the name version is a bit misleading, or it's not what I would expect as a user.

The current version history, that dat log returns is in my opinion limited useful: it can grow very long easily but does not provide much information beyond individual file changes. I would more expect something like git log.

@martinheidegger
Copy link
Collaborator

dat-ecosystem-archive/DEPs#5 (comment)

Version: Internally every dat data-structure is composed of append-only logs (hypercores). Any time an entry is appended to the log, a new version is created. The version is identified according to the semantics of the data-structure. In the case of single-writer hyperdrive, it's currently being identified by the metadata log's latest message number.

@AtuyL
Copy link
Collaborator

AtuyL commented Nov 17, 2018

I'd probably say this feature's main purpose is historic lookup.
In conversation with Martin, it came out that the meaning of "version" is technically "history of file operations".

But is this really user-friendly?

Maybe: "Time based version" is better?

Every version entry also has metadata with a timestamp.
So, we can show squashed versions based on their timestamps. (i.e. chunks that happened within 5 minutes get squashed)

Users could also configure the time-span. (It would behave a little bit like a financial chart)

(This could probably done in the frontend alone, without changes on the DAT data)

@martinheidegger
Copy link
Collaborator

Regarding the time-stamps: In distributed systems "timestamps" are not trust worthy. They can be seen as rough estimates around which time the version probably happened.

In Git it usually works out in practice but its not reliable.

However: much more problematic about using time-stamps is that dat-log (that uses append-log) only stores the date of "put" operations in the "last-modified" metadata. Delete is not stored!

Related: mafintosh/append-tree#16

@AtuyL
Copy link
Collaborator

AtuyL commented Nov 17, 2018

Thank you for clearing this up.

My suggestion required a timestamp of Delete and put. 😭 Need to rethink it...

@bnewbold
Copy link

Note: I've proposed self-reported timestamps (git style) to be included in hyperdb/hyperdrive:

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

8 participants