Comments (5)
There's also a mess of filesystem APIs in browsers which mostly only work in Chrome, so we should probably avoid them.
https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API (no firefox support)
https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction (limited firefox support)
https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API/Firefox_support
from earthstar.
There's also the Service Workers Cache API to consider.
Service workers only work when served over https
or localhost
. If you're trying to self-host a webapp on a raspberry pi, you're probably stuck on http
and can't use service workers.
from earthstar.
Other ways to avoid the 5mb localStorage limit
- Run your app in node and use StorageSqlite which has no size limits. Serve a webapp from there over localhost to the browser.
- Make an Electron app which should be able to use StorageSqlite
from earthstar.
IndexedDb resources
Tutorials
- https://developers.google.com/web/ilt/pwa/working-with-indexeddb
- https://hackernoon.com/use-indexeddb-with-idb-a-1kb-library-that-makes-it-easy-8p1f3yqq
- https://javascript.info/indexeddb
- https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB
Libraries
- idb - tiny wrapper that mostly adds Promise support
- dexie - another wrapper to make it easier to use
- fake-indexeddb - in-memory version of indexeddb, works in node, maybe useful for testing, but unsure how accurate it is at replicating browser bugs/quirks. Can also be used underneath dexie and maybe idb
from earthstar.
We could also build on top of RXDB which is very fancy, but it in turn is built on top of pouchdb which has its own indexes and data sync behavior, so this would be a stack that's too tall.
Could... Earthstar... be a storage adapter... underneath RXDB??? Unknown
from earthstar.
Related Issues (20)
- Upgrade SQLite3 dependency to 0.8.0
- Address private set intersection exploit HOT 2
- What is the rationale for the generateAuthorKeypair shortname only allowing lengths of 4 chars? HOT 1
- npm install error HOT 1
- Adding denoKV to doc drivers HOT 4
- ReplicaCache#onCacheUpdated not triggered until you call cache.queryDocs()? HOT 3
- Error compiling typescript file that imports earthstar npm package
- ExtensionKnownShares loading known shares from memory HOT 1
- Export a browser entrypoint with IndexedDB StorageDriver
- Port Discovery API + DiscoveryLan
- Add way to check if Auth has been set up yet
- Add way to check if given password is correct on Auth
- Auth should be an EventTarget and emit events
- Peer should be an EventTarget and emit events
- IdentityKeypair + ShareKeypair secretKey property should be Base32 encoded string
- "All-in-one" authorisation
- Lots of duplicate auth stuff in the store HOT 5
- Filter sparse documents from store results unless specifically requested
- Cinn25519 shortname encoding is incorrect
- TypeError: The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type undefined. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from earthstar.