如何使用 python 在 google app engine blobstore 上创建一个简单的虚拟文件系统?
有一个Java版本的GAEVFS,看起来很有效,但也很复杂。
以及位于 http://code.google.com/p/pyfilesystem/ 的 Python vfs 集合这不是为 GAE 设计的。
Google 锁定了其文件系统并将临时文件清空,这需要解决方法。
我必须使用 GAE blobstore/file API 来模拟 Linux 风格的目录文件所有者权限行为。
是否可以?我应该实现哪些最基本的类、属性和方法?
提前致谢!
There is a Java version GAEVFS which seems quite effective but also complicated.
And a Python vfs collection at http://code.google.com/p/pyfilesystem/ which is not designed for GAE.
Google locked its file system and make tempfile empty, which needs a workaround.
I have to build a simple vfs with GAE blobstore/file API to emulate a Linux-style dir-file-owner-permission behavior.
Is it possible? What are the most fundamental classes, attributes and methods I should implement?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您尝试在 GAE 中实现 FS,请做好迎接痛苦世界的准备。即使您迁移到托管虚拟机,您也无法在 GAE 上写入文件重新启动时您的磁盘将被擦除。
您基本上必须模拟文件系统接口并将其转换为数据存储实体和关系。
这是可以做到的,但你必须从头开始做。
如果您想要一个云文件系统,我建议您考虑云存储,它实际上允许您处理文件,它实际上实现了基本文件系统的大部分功能。
If you are trying to implement FS in GAE prepare for a world of pain. You can't write files on GAE, even if you move to Managed VMs your disk will be wiped on restart.
You'll basically will have to emulate a file system interface and translate that to datastore entities and relations.
It can be done, but you are gonna have to do it from the ground up.
If you want to have a cloud file system i suggest you consider cloud storage which actually allows you handle files, it actually implements most of the features of a basic file system.