3 ms·
No, it is NOT a problem of using flat files. It is a problem of using files. The files are the serialized initial values for the run-time configuration, which m
by lifthrasiir 10y ago
No, it is NOT a problem of using flat files. It is a problem of using files. The files are the serialized initial values for the run-time configuration, which may or may not be changed. SQLite is no superior to flat files in that, and in fact, can be damaging if the user managed to break the invariant and the invariant is not checked.
The configuration system absolutely demands the locking system (to alter it) and the checker (to correctly check if it is correct before the changes are ever committed). SQLite can provide some of them, but not all---most importantly, SQLite's locking system is independent of the runtime configuration which requires separate locking system (however rudimentary).
- abpavel 10y ago> It is a problem of using files. In UNIX, everything is a file
- lifthrasiir 10y agoIf I were not clear enough, it is a problem of treating configuration files as like the runtime configuration. Not a problem of file formats (though some formats ease the job)---does this make sense?
- dozzie 10y agoOh, if only. Network interface is not a file. Process is not a file (though some of its metadata is accessible through different files under different unices). IPv4 routing entry is not a file. User account is not a file. Do you see a pattern?
- abpavel 10y agoNetwork interface: /sys/class/net/<name> Process: /proc/<id>/ IPv4 Route: /proc/net/route User account: /etc/passwd
- dozzie 10y agoOK, configure the network interface this way. Oh, you can't. So it is not a file, it just has some metadata exposed with a file interface. Create a process in the same manner. Oh, again you can't do that. What a shame. And with route and user account examples you confuse being a file and being a record in a file (which, couriously, is not a file itself).
- abpavel 10y agoYou mean /etc/network/interfaces? I can set tx queue length of eth0 to 300 packets: echo 300 > /sys/class/net/eth0/tx_queue_len Or change frame forwarding behavior from switch to hub: cat 0x65535 > /sys/class/net/vnet0_11/bridge/group_fwd_mask Granted, it's not possible to change IPv6 address through /proc/net/if_inet6, but just because I don't know about it, doesn't mean that it isn't possible.
- dozzie 10y ago> You mean /etc/network/interfaces? No. It's a configuration file for a separate set of tools that actually configure the interface for you. You can't set its current IP address by writing to any file. > I can set tx queue length of eth0 to 300 packets: echo 300 > /sys/class/net/eth0/tx_queue_len Or change frame forwarding behavior from switch to hub: cat 0x65535 > /sys/class/net/vnet0_11/bridge/group_fwd_mask Sorry, no banana; you only can control two or three aspects this way, and not the most fundamental ones at that. Network interface is simply not a file, it's a separate OS-level construct, it's not exposed to userland as a file. Not everything in Linux or unix is a file, even though many things (the ones more remote from kernel) are.