Advertisement

Linux registry

Started by April 11, 2003 01:40 PM
32 comments, last by BradDaBug 21 years, 9 months ago
quote:
Original post by stustill
Sneftel: Correct me if I am wrong, but the Windows registry is held in only one file, if for whatever reason you lose that file, your system is really screwed.

To carry out your implied analogy, the /etc tree is held on only one device. If you lose the filesystem of that device, your system is really screwed.

quote:
With linux, because everything is separated, if you were to accidentally delete one of them, chances are (unless it is an important module) that your system will not be greatly affected, whilst with Windows, you would have to reinstall (again!)


"Everything is separated" is a weak argument, because it isn''t really separated. Going from storing information across a filesystem, to storing it across one file, is only one level of indirection; not much in the way of less protection.

Don''t want to lose all your data? don''t delete the registry in Windows, and don''t mess up your filesystem in Linux.


How appropriate. You fight like a cow.
The point is though, that the risk of messing up your system is far reduced, because accidentally losing a file from /etc is not as fatal as accidentally losing a file from the Windows registry (i.e. the whole thing). Yes, in extreme cicumstances you lose out either way, but the ''linux way'' is much safer.

Stu
Advertisement
quote:
Original post by stustill
The point is though, that the risk of messing up your system is far reduced, because accidentally losing a file from /etc is not as fatal as accidentally losing a file from the Windows registry (i.e. the whole thing). Yes, in extreme cicumstances you lose out either way, but the ''linux way'' is much safer.

Stu


Moderation totals:
+5 missed the point
The Windows registry would usually be at least two files: One for the system, and one for your user account.



"Laughter means distance. Where laughter is absent, madness begins. The moment one takes the world with complete seriousness one is potentially insane. The whole art of learning to live means holding fast to laughter; without laughter the world is a torture chamber, a dark place where dark things will happen to us, a horror show filled with bloody deeds of violence."
-- Jens Bjørneboe
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Considering that there already is an implementation of "hierarchical data storage" (i.e. the filesystem), we don''t need a second implementation of the same thing. A second implementation could be really optimized for the slightly different parameters (configuration data tends to be small, files tend to be big), but scalability is something that can and will be fixed on the filesystem level (some people might even argue that it has already been fixed).

That said, the current situation as far as configuration goes just plain sucks. Every single software package has its own config file layout, for example. Most of these layouts are difficult to parse and modify by computer programs, which in turn makes it difficult to write graphical (or ncurses-based or whatever) configuration frontends.

There is certainly a need for a standardized configuration layout. The desktop environments are moving into the right direction here - if only they could get their act together and agree on a common format, I''m sure other, non-UI programs would eventually follow that path.

cu,
Prefect
Widelands - laid back, free software strategy
Because registries are really really bad.

baaad.

Config files?

if your app is meant to be system-wide, then use /etc or /usr/local/etc or something.

if your app is user specific, then put it in ~/.coolapp/cool.conf

*whine whine* wheres the homedir!~!??? ahem ''man getpwent''
Advertisement
Ok, I''m not an expert, but here we go.

The registry is M$''s way of making many things regarding configs and such transparent to the user. With Linux you can look things up in the code, you can''t do that with windows, and that''s the way M$ likes it. They don''t want people looking at things and figuring out how they work, with Linux that''s no big deal at all.

Also, the registry does have a history of eventually shoving itself through the shredder or something else that messes it up over time.

Thus, Linux doesn''t need or want a registry.



(Stolen from Programmer One)
UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus
I still wish there was a standard config file format with standard I/O routines for it. Even if no one followed it, it''d still be nice to hear "This config file follows ISO 131213.45A standards for config files."

And Windows comes with API functions to write to and read from the registry. It''s really simple. But with config files, parsing and writing is up to each individual program.

Current Projects: GK3 for Linux | Landscape Engine | Bug Hunt
I like the DARK layout!
Every program has specific configuration needs.

Besides, every decent application does have some things in common, like # denoting comments.

For instance, why should my program, that only stores some short key=value pairs in a config file, have to include a pile of other crap because yours needs namespaces/etc?

Why should apache have to deal with "valid" key=value crap in its powerful configuration system.

Config file parsers are easy to write when the data you need is simple. Config file parsers are easy to write when the data you need is complex... *cough* XML *cough*

My config file parser is about 6 lines of C++. That beats the crap out of any library you could come up with.
I dunno about you, but I _____HATE_____ the windows registry. It's a good idea in theory, keeping all configuration data centralized, but it didn't work out so well in practice. The problem is that VERY VERY few programs remove their settings when you remove the programs, so you end up with crap you don't need wasting RAM (iirc the registry is kept in RAM, or at least windows tries to keep it in RAM) and slowing down your computer(higher 'n' makes any data structure slower unless it has an O(1) search time). You can try to go delete registry keys, but if you delete the wrong one you can totally kill your system. When a program keeps a single .ini file in the directory it was installed to, its easy to know which file to delete and its easy to find if the program doesn't delete it on uninstall.


quote:
Original post by BradDaBug
[...]And Windows comes with API functions to write to and read from the registry. It's really simple. But with config files, parsing and writing is up to each individual program.[...]
Actually, windows has a whole set of functions for manipulating ".ini" files, which have traditionally been used to store configuration information. I use them in any program of mine that needs to store configuration data - since I hate my registry being cluttered with crap I see no reason to clutter up other people's, and my programs so far don't require installation so there wouldn't be an uninstaller to remove the registry settings left by the programs if they used that instead.

[edited by - Extrarius on April 14, 2003 9:21:14 AM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

This topic is closed to new replies.

Advertisement