Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to implement: File system provider API

145 views
Skip to first unread message

Kershaw Chang

unread,
Jul 24, 2015, 4:14:01 AM7/24/15
to dev-pl...@lists.mozilla.org
Hi all,

Summary:
File system provider API [1] is now supported by Google. This API allows
developers to create apps that support virtual file systems and make files
stored on these to be available by Device Storage API.

Use case:
One of the use cases is to let Firefox OS have the ability to access cloud
storage. With this API, users who install the app can have the cloud
storage seamlessly integrated into Firefox OS. Accessing files on cloud
becomes as easy as accessing locally.

Idea of implementation:
The idl should be very similar to Google's [2]. We plan to have this
available to certified apps only. This will be released to privileged app
until we think the implementation is mature enough.

Link to standard:
No formal specifications found on w3c. This API is only supported by Chrome
OS now.

Platform coverage:
Firefox OS only.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1187223

Estimated or target release:
We are looking to have this completed by Dec. 2015.

[1] https://developer.chrome.com/apps/fileSystemProvider
[2]
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/extensions/api/file_system_provider.idl

Thanks,
Kershaw

Jonas Sicking

unread,
Jul 24, 2015, 5:39:29 AM7/24/15
to Kershaw Chang, dev-platform
I think we should allow addons to implement something like this. But I
don't think it's something that we should let apps do.

/ Jonas
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform

David Rajchenbach-Teller

unread,
Jul 24, 2015, 6:49:44 AM7/24/15
to Jonas Sicking, Kershaw Chang, dev-platform
On 24/07/15 11:38, Jonas Sicking wrote:
> I think we should allow addons to implement something like this. But I
> don't think it's something that we should let apps do.
>
> / Jonas

So Dropbox, Cozy Cloud, etc. should be add-ons instead of apps? This
strikes me as odd.


--
David Rajchenbach-Teller, PhD
Performance Team, Mozilla

signature.asc

Jonas Sicking

unread,
Jul 24, 2015, 12:43:49 PM7/24/15
to David Rajchenbach-Teller, Kershaw Chang, dev-platform
On Fri, Jul 24, 2015 at 3:49 AM, David Rajchenbach-Teller
<dte...@mozilla.com> wrote:
> On 24/07/15 11:38, Jonas Sicking wrote:
>> I think we should allow addons to implement something like this. But I
>> don't think it's something that we should let apps do.
>>
>> / Jonas
>
> So Dropbox, Cozy Cloud, etc. should be add-ons instead of apps?

Yes. For FirefoxOS we're working on getting rid of installation for
"apps". Instead apps will be treated just like other web content that
you simply browse to.

In this model it doesn't make as much sense for apps to be changing
the behavior of the user agent. Why would navigating to Dropbox and
then navigating away from it suddenly change the behavior of your OS?
How do you revert it?

Instead we're going to use addons as the way that you customize your device.

/ Jonas

Kershaw Chang

unread,
Jul 25, 2015, 10:14:25 AM7/25/15
to Jonas Sicking, David Rajchenbach-Teller, dev-platform
Since the addon model on Firefox OS is not implemented now, I still use the
old term "apps" in previous mail.
I also think it makes much more sense to make this API to be only available
for addons.
In addition, do we have a way to let an API only be used by addons now?

Thanks.

Jonas Sicking

unread,
Jul 26, 2015, 6:31:54 PM7/26/15
to Kershaw Chang, David Rajchenbach-Teller, dev-platform
On Sat, Jul 25, 2015 at 7:14 AM, Kershaw Chang <kec...@mozilla.com> wrote:
> Since the addon model on Firefox OS is not implemented now, I still use the
> old term "apps" in previous mail.
> I also think it makes much more sense to make this API to be only available
> for addons.

Great!

> In addition, do we have a way to let an API only be used by addons now?

We don't currently. But that should be available soon once the new
addon architecture lands.

/ Jonas

Shih-Chiang Chien

