Platform/AreWeFunYet: Difference between revisions

Jump to navigation Jump to search
Line 212: Line 212:
= Local file storage =
= Local file storage =


'''TODO:''' fill this section
== Current state ==


IndexedDB is an API for client-side storage of significant amounts of structured data and for high performance searches on this data using indexes. While DOM Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data. IndexedDB provides a solution.
We support IndexedDB almost completely as of Firefox 11. The main missing part is error handling isn't up to spec yet.


IndexedDB provides separate APIs for synchronous and asynchronous access. The synchronous API is intended to be used inside workers.
IndexedDB supports storing File and Blob objects directly in the database. When that happens we store the File/Blob as a separate OS-file which means that performance is very good and doesn't affect the performance of the database.


* Developer: Jonas Sicking
You can also use IndexedDB as just normal data storage rather than read it out yourself from custom file formats. This likely won't have significantly different performance, but can be more convenient.
* Target Firefox Version: 11
 
* MDN Article: https://developer.mozilla.org/en/IndexedDB
When you store things in IndexedDB Firefox will prompt the user when the first database for your origin is created. If the user answers yes, the site is granted 50MB of storage. When you hit that limit, the user is prompted again and if he/she answers yes again, the site is granted unlimited storage.
* Appcache, IndexedDB
 
* What do game developers really need?
Hopefully we can remove the prefix for IndexedDB in the Firefox 14 or Firefox 15 timeframe.
* equivalent in Flash, Silverlight?
 
== What we're currently working on ==
 
We're currently working on an API to let you do more direct File-IO. I.e. the ability to open a 10MB file, seek to the middle of it, and write 100 bytes of data there. The storage for these files will still be IndexedDB.
 
We're also going to remove the prompting for any website that gets installed as an OWA App. All OWA apps will likely get unlimited storage space without any prompting. You will be able to tell when you're installed as a OWA app and thus have this storage space available.
 
== What we're planning on doing in fairly short term ==
 
We want to adding the ability for websites to write IndexedDB, and other, data "optimistically" without prompting. I.e. the website will be able to indicate that a given chunk of data doesn't need to be permanent and can be deleted if the user runs low on space. That way we won't need to ask the user before using the user's resources, but in turn we will delete the data if there is that need.
 
We'll likely also add APIs for doing synchronous IO from inside workers. That way emscripten should be able to compile programs that read and write directly to disk.
 
== Longer term we're also planning on ==
 
Adding APIs for dealing with .zip files.
 
Adding APIs for interacting with the HTTP cache. I.e. to load URLs into it, enumerate what's there, and possibly extract cache tokens that ensure that data remains in the cache as long as the token is held alive.
 
Adding APIs for converting between Typed Arrays and strings, in both directions. ''We should find someone that can work on this in a more short order''


= WebSockets =
= WebSockets =
Confirmed users
716

edits

Navigation menu