Hi :hugs:
While both Microsoft and Google are pushing PWAs like crazy, the amount of documentation about the requirements for the database seems quite sparse.
Are you one of those? :smile:
GunDB will work in PWA's. Just pull via CDN as you would any other library. Then make sure you also pull in indexedDB.
Documentation here might also be sparse, but we got the Gitter channel https://gitter.im/amark/gun which is full of awesome people answering questions etc
Just updated the German Wikipedia accordingly. I recommend advertising the hell out of this, since it seems like IndexedDB is the only Database (yet) which is almost always mentioned when it comes it PWAs. So GunDB relies on IndexedDB? Very interesting
Danke schoen.
Gun is a graph database and protocol. It runs both in node and browser, so it's 'storage' agnostic if you will. @amark wrote a storage system called RAD that turns data into a radix tree and can save it to a file system, localStorage, IndexedDb and even clouds like S3. Not relying on a customer storage allows people to start with one and change to others as they scale up.
I think one of the big focuses of Gun is syncing across peers (consistent updates) and making sure that even if you go offline it still captures your updates correctly.
There are a couple of databases who can do so. Like: RxDB, PouchDB and even one library that allows writing web apps completely without any backend, called Hood.ie.
One interesting benefit that both RxDB and PouchDB offer, is that they can sync to CouchDB and others.
Is something possible with Gun as well?
Definitely. Notabug.io a large Reddit like website, uses Gun with a Redis Adapter for backend and did use localStorage in Browser. I believe there is a Couch/Pouch Adapter, would have to check. But it's not too hard to write an adapter for almost any other database to use as a back end. And RAD makes sure that all the data ends up in the same graph structure, where ever it might be saved, so you can run one peer on Couch, one on Redis and one on Mongo and no one would know the difference
Thanks a lot, I will look into this. Also, this is surely worth mentioning. Docs, homepage...
PWA`s didn't take off because no term was coined. It was simply a combination of different things which allowed you new things. This is why I think specifically naming them as Google, Microsoft and lots of Javascript nerds to today does indeed increase its adoption.
Nice days :hugs:
Are you saying documentation should state that Gun can work with PWA?
Yep
@Dletta you are amazing for helping out. :)
@ShalokShalom all the doc pages are editable on the wiki ( https://github.com/amark/gun/wiki ) just click the "Pages" dropdown on the right to search for any/all pages, then can edit. Would <3 <3 <3 a lot if you could add PWA keywords. :)
I'm gonna consider this closed now - this would make a great https://stackoverflow.com/questions/tagged/gun if you could copy & paste @Dletta 's answer in, much better than here (since this is more for bug reports). Thanks again!