This is an interesting, real-time db.
http://gun.js.org
Is this something someone is planning to take on any time soon? If not we might want to close it. I don't think it makes sense to keep an issue open for every database out there. If we really want to support it we should probably just create the repository.
Yeah I keep wanting to play with this because it looks intriguing, but realistically there is too much fun elsewhere.
+1 - would be great to include a nice distributed graph-like js db
Yeah @irthos. I keep looking for a time window to sneak in some development time for this into my schedule.
@marshallswain time is always scarce :)
The versatility of gundb is very promising. being able to run on browser/server/p2p makes it standout from the crowd. however, i'm not sure of it's speed at scale so that's a concern. a hacky workaround seems to be using graphql on nedb but that complicates my concept of development.
So I'm new to Feathers but it was fairly trivial to create a custom service. First yarn add gun, then I generated a service and called it '/gun'. In the gun.class.js's find method I added the example code from Gun's github but didn't include the http server code. Out of the box, it reads/writes to data.json.
find (params) {
logger.info('baby, get your gun ', Gun);
const gun = Gun({
file: 'data.json',
web: server,
s3: {
key: 'XXXXX', // AWS Access Key
secret: 'XXXXXX', // AWS Secret Token
bucket: 'XXXXXX' // The bucket you want to save into
}
});
gun.get('narc').put(params);
gun.get('narc').on(function(data, key){
logger.info('update:', data);
});
return Promise.resolve([]);
}
That's pretty easy. Prolly take a bit more work to get S3 working right and setup various watchers but we're on the way.
When I looked at this, the .find method will have to use gun.map: http://gun.js.org/docs/map.html to loop over all records in a database and find matches. It's a little weird that way, but the rest looks pretty simple to setup. @irthos the feathers-cli comes with a feathers generator plugin command if you want to start a plugin in a new repo. You can check out feathers-mongoose or one of the other adapters to see an example of how they're implemented. Thanks for looking into this!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.
Most helpful comment
When I looked at this, the
.findmethod will have to usegun.map: http://gun.js.org/docs/map.html to loop over all records in a database and find matches. It's a little weird that way, but the rest looks pretty simple to setup. @irthos thefeathers-clicomes with afeathers generator plugincommand if you want to start a plugin in a new repo. You can check out feathers-mongoose or one of the other adapters to see an example of how they're implemented. Thanks for looking into this!