Firefox OS/Cloud Storage: Difference between revisions
EdenChuang (talk | contribs) No edit summary |
EdenChuang (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
[[File:Cloud Storage Support Overview.png|550px]]<br /> | [[File:Cloud Storage Support Overview.png|550px]]<br /> | ||
Cloud Storage framework wants to support following features | Cloud Storage framework wants to support following features | ||
*Universal Storage API | * '''Universal Storage API''' | ||
Universal Storage API is a general API for web apps to access all kinds of cloud storage. | Universal Storage API is a general API for web apps to access all kinds of cloud storage. | ||
*Virtual Storage Interface | * '''Virtual Storage Interface''' | ||
Virtual Storage Interface is plugin system for cloud storage framework to extend cloud storage option. | Virtual Storage Interface is plugin system for cloud storage framework to extend cloud storage option. | ||
Line 12: | Line 12: | ||
Universal Storage API is a general API for web apps to access all kinds of storage.<br /> | Universal Storage API is a general API for web apps to access all kinds of storage.<br /> | ||
According to different purposes, Universal Storage API can be separated into following two categories | According to different purposes, Universal Storage API can be separated into following two categories | ||
*Document based API | * '''Document based API''' | ||
Document based API is used to help web apps save/operate their application data, such as indexedDB, on the cloud storage. | Document based API is used to help web apps save/operate their application data, such as indexedDB, on the cloud storage. | ||
*Filesystem based API | * '''Filesystem based API''' | ||
Filesystem based API supports web apps to access cloud storage with filesystem operations, such as file create, delete, open, read, write, close, etc.<br /> | Filesystem based API supports web apps to access cloud storage with filesystem operations, such as file create, delete, open, read, write, close, etc.<br /> | ||
Reference for Filesystem based API: [http://www.w3.org/TR/file-system-api/ W3C FileAPI] | Reference for Filesystem based API: [http://www.w3.org/TR/file-system-api/ W3C FileAPI] | ||
Line 27: | Line 27: | ||
[[File:Cloud Storage FUSE solution.png|550px]]<br /> | [[File:Cloud Storage FUSE solution.png|550px]]<br /> | ||
==== Benefits ==== | ==== Benefits ==== | ||
*DeviceStorageAPI provides well defined filesystem based API to access files/directories on internal storage and SD card. Once FUSE based solution supported, Web app can used DeviceStorageAPI directly to access cloud storage without any modification. | * DeviceStorageAPI provides well defined filesystem based API to access files/directories on internal storage and SD card. Once FUSE based solution supported, Web app can used DeviceStorageAPI directly to access cloud storage without any modification. | ||
*FUSE interface is a good reference for Virtual Storage Interface. By propagating FUSE interface to FirefoxOS, FirefoxOS can easy connect to many kinds of storage, such as cloud storage, NAS, etc. [http://en.wikipedia.org/wiki/ExpanDrive Here is an commercial example]. | * FUSE interface is a good reference for Virtual Storage Interface. By propagating FUSE interface to FirefoxOS, FirefoxOS can easy connect to many kinds of storage, such as cloud storage, NAS, etc. [http://en.wikipedia.org/wiki/ExpanDrive Here is an commercial example]. | ||
==== Drawbacks ==== | ==== Drawbacks ==== | ||
*DeviceStorageAPI is not a standard API for all browser. | * DeviceStorageAPI is not a standard API for all browser. | ||
*FUSE is not supported in all platforms. | * FUSE is not supported in all platforms. | ||
=== JS library solution === | === JS library solution === | ||
Line 38: | Line 38: | ||
==== Drawbacks ==== | ==== Drawbacks ==== | ||
== Framework Issues == | == Framework Issues == | ||
*Cloud Storage Account management and Authentication | * '''Cloud Storage Account management and Authentication''' | ||
*Data cache/buffering | * '''Data cache/buffering''' | ||
*Offline | ** '''Meta Cache''' - Each file has its meta data like mdate, cdate, size, etc. Meta Cache should store any meta information for each file or directory in order to avoid network transaction to retrieve a known information. | ||
*Security issues | ** '''Data Cache''' - Meta Cache talks about a file’s attribute, and Data Cache is for a file content. Data Cache should store a file content requested by user for each file in order to avoid network transaction to retrieve a partial file content as a block. | ||
** '''Cache Policy''' - Cache store entry can be flexible to adjust for different requirement, i.e. storage size. Any new request can replace one existed entry if the maximum entry is exceeded. ‘existed entry’ has not been well-defined yet, and it depends on user story. Cache policy can be aggressive to prefetch file content or meta, so the response time for each request can be improved. | |||
* '''Offline support''' - Any requested file content/meta will be stored in cache store, so the cache store is a subset of cloud storage. Cache system still can provide cached file content from cache store even no network connection. Considering error handling for new data/meta request is important in the case of no network connection. | |||
* '''Security issues''' | |||
= Related links = | = Related links = | ||
Line 47: | Line 50: | ||
*[[Webmaker/MakeDrive|MakeDrive]]<br /> | *[[Webmaker/MakeDrive|MakeDrive]]<br /> | ||
*[http://fuse.sourceforge.net/ FUSE(filesystem in userspace)]<br /> | *[http://fuse.sourceforge.net/ FUSE(filesystem in userspace)]<br /> | ||
= Previous works = | |||
*https://github.com/weilonge/unidisk | |||
= Related Bugzilla = | = Related Bugzilla = | ||
*[https://bugzilla.mozilla.org/show_bug.cgi?id=1035053 Bug 1035053 - [Device Storage<nowiki>]</nowiki> To Support Variant Cloud Storage] | *[https://bugzilla.mozilla.org/show_bug.cgi?id=1035053 Bug 1035053 - [Device Storage<nowiki>]</nowiki> To Support Variant Cloud Storage] |
Revision as of 06:41, 29 April 2015
Overview
This project aims at to support a framework for web apps to interact with cloud storage.
Cloud Storage framework wants to support following features
- Universal Storage API
Universal Storage API is a general API for web apps to access all kinds of cloud storage.
- Virtual Storage Interface
Virtual Storage Interface is plugin system for cloud storage framework to extend cloud storage option.
Cloud Storage Framework
Universal Storage API
Universal Storage API is a general API for web apps to access all kinds of storage.
According to different purposes, Universal Storage API can be separated into following two categories
- Document based API
Document based API is used to help web apps save/operate their application data, such as indexedDB, on the cloud storage.
- Filesystem based API
Filesystem based API supports web apps to access cloud storage with filesystem operations, such as file create, delete, open, read, write, close, etc.
Reference for Filesystem based API: W3C FileAPI
filer
DeviceStorageAPI
Virtual Storage Interface
Virtual Storage Interface is plugin system for cloud storage framework to cooperate with different cloud storage.
Proposed Solution(s)
FUSE based solution
Mounting Cloud Storage to device filesystem through the FUSE mechanism.
Benefits
- DeviceStorageAPI provides well defined filesystem based API to access files/directories on internal storage and SD card. Once FUSE based solution supported, Web app can used DeviceStorageAPI directly to access cloud storage without any modification.
- FUSE interface is a good reference for Virtual Storage Interface. By propagating FUSE interface to FirefoxOS, FirefoxOS can easy connect to many kinds of storage, such as cloud storage, NAS, etc. Here is an commercial example.
Drawbacks
- DeviceStorageAPI is not a standard API for all browser.
- FUSE is not supported in all platforms.
JS library solution
File:Cloud Storage JS solution.png
Benefits
Drawbacks
Framework Issues
- Cloud Storage Account management and Authentication
- Data cache/buffering
- Meta Cache - Each file has its meta data like mdate, cdate, size, etc. Meta Cache should store any meta information for each file or directory in order to avoid network transaction to retrieve a known information.
- Data Cache - Meta Cache talks about a file’s attribute, and Data Cache is for a file content. Data Cache should store a file content requested by user for each file in order to avoid network transaction to retrieve a partial file content as a block.
- Cache Policy - Cache store entry can be flexible to adjust for different requirement, i.e. storage size. Any new request can replace one existed entry if the maximum entry is exceeded. ‘existed entry’ has not been well-defined yet, and it depends on user story. Cache policy can be aggressive to prefetch file content or meta, so the response time for each request can be improved.
- Offline support - Any requested file content/meta will be stored in cache store, so the cache store is a subset of cloud storage. Cache system still can provide cached file content from cache store even no network connection. Considering error handling for new data/meta request is important in the case of no network connection.
- Security issues