Sorry, we have to split up :P
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dmedia |
Fix Released
|
High
|
Jason Gerard DeRose |
Bug Description
Hehe, my funny new years eve bug title :^)
So we're going to split Dmedia into multiple databases...
The main Dmedia database is for driving all the Dmedia automated behaviours.... the "making file management go away" part of Dmedia. The schema needed for this part is quite mature now, and is also surprisingly minimal considering the complex behaviours in drives. But it needs to be simple because this is the *scary* part of Dmedia... if we F-up, there could be data loss. This main database is really only manipulated by the Dmedia service, and it's not particularly important to snapshot... the idea is not to trust the metadata that much, but instead to constantly verify the reality... are these files still on hard drive X as expected, are the modification timestamps what we expect, do the content hashes match up?
The 2nd type of database is the project databases, and there will be one per project. This is all about content creation, and the metadata needed to support interesting applications built on Dmedia (eg, ingest with Dmedia for editing in Novacut). This is also the data the user will manipulate (say tagging, rating, deleting, comments, etc)... so these are databases we want to snapshot with version control. A project also represents the unit of sharing... you share/collabora
Oh, and we're also going to start versioning the database names to make it easier to upgrade between schema versions, and so that running an older version of say Dmedia wont F-up your database that was created by a newer version. So when we're at schema version 0 (which we currently are), the database will be `dmedia-0`, and then `dmedia-1`, `dmedia-2` etc for subsequent schema versions. So after this lands, main automation-focused DB will be:
dmedia-0
Now not every file needs to be in a project and it will be valid for a file to be in multiple projects. Also, projects only make sense for 'origin': 'user' files... well, or projects that were shared with you, you might not be the origin. Anyway, so like always, a project with have a random, 120-bit, 24-character base32 encoded ID, something like this:
26TSXJ7T33KBQJU
Damn, I love the way those look! Sorry... anyway, CouchDB database names must be lowercase, plus it's handy to see/filter what DBs are for Dmedia, what are Novacut. So the above project will have the database name:
dmedia-
Notice we still version with the "0". I just landed this in Novacut as a little experiment... there's way less complexity in Novacut right now, so easier to try this out and get a feel for it.
I'm going to try and do this migration automatically for those who already have some files in Dmedia. There wont be any file-data loss for sure, and hopefully things will go smoothly for the metadata also. As Dmedia hasn't yet had usable UI for tagging or anything like that, we should be pretty safe here.
So two problem domains, two types of databases.
Related branches
- dmedia Dev: Pending requested
-
Diff: 6647 lines (+3214/-2459)49 files modifieddmedia-browser (+66/-0)
dmedia-gtk (+41/-14)
dmedia-migrate (+2/-2)
dmedia-schema-upgrade (+17/-0)
dmedia-service (+1/-1)
dmedia/constants.py (+0/-2)
dmedia/core.py (+1/-1)
dmedia/importer.py (+55/-25)
dmedia/local.py (+3/-1)
dmedia/schema.py (+119/-265)
dmedia/split.py (+149/-0)
dmedia/tests/test_core.py (+2/-1)
dmedia/tests/test_importer.py (+4/-1)
dmedia/tests/test_local.py (+1/-1)
dmedia/tests/test_schema.py (+54/-12)
dmedia/tests/test_split.py (+379/-0)
dmedia/tests/test_util.py (+69/-0)
dmedia/tests/test_verification.py (+3/-5)
dmedia/tests/test_views.py (+15/-3)
dmedia/util.py (+47/-0)
dmedia/verification.py (+3/-2)
dmedia/views.py (+183/-130)
dmedia/workers.py (+3/-4)
gen-proxies.py (+3/-3)
grid.py (+58/-0)
regenerate-thumbnails.py (+2/-1)
relink.py (+3/-2)
setup.py (+7/-1)
ui/alt.css (+0/-159)
ui/base.css (+0/-19)
ui/base.js (+0/-115)
ui/browser.css (+213/-35)
ui/browser.html (+32/-25)
ui/browser.js (+309/-47)
ui/common.js (+411/-191)
ui/dmedia.js (+230/-0)
ui/fix.css (+139/-0)
ui/grid.css (+65/-0)
ui/inbox.js (+0/-101)
ui/index.html (+88/-64)
ui/microfiber.coffee (+0/-310)
ui/microfiber_s.coffee (+0/-236)
ui/old-index.html (+0/-238)
ui/old-style.css (+0/-301)
ui/projects.css (+66/-0)
ui/projects.html (+40/-0)
ui/projects.js (+51/-0)
ui/style.css (+174/-141)
ui/style.html (+106/-0)
Changed in dmedia: | |
status: | Triaged → In Progress |
Changed in dmedia: | |
status: | In Progress → Fix Committed |
Changed in dmedia: | |
milestone: | 12.01 → 12.02 |
milestone: | 12.02 → 12.01 |
status: | Fix Committed → Fix Released |