什么是文件系统协议以及它如何工作?
作为示例,我将选择 Plan9 的文件系统协议,称为 9P(又名 Styx)。 正如维基百科的文章所述:
9P 是一种网络协议,作为连接组件的方式而开发(...) Plan 9 系统的组成
的角度来看,应该使用哪些技术来构建这样的模块通信系统。支持该协议的操作系统(阅读 Unix 衍生版本)有哪些要求。
在我的理解中,整个网络的每个组件(id est,应用程序,模块)都必须有一个私有控制器(或者这个控制器应该在整个系统中共享?),以发送请求和接收响应,能够执行单个应用程序的内部逻辑和通信协议本身(可能是特定语言,例如 XML?、数据库,甚至某种信息的文件系统反映?)之间的转换任务。从这个(我的)观点来看,所描述的系统可以被定义为客户端-服务器体系结构的变体,但被投射到本地或受限网络范围,并强调直接数据访问和效率。这就是我对文件系统协议设计的看法...
我刚刚开始研究操作系统的进程/应用程序通信技术,并希望开发一个迷你文件系统协议来看看这个概念的实际应用。由于理论基础的泄露,我没有任何实际和具体的工作计划,所以欢迎任何解释、文献建议、例子和只是评论!
Just as example I will pick up Plan9's filesystem protocol called 9P (a.k.a Styx).
As the article in Wikipedia states:
9P is a network protocol developed (...) as the means of connecting the components
of a Plan 9 system
I want to know, from the programming perspective, what are the technologies that should be used to build such a module communication system. And what are the requirements for the operating system (read Unix derivatives) to support this protocol.
In my understanding, each component (id est, application, module) of the entire network must have a private controller (or should this controller be shared across the system?), to send requests and receive responses, with the ability to perform the translation tasks between the internal logic of the individual application and the communication protocol itself (may be a specific language such as XML?, database, or even some kind of filesystem reflection of information?). From this (my) point of view the described system may be defined as a variant of client-server architecture but been projected to the local or restricted network scope and with emphasis on direct data access and efficiency. That's how I see the design of a filesystem protocol...
I just initiated the study of operating systems' process/application communication techniques and would like to develop a mini filesystem protocol to see this concepts in action. I don't have any real and concrete work plan due to leak of theoretical fundaments so any explanations, literature suggestions, examples and just comments will be welcome!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在
/sys/doc
部分(或在线 html, ps、pdf)。其工作的高级方式与您的理解类似,系统有 17 种协议消息(例如
open
、create
、walk
和删除
)。有一个 RPC 机制负责从服务器发送和接收消息。以下是该论文的引用:Plan9 的巧妙之处在于该接口在操作系统中无处不在。很多东西都提供这个接口(文件服务器)。
You can read all about the Plan9 network in the
/sys/doc
section (or online html, ps, pdf).The high-level way that this works is similar to your understanding, the system has 17 protocol messages (stuff like
open
,create
,walk
andremove
). There is an RPC mechanism that takes care of sending and receiving the messages from the server. Here's a quote from the paper:What's neat about Plan9 is that this interface is ubiquitous in the operating system. Lots of things present this interface (a file server).