[once again from the right address]
These are pretty rough; feel free to ask about anything that you'd
like to know more about.
The basic summary is that Mozilla has come around to the idea of
supporting a FileSystem API, but doesn't like the one we've been
working on in the WebApps working group for the past few years, so
they're proposing a new one:
http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0382.html
There was more discussion of this at the WebApps WG face-to-face
yesterday as well:
http://www.w3.org/2013/04/25-webapps-minutes.html#item13
2013-04024
Attendees:
Eric Uhrhane - Google - FileSystem
Brian Stell - Google - Internationalization
Steve VanDeBogart - Google - Media Galleries
Jonas Sicking - Mozilla - Web API standards, especially IDB and File
Jan Varga - Mozilla - storage API implementer
Ben Turner - Mozilla - IDB implementer
Eric
No strict agenda
Want to hear thoughts on new filesystem api
Brian is a FileSystem api user
Steve works on media gallery
Jonas
based on blog post, we think we need an FS API
persistent urls
people understand it
don’t want to use IDB as a FileSystem
not married to current api, but want the capabilities
met with apple they had similar concerns, api is too complicated
came up with similar proposal to theirs
want file locking
at meeting with Apple about 3 weeks ago (before blink fork), came up
with joint proposal between Maciej’s and Jonas’s specs
will publish spec later today
Is apple really interested in implementing this?
not opposed to it, perhaps, but that was before the blink fork
Discussion of the API proposal below.
potential security issues with “give me a writable form of this File”,
given that other APIs that vend Files will assume they’re read-only
still thinking about directory enumeration; future does not have cursor yet
Tab Atkins has some thoughts on this
get file -> future
also readAsText, readAsArraybuffer
maintains locks
thinking move these to file object
file object can interact with other apis
awkward to add locking, awkward to use
The FileReader is like XHR because people asked for XHR, since everyone knows it
discussion public cord list
why not like other JS apis
keep it consistent with DOM apis
better to create a good api rather than consistent with DOM apis
Steve: to validate as media file before writing, write locally first, then move
wants atomic move to a different filesystem
can future have moveTo/copyTo
want simple put method
here is name, here is blob, done
works as a file copy, but can’t be used for easy directory copy
put could be a small amount of JS
common use case
recursive copy would be more complicated and messy
put got renamed as create
rename is an alternate to move
prefer move
this API has only one filesystem
Same as Google API; the name field is only decorative
temporary/persistent split means we can still have multiple
filesystems in either API, which means we can use this for media
galleries
apple not interested in access to media
no strong opinion on recursive copy support
if api gets too big apple will likely push back
api is nice locking
differences vs. Google FS API
do not have file locking
do not have atomic append
do not have flush
persistent URLs
what the URLs would be
persistent URLs in IDB
G not looking for this
not necessary if we have a fileystem
not sure, if we persistent URLs in filesystem
do we need them in IDB
annoying to register with each data
perhaps navigation controller do this
performance, latency
apple have their own particular problems
blink
what would IDB need to make a poly
persistent URL
file locking
cramming the filesystem in IDB will make it bloated
only put in IDB if
filesystem is failing
?
palatable vs potentially acceptable
only if other things fail
is apple considering IDB
could be made to work in webkit with not too much work
apple is not against IDB
apple asked if these feature could be handled in IDB
microsoft, only if 3 players
could do as a poly fill with some extensions to IDB
not expected to share outside apps
very complicated to make work with code outside the browser
path name length issues
feedback on blog post was confused about who can see the files
scary to use real filename / filename extensions
make security issues worse
real files give speed
do we want the directory abstraction?
had top level directory
what do people understand
directory abstraction is useful
helps with disjoint storage area
treat directory as a capability, pass directory object to someone else
share between domains
get parent
need to consider security
no get(“..”)?
can one get file path to find parent?
using ‘./’
directory level locking
not needed
what happens if one is writing a file into and the other is removing
for more serious locking use IDB
define what happens when one is writing and another is removing
don't lock by creating a file
want common file behavior
how many browsers
chrome has filesystem api
in use
no future
want a filesystem api
poly fill
missing locking
if there are 2 other browsers then chrome will implement
adrian - we have no interest
Brian’s use case:
He works on internationalization. They’re experimenting with web
fonts to get consistency across platforms. Chinese/Japanese fonts are
huge, and have terrible download latency.
Two use cases: drive-by web, and returning to a site previously visited.
On first visit, background-download the font for later. Add some CSS
to the filesystem as well for use. On second visit, use persistent
URL to CSS file in HEAD request to see if you can use the stored font
or not.
Latency in fonts is critical. If you draw in a fallback font and
later switch to the good font, you get a “Flash Of Unstyled Text”
[FOUT], which is unacceptable. So we need to decide one way or the
other before drawing at all, so there’s no time to do an async IDB
request. The decision is made in the HEAD.
Separate use case: In CJK pages, count #unique characters per page.
Simplified Chinese has about 21000 characters. To cover 50% of web
pages, you need more like 5000 characters. On an individual page,
though, 98% of pages uses fewer than 800 characters. So if caching
per-page subset, your download is much smaller, and can be computed
server-side. You can’t do this in AppCache, but you can
incrementally-load the font files and construct them on disk using the
filesystem API. So each new page gets the benefit of previous pages,
but downloads are smaller.
[discussion on speed effects of persistent URLs vs IDB; conclusion is
that URLs are faster, by some unknown amount, and are likely to stay
that way]
CORS
very tight sandbox
SHA1 ids
copy-on-write
would like a way for origins to cooperate
Media galleries
(some group) sys apps?
media galleries in phase 2