注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

My Unix World

不要迷恋Unix,Unix只是计算世界很小的一部分!

 
 
 

日志

 
 

Compare the registry and configure files  

2009-07-17 02:53:45|  分类: view-unix |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
We all know there is a registry in Windows platform, and we all know that there is lots of configure files on Unix or similar systems, what's the difference? how about the advantage and disadvantage?
1, If you keeps all your configure information in one file(Such as registry does), it will be less safety, as this large file maybe broken down, or maybe deleted wrongly. When the applications need to access these information, how about the lock? Does the apps can access the configure info they have none privilege to read or write? If there is 2 process want to access the registry at the same time, how to resolve it? And, the format of different configure info will var largely form one to another, how to resolve this issue too? For example, the configure information for Apache, NFS, FTP, Iptables will not the same as Vim and Gdm, how should we design the format of the data? Seems really hard. If there is none solution but we still want to store all the info in only one file, we will cut the configurability of these applications, as the Microsoft Windows does.
But on the other hand, we will store almost all the information into Database in almost all the morden Enterprise systems, what's the difference? How could we known it's will be better when we stores all the info or data together?
2, There is also disadvantage for Unix configure files. All the apps need to read the and write the configure files themselves, but why write some library or some tool to do the file reading job?
And, is there really there is any difference between /etc directory and registry file? I think we can treat the /etc directory as a single file if we like, they have none difference, infect.
Of course, the good thing is that the application will be more configurable and more extensible, then the application will be more powerful.

Then, I really don't know which method is good and which is bad.....(This article have not finished, to be continue ....)

Please do not just say that registry is urgly as you hate Microsoft Empire, and also please don't judge the configure files as deadly complex enough to use just because of your lazy. We need to think about the difference between the two kinds of idea, then, we can get a more deeper understanding.

==================
The ms registry is a rubbish, but we still need to think over why we don't store all the configure info or data into to a single database? which method is better and which is worse?

Of course, the answer is: File will be simple to use than database, it will cost less cup time and memory when we access a file than a database. And we need to maintain the configure info of the database itself, too. Then, why don't we try a more light weight database, similar as registry?

If we treat registry as a file(but i don't what registry really is, and not care about too), we still need to access this file via the C lib file operate functions. To keep the application extensible, we need to allow applications vary when they need, then, it's still need the application deal with the configure info itself. As we have a PCRE library and other libs, it's easy for the application deal with these info themselves, and there is none additional difficult than deal with the single configure file by some app dealing a single but whole configuration file.

If we like, we can treat the /etc directory as a single configure file, that will be ok.

===================
There is an ugly feature on Unix too, why don't save the user configure file to ~/etc/*, as the system does, but saves them as ~/.* , just a history reason?

===================
To compare the "separated unix configure files" vs "keeps data together for all the modern Enterprise system." when times free.
  评论这张
 
阅读(231)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017