unread,
Jul 26, 2015, 11:42:31 PM7/26/15
to Jonas Sicking, Kershaw Chang, David Rajchenbach-Teller, dev-platform
Hi Jonas,

Is there any document or bug for the new addon architecture? We'd like to
know more details and put it into our design.

Best Regards,
Shih-Chiang Chien
Mozilla Taiwan

Ted Mielczarek

unread,
Jul 27, 2015, 7:31:58 AM7/27/15
to Jonas Sicking, dev-platform
On Fri, Jul 24, 2015, at 12:43 PM, Jonas Sicking wrote:
> On Fri, Jul 24, 2015 at 3:49 AM, David Rajchenbach-Teller
> <dte...@mozilla.com> wrote:
> > On 24/07/15 11:38, Jonas Sicking wrote:
> >> I think we should allow addons to implement something like this. But I
> >> don't think it's something that we should let apps do.
> >>
> >> / Jonas
> >
> > So Dropbox, Cozy Cloud, etc. should be add-ons instead of apps?
>
> Yes. For FirefoxOS we're working on getting rid of installation for
> "apps". Instead apps will be treated just like other web content that
> you simply browse to.
>
> In this model it doesn't make as much sense for apps to be changing
> the behavior of the user agent. Why would navigating to Dropbox and
> then navigating away from it suddenly change the behavior of your OS?
> How do you revert it?
>
> Instead we're going to use addons as the way that you customize your
> device.

I've been actually thinking about this exact use case recently (storage
providers) and I think it would behoove us to figure out how to make
this work for webapps. If you require addons to make this work then
every storage provider needs to write addons for every browser, which
means that they're likely to just not have support for Firefox OS. If
you make this a web app feature instead, then providers can simply use
the web API and any user agent that supports it will get support,
meaning that Firefox OS is likely to be supported.

This is pretty similar in spirit to the existing
navigator.registerProtocolHandler, although I don't know how well that
API has fared in practice.

I think letting web apps extend the browser's capabilities is a good and
useful thing, and we should do more of it.

-Ted

Ted Mielczarek

unread,
Jul 27, 2015, 8:01:34 AM7/27/15
to dev-pl...@lists.mozilla.org
On Fri, Jul 24, 2015, at 04:13 AM, Kershaw Chang wrote:
> Link to standard:
> No formal specifications found on w3c. This API is only supported by
> Chrome
> OS now.

What's the motivation here? Do we expect this to get used by apps if
it's Chrome OS only right now? I've been looking into this problem space
(cloud storage for use by webapps) and the neatest thing I've run into
so far is https://remotestorage.io/ . That has the benefit of being
entirely content-side right now, which seems like a smart way to start
out. Extending something like that with browser hooks to make it better
seems like a smarter play than copying Chrome privileged APIs.

-Ted

Kershaw Chang

unread,
Jul 27, 2015, 10:49:04 AM7/27/15
to Ted Mielczarek, dev-platform
The motivation behind this is to let Firefox OS has the ability to access
files on cloud storage. With file system provider API, we can allow device
storage API to read/write files on cloud storage seamlessly. From user's
point of view, I think it would be better to use our current
music/video/gallery apps to acces user's files on cloud, but not other apps.

Eden Chuang

unread,
Jul 27, 2015, 2:21:45 PM7/27/15
to Kershaw Chang, dev-platform, Ted Mielczarek
For FirefoxOS devices, I think FileSystemProviderAPI provides a capability
to connect to other type of storage, not only well-known cloud storage, for
example Dropbox, but also user's private cloud. With FileSystemProviderAPI,
FirefoxOS provides apps a general or easy way, for example
DeviceStorageAPI, to access all kinds of storage.

I guess that storage providers might not be the one who write the storage
app or addon, OEM might also be the possible one, for example Panasonic
writes a Dropbox Addon for their smart TV to let user can play the pictures
or videos on the TV directly.

Jonas Sicking

