News for hackers. Stuff that matters.
Re:LiteTree: SQLite with Branches by rubyfan on Wednesday August 29, 2018 @06:28AM (#17867124)
Can anyone elaborate a use case for something like this? I’m guessing there’s some blockchain connection but it’s not immediately obvious
Re:LiteTree: SQLite with Branches by garybake on Wednesday August 29, 2018 @07:18AM (#17867326)
You can use it for "what if" analysis. - Take a fork of the database - Transform data in the fork. i.e. costs+5% - Point your current queries to run on the fork

You can see how with just the effort repointing queries a reporting app could show the real world and the world you are modelling.

Re:LiteTree: SQLite with Branches by rubyfan on Wednesday August 29, 2018 @07:20PM (#17872921)
That’s helpful, maybe I’m naive but isn’t that like an Excel workload? I haven’t seen scenarios where the entire database needs that kind of functionality. Can you elaborate on what kind of data and business problem one would be working on where they need that level of robust versioning?
Re:LiteTree: SQLite with Branches by amirouche on Wednesday August 29, 2018 @08:58AM (#17867844)
Uses cases for a versioned in branches data store that are not blockchain related.

0) The most obvious use case is to replace git, because git proper doesn't handle big files very well, let alone bigger than RAM structured data. Mind the fact you might still need an ad-hoc solution for binary data. WT does have a limitation on value size.

1) There is various data science uses cases, like sharing data [0] or A/B testing stuff.

2) Anywhere you need an audit trail .ie you need to look back at previous states, whether it is for debugging purpose or domain logic

versioned datastore is a compromise between event sourcing (pure log) and non-versioned databases.

[0] Collaborative Open Data versioning: A Pragmatic Approach Using Linked Data

[1] https://en.wikipedia.org/wiki/Audit_trail

edit: cosmit.

Re:LiteTree: SQLite with Branches by pbowyer on Wednesday August 29, 2018 @09:40AM (#17868123)
A real-life situation I ran into:

3) Take a copy of the data store offline, and later merge it back into the online database

Manually resolving conflicts is fine. The alternative is to rebuild a system on Couchbase/pouchdb, or rewrite on event sourcing, neither of which - when the system otherwise lends itself to RDBMS - is my choice.

Re:LiteTree: SQLite with Branches by garmaine on Wednesday August 29, 2018 @01:27PM (#17870045)
Does the OP support merging? I didn’t see that.
Re:LiteTree: SQLite with Branches by jedberg on Wednesday August 29, 2018 @02:29PM (#17870461)
No it doesn't, which seems to eliminate a lot of use cases. Merging is listed in the nice-to-have-in-the-future section.
Re:LiteTree: SQLite with Branches by _jal on Wednesday August 29, 2018 @10:33AM (#17868467)
Data modeling under the many worlds interpretation.