3 ms·
That's the point though, if it's in a database you can have any number of awesome tools, text or GUI, to manipulate the state. And you don't need to reinvent t
by tdicola 10y ago
That's the point though, if it's in a database you can have any number of awesome tools, text or GUI, to manipulate the state. And you don't need to reinvent the wheel to deal with atomic updates to the state, etc.
- dsmithatx 10y agoWrite a bash script to manage your cron and you can do the same thing in a terminal. Use http://freecode.com/projects/zenity http://freecode.com/projects/zenity or something similar for your new awesome GUI tool. I think for most people cron is simple enough to just google when they need the syntax. Although this crontab.guru site is 1000 time nicer than most google searches for help. I don't think a database would offer anything unless it was managing 1000's of cron servers. Flat text is fine and easier to parse than querying a database and adding a dependency. A database is a huge requirement to ask for to manage a few simple files.
- jstimpfle 10y agoThere is no need for a database. File updates are atomical. Editors rewrite the whole file. Also the tools argument just isn't true. A well designed plain text format is easier to parse with a one-off parser than with ugly one-off SQL queries. The reason that not many GUIs exist for plain text formats is that they are already designed to be easy to use. There are few cases where GUIs make sense. From the top of my head, the only configuration GUI I regularly use is firefox's. Not that it wouldn't be possible to come up with a clean plain text design that would be easier to use. Also most of the stuff is not represantable as relations. I'm looking forward to see how you encode a shell command in relations.
- JdeBP 10y agoThere's more to atomic updates than "rewrite the whole file", note. The way that text editors usually rewrite whole files in place, preserving hard links, is most definitely not an atomic update.
- jstimpfle 10y agoThe typical way to do it is to write a new file. Not that it would matter in practice for configuration files.
- tdicola 10y agoSo what happens when your 'atomical' text update tool reads in the text file to memory, makes some changes, then the file changes on disk from another unrelated process, and your tool writes the file back out losing the previous changes?