unread,
Jul 27, 2015, 7:24:53 PM7/27/15
to Shih-Chiang Chien, Kershaw Chang, David Rajchenbach-Teller, dev-platform
On Sun, Jul 26, 2015 at 8:42 PM, Shih-Chiang Chien <sch...@mozilla.com> wrote:
> Hi Jonas,
>
> Is there any document or bug for the new addon architecture? We'd like to
> know more details and put it into our design.

I'd recommend reaching out to William McCloskey. He's currently
working on the desktop support. I suspect there will be more things to
point to once the initial support has landed.

/ Jonas




> Best Regards,
> Shih-Chiang Chien
> Mozilla Taiwan
>
> On Mon, Jul 27, 2015 at 6:31 AM, Jonas Sicking <jo...@sicking.cc> wrote:
>>
>> On Sat, Jul 25, 2015 at 7:14 AM, Kershaw Chang <kec...@mozilla.com>
>> wrote:
>> > Since the addon model on Firefox OS is not implemented now, I still use
>> > the
>> > old term "apps" in previous mail.
>> > I also think it makes much more sense to make this API to be only
>> > available
>> > for addons.
>>
>> Great!
>>
>> > In addition, do we have a way to let an API only be used by addons now?
>>
>> We don't currently. But that should be available soon once the new
>> addon architecture lands.
>>
>> / Jonas

Jonas Sicking

unread,
Jul 27, 2015, 8:05:50 PM7/27/15
to Ted Mielczarek, dev-platform
On Mon, Jul 27, 2015 at 4:31 AM, Ted Mielczarek <t...@mielczarek.org> wrote:
> On Fri, Jul 24, 2015, at 12:43 PM, Jonas Sicking wrote:
>> On Fri, Jul 24, 2015 at 3:49 AM, David Rajchenbach-Teller
>> <dte...@mozilla.com> wrote:
>> > On 24/07/15 11:38, Jonas Sicking wrote:
>> >> I think we should allow addons to implement something like this. But I
>> >> don't think it's something that we should let apps do.
>> >>
>> >> / Jonas
>> >
>> > So Dropbox, Cozy Cloud, etc. should be add-ons instead of apps?
>>
>> Yes. For FirefoxOS we're working on getting rid of installation for
>> "apps". Instead apps will be treated just like other web content that
>> you simply browse to.
>>
>> In this model it doesn't make as much sense for apps to be changing
>> the behavior of the user agent. Why would navigating to Dropbox and
>> then navigating away from it suddenly change the behavior of your OS?
>> How do you revert it?
>>
>> Instead we're going to use addons as the way that you customize your
>> device.
>
> I've been actually thinking about this exact use case recently (storage
> providers) and I think it would behoove us to figure out how to make
> this work for webapps.

I agree that it's great if we can expose this to web content.

I don't think registerProtocolHandler has nearly enough API surface to
support what's needed here. But if you mean copying the idea that
there's a function call which displays a UI prompt which allows the
user to accept/deny then that could work.

One important question here is once, say, Box has registered as
filesystem provider, does that mean that other websites can read/write
there without any prompts?

If not, who provides the UI of those prompts? Does the browser provide
that UI, or do we somehow enable Box to display that UI?

This also affects what the UI looks like at time of registration.

/ Jonas

Sean Lee

unread,
Jul 28, 2015, 12:14:28 AM7/28/15
to Ted Mielczarek, dev-platform, Jonas Sicking
On Mon, Jul 27, 2015 at 7:31 PM, Ted Mielczarek <t...@mielczarek.org> wrote:

