I am interested in adding more filesystems to NaCl as a part of GSOC. As given in the ideas page, I'm focusing on the online filesystems currently( Drive , dropbox) etc.
However, i'd like to how exactly to approach the problem. The currently supported filesystems aren't very similar to these.
--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.
Sounds reasonable.
I'd like to have your views regarding this, so I can know where I'm going wrong with my approach. I also modified the implementation, and have run into a few problems.
Implementation
My current idea is to have a cache layer, which mounts a cache dir using html5fs and the target remote dir ,say OnlineFS. Devs using nacl_io will mount only the cache layer and define the required remote dir in the settings option of the mount call. There will be different OnlineFS implementations implementing the basic IO function. For example, dropbox has a HTTP api( which will need URLLoader calls), while GDrive uses JS( using jsfs? )
Problems
- Authentication. All of these remote dirs use OAuth. My idea was that the authentication is left to the app dev, who only passes the OAuth token(using postMessage in the js scripts) to the NaCl module, after the filesystem has been mounted. The OnlineFS calls then use this token as required. Is this acceptable?
- I'm having trouble identifying how exactly nacl_io exposes the POSIX calls. In the examples, I've seen the use of the POSIX calls, but I can't find their implementation anywhere. My understanding was I'll have to provide implementations of these calls in my classes using the PPAPI methods, so I feel like my approach is wrong somewhere.
Thanks,
Mainak
Thanks,
Mainak
I have three more questions:
- Some remotes, like GDrive, Box and Amazon Cloud Drive, need the project to be registered for the API to work. How do I go about this?
- Scope of the project. At the moment, my plan is to implement around 5-6 remote drives. My plan is to implement a remote drive and create a demo to test it, and then work on the cache system. Once the whole implementation is tested properly, extending it to other remote drives should be easier. Is the scope of my work sufficient for a GSOC project, or should I look at more filesystems?
- Privacy. Once a file has been cached, it will be available to anyone unless deleted. If some sensitive files are cached, this might be a problem. Do i need to think about this?
Thanks,
Mainak
--
I made the necessary changes . Please have a look. I'll submit it after you give the go ahead: http://pastebin.com/HxV8YBcD
--
Could you explain what you mean by aggressive caching?
My understanding till now has been that the caching process will be on demand - only before and after file operations. This won't leave the cache stale compared to the view the client has of the cache at any point. A background thread may be kept which polls the server periodically for any changes in the files open in the cache. Files which are changed are retrieved automatically. But this will introduce more network traffic than the on demand caching, and it might lead to clashes where the cache and the server versions are different. Is this behavior acceptable?