First of all: bravo. I've been resisting the urge to write this for a long time since I'm too busy with other things, but now that it exists I might very well use it.
However, the docs suffer from a common issue of being written for someone who already understands GunDB. :smile:
Here are some things that are very unclear to me:
Not complaining too much. I am getting a sense of it, and being a developer too I understand that docs often come last.
Ahh... two more things I can't glean from the docs:
Just saw this, will read through it when I get a moment - but your initial point "written by somebody who already understands gun" rings true. I'm excited for us (the team) to look through this!
Yeah I'm willing to help from the perspective of a naive new user who is experienced with a lot of other things: SQL, Redis, memcached, and various p2p distributed systems.
I'm the author of: https://github.com/zerotier/ZeroTierOne -- we're considering GunDB for the next version of our web admin UI and backend. Right now it's PostgreSQL but I've been wanting something... well... just like this.
Here are some quick responses - although I believe your comments are suggestions on how we should rewrite things ( @metasean & @PsychoLlama ). But I want to answer your questions as well:
B1. It can, but it doesn't have to. Typically it only streams the data that it needs, however if the client side logic needs to do more complicated queries, then it'll naturally stream in and caches more data. On future lookups, the queries can be done on whats in memory - which is much faster than via the network.
B2. Only server peers hit S3 and they only do it when they don't already have the data cached.
I hope this fast response provides some initial clarifications. I'm happy to follow up. Like I said though, I'll be in Europe over the weekend, and will be back state side next week but will be pretty busy then as well. But we hope we can get you started in the mean time.
@adamierymenko just checking in, how are things going?
For me, I came to the docs looking for how to setup my own peer, and after a lot of searching I can't figure it out. I was expecting this to be mentioned somewhere in either the getting started or the github readme.
Hey @samspot!
You're right, that should probably be added to the Getting Started page. I'll add a link there...
Right now, browsers can't connect to other browsers directly (even with WebRTC you need to start with a server), meaning you've gotta have at least one gun server that acts as a relay for your browsers.
We've got a wiki page showing how to set one up, hopefully it helps. Thanks for bringing this to our attention!
What @samspot said for me too.
A real-world example of migrating to Gun would be incredibly useful, I think for a lot of people. Take say an existing simple 'hello world' mobile app which connects to a remote back-end for put & get. What are the steps to get the same app working with Gun? Setting up the remote peer; sending data from the app, retrieving data from the remote peer.
That would certainly help fill gaps in understanding for me
@samspot and @steveharman and @ldiebold thank you for complaining about this! Jesse is working on a gun starter application boilerplate as we speak for you guys and we'll get it posted / added to docs/examples/readme/wiki whatever.
Once it is up, please let us know if it is what you were wanting or if you were wanting something else. :)
Got it posted! Here's the boilerplate. I tried to keep it minimal, showing how the browsers and servers work together. Hopefully it helps?
Hey all, great recommendations. I believe we've gotten many of them pulled in now, and it has been a while since there has been activity on this issue. So I'm gonna close it BUT DO NOT HESITATE TO REOPEN as issues like this are helpful (other "discussion" oriented issues have been moved, but ones like this, on documentation improvement, to me are as [if not more important] than "bugs").
Also, please feel free to contribute directly to the wiki as well! Or it looks like https://github.com/amark/gun/issues/70 is being used as a general open issue as well. Cheers! Thanks guys!
Most helpful comment
For me, I came to the docs looking for how to setup my own peer, and after a lot of searching I can't figure it out. I was expecting this to be mentioned somewhere in either the getting started or the github readme.