> On Fri, Jul 24, 2015, at 12:43 PM, Jonas Sicking wrote:
> > On Fri, Jul 24, 2015 at 3:49 AM, David Rajchenbach-Teller
> > <dte...@mozilla.com> wrote:
> > > On 24/07/15 11:38, Jonas Sicking wrote:
> > >> I think we should allow addons to implement something like this. But I
> > >> don't think it's something that we should let apps do.
> > >>
> > >> / Jonas
> > >
> > > So Dropbox, Cozy Cloud, etc. should be add-ons instead of apps?
> >
> > Yes. For FirefoxOS we're working on getting rid of installation for
> > "apps". Instead apps will be treated just like other web content that
> > you simply browse to.
> >
> > In this model it doesn't make as much sense for apps to be changing
> > the behavior of the user agent. Why would navigating to Dropbox and
> > then navigating away from it suddenly change the behavior of your OS?
> > How do you revert it?
> >
> > Instead we're going to use addons as the way that you customize your
> > device.
>
> I've been actually thinking about this exact use case recently (storage
> providers) and I think it would behoove us to figure out how to make
> this work for webapps. If you require addons to make this work then
> every storage provider needs to write addons for every browser, which
> means that they're likely to just not have support for Firefox OS. If
> you make this a web app feature instead, then providers can simply use
> the web API and any user agent that supports it will get support,
> meaning that Firefox OS is likely to be supported.
>
This is pretty similar in spirit to the existing
> navigator.registerProtocolHandler, although I don't know how well that
> API has fared in practice.
>
> I think letting web apps extend the browser's capabilities is a good and
> useful thing, and we should do more of it.
>

I agree that web apps extend the browser's current capabilities is a good
way,
but there is a limitation that a video file has to be downloaded entirely
and assign
the video to a video tag than. (File-based Implementation)
Users have to wait for file downloaded entirely than watch the video,so the
response time is too long to enjoy media files.

Media Source Extension is a tool for playing the partial content which is
steamed,
but the challenge with HTML5 audio and video is still the fragmented
support for
audio and video formats. However, fragmented video/audio is not a very
common
format for users.

If one file reading request can split into multiple blocks/requests and the
content
still can be played normally, the response time can be shorten.
(Block-based)

The file reading request from Device Storage API will split into multiple
requests
by FUSE like this:
static int bindings_read (const char *path, char *buf, size_t len, off_t
offset, struct fuse_file_info *info)

so file system provider can handle the above request to retrieve the
partial content at offset.
For example, the content consumer of Video player can play the partial
content once it is retrieved.

Thanks.


> -Ted
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>



--
Sean Lee
Front-End Software Engineer, Firefox OS Devices
Mozilla Corporation

Jesper Kristensen

unread,
Jul 28, 2015, 10:52:26 AM7/28/15
to
Den 28-07-2015 kl. 02:05 skrev Jonas Sicking:
> I don't think registerProtocolHandler has nearly enough API surface to
> support what's needed here. But if you mean copying the idea that
> there's a function call which displays a UI prompt which allows the
> user to accept/deny then that could work.

I don't think anyone should try to copy the registration UX of
registerProtocolHandler (or Web Intents or Web Activities). None of
these technologies have gained any popularity, and I suspect that may be
because the registration UX is bad. It prompts the user about something
technical the user may not understand at a time the user don't need it.

-
Jesper Kristensen

Jonas Sicking

unread,
Jul 28, 2015, 12:40:04 PM7/28/15
to Jesper Kristensen, dev-platform
WebActivities doesn't really have a registration UI. But it depends on
installation, and it is FirefoxOS specific. Both of which is likely
big reasons that it hasn't seen much pickup.

/ Jonas

Kershaw Chang

unread,
Aug 5, 2015, 11:16:25 AM8/5/15
to Jonas Sicking, Jesper Kristensen, dev-platform
Hi All,

It seems there is no strong objection to this API, so we would like to
start the implementation.
If you have any further question, please leave your comment on *Bug 1187223*
<https://bugzilla.mozilla.org/show_bug.cgi?id=1187223>.

Thanks.


On Wed, Jul 29, 2015 at 12:39 AM, Jonas Sicking <jo...@sicking.cc> wrote:

> On Tue, Jul 28, 2015 at 7:52 AM, Jesper Kristensen
> <moznew...@something.to.remove.jesperkristensen.dk> wrote:
> WebActivities doesn't really have a registration UI. But it depends on
> installation, and it is FirefoxOS specific. Both of which is likely
> big reasons that it hasn't seen much pickup.
>
> / Jonas
0 new messages