Moving beyond localStorage

Mo Bitar on January 17, 2017

It's hard to believe that as of 2016, the best method for offline storage in a web app was localStorage, a simple string-only key value store wit... [Read Full]
 

The problem with indexedDB is that the api just broken by design. Before I started creating RxDB (github.com/pubkey/rxdb) I persist to solve my needs with indexeddb, but it was just a hurt to the project. Nothing works as expected and when it works on chrome, it off course does not on firefox.
Basically this happens when you sit 10 non-programmers into a room and let them build a consensus on the specs for a complex database.

In my opinion the browsers should provide the simpliest and fastest key-value-store possible and the devs can build next to everything on top of it. No mather if you need a graph-db, mysql-syntax or noSQL, you could just use the right javascript-lib to have it.

This would also make it easy to use the same code for the browser, the desktop, nodejs or mobile apps, since every environement just needs to have the simple key-value-store api. (compareable to leveldb)

 

I've had very little difficulty building a simple key-value store on top of IndexedDB that works on Chrome, Firefox, Safari, and Edge. Source here: github.com/standardnotes/web/blob/...

 

IndexedDB had some notable implementation bugs in the past, but they're mostly solved by now. If you don't feel comfortable using it, you can always rely on libraries like PouchDB or Dexie.

 

Wow, I was not aware of this. These APIs could fundamentally change the way we architect the flow of data within a web application.

 

"Whereas the performance of a key derivation function like PBKDF2 in CryptoJS clocked in at around 5,000 hashes in 6 seconds, my simple WebCrypto tests had no problem running 1.5 million hashes in less than a second. This is the crypto library that the world of web apps have been so desperately awaiting."

Wait, aren't fast hashing algorithms problematic? Does that not make it easier to brute force the encryption? Is this algorithm asymmetric? How many hashes can you check in one second?

 

We use Azure local storage for storing any of our logging needs.

code of conduct - report abuse