Repository navigation
Replies: 10 comments 6 replies
|
"SQLite as the file" Im also starting to like this idea a single .sqlite: data as tables; each folio's drawing, the symbols, the title blocks and the pictures as rows in it; no zip one file any SQL tool opens; saves write only what changed; SQLite itself makes saves crash-safe |
|
im rethinking the whole qetz project I've been patching bugs to fix issues but the fundamenation question remains "Who is the sole source of truth" qet = XML (100%) source of truth On top of that these is conversion issues XML >> SQLite >> XML (single page) >> SQLite etc etc In my opioion we either need to stick 100% XML or go 100% SQLite (or database) I don't think we could ever become a professional ECAD software if we stick with XML (or the way were were using it) Somebody will just rip an open souce copy of EPLAN Thoughts? |
|
@scorpio810 @arummler, following up my two comments above: before writing any C++ I built a prototype of the "100% SQLite" idea and tested it on 342 real projects. The project is one SQLite file, with no zip and no XML inside. XML is made only for copy/paste, export and older versions. Every project converted and came back identical. On a 136-folio project it opened in 0.03 s and saved in 0.15 s (today 5–30 s). Hundreds of simulated crashes, power cuts and copies taken mid-save never damaged the file. A record of who changed what costs about 2 KB a save, and two people's copies can be merged. Four questions decide whether I go on:
Nothing a released QElectroTech saves changes until you agree. |
|
One requirement is missing from the list: a project must remain usable This is already a problem with today's .qetz, not only with a future Today the only format that works well with git is the plain XML .qet: So I'd like both formats to be kept:
Both should share the same schema, in line with arummler's "several |
|
BTW i have a new format comming called .qetdb It has everything @arummler and @scorpio810 have requested plus exta cool stuff like Reed–Solomon error correction |
|
@scorpio810 @arummler, I've gathered everything you've both asked for on the file format, here, on #1440 and in the #1472 review (35 points), with our own requirements, into one plan. Here it is, with the questions only you can answer at the end. The direction. A project is one model: the project database. It can be saved as three files, all written from that same model:
All three stay for now. In the long run I'd like to end with one file, the What every project file must do
Most of this already holds for Order of work, one PR at a time against master, nothing stacked:
No default changes on development builds before a format is frozen, and no new fields in today's files meanwhile. Questions
|
|
@ispyisail thanks for putting everything in one place, this plan is much clearer. Moving to one PR at a time, with nothing stacked and no default changes on development builds before a format is frozen, is exactly what we needed. @arummler thanks for pushing for this. My general position: three formats, user's choiceMy philosophy for QElectroTech has always been to let users choose what suits them best, rather than deciding for them. So my target is not "one file in the end". It is three formats written from the same model, all equal in content, and the user picks:
None of them is a second-class export. No format is scheduled for removal: one goes only if nobody uses it any more, not because another one is considered better. Answers to your questions
|
|
What is qetz supposed to be now? The original idea of minimum invasive binary separation? Or the current mix of SQL/XML/binaries in version 4/5? Are we now committed to keep in indefinitely? Lazy folio loading I would deactivate until the whole internal database question and stable file formats are sorted out. CI: absolutely, a round trip as well as a save could support (even if not proof) that everything stays stable. But one should use some test file which uses all the (new) features. |
|
Im not happy with .qetz now either but its deeply imbeded and in using it as a base for .qetdb (its really any extension of .qetz) |
Uh oh!
There was an error while loading. Please reload this page.
@arummler, your comments on #1440 were right, and I'm rethinking
.qetzbecause of them. In the format now in master (format 4) the project data sits in a database inside the zip, but QElectroTech still works on XML: opening turns the database back into XML, QElectroTech then builds its own database from that XML, and saving does the reverse. The same data exists in three forms, with converters between them. Below is a new design and the order I would build it in. None of it is built yet; I'd like your review first.What goes wrong today. A folio that is not open is saved from its old file, so the save is right only if the edit that made it out of date is on a hand-kept list — your point about those lists. On 342 real projects (25 kinds of edit, each saved with folios opened lazily and with every folio drawn), one edit lost data in one project: removing the folio holding the start of a table split over several folios left the next part without its query. A test that does this for every change is coming as a PR.
The new design
project.sqlitestraight into QElectroTech's database, with no XML step, so search, the parts list and cross-references cover the whole project at once. A folio is drawn when you open it..qet, and Save a copy for an older QElectroTech.Why a database rather than XML in charge: I want to import projects from Promis.e and RSWire, which keep their devices, wires and terminals in database tables, and people ask for SQL reports on project data. Both need one documented place where each fact lives.
What it keeps that you didn't like: a folio file read on its own shows the drawing but not the labels and information, and a damaged database loses the data of the whole project. Previous versions kept on every save (#1501) and recovery (#1504) are the answer to that, not the format.
Order of work. Nothing changes on screen at any step.
openFile(). This removes the XML round trip from every open and save.Questions
All reactions