Live data from Hacker News

GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

github.com

21–30 of 51 posts

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#21

Earlier quoted context omitted.

JS performance is terrible, it took us a year to rewrite everything from scratch to get these type of numbers. As mentioned near the bottom of that link, they are on cached reads which is unrealistic in real world settings but a useful baseline number to compare against. To understand our methodology on the benchmark approach, check out this tech talk on all the problems we encountered while testing (including things…

> Android phone, ~5M ops/sec. what are the "ops" in this case?

Sorry, I was trying to reply to both of you but I was not clear - I apologize. The ops are cached reads also, it was the same test across different devices.

For people wanting to run them yourself, clone the repo and go to test/ptsd/ptsd.html - we need to make it easier in the future though.

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#22

The docs seem to indicate you do not store properties on relationships? Is that right? Then why call it a graph database when it is really an RDF store?

You can do this, but it is not a built in primitive (like it is in Neo4j). We chose to do this because the majority of edges are usually directed, and we wanted to keep the base system as small as possible (all of gun is only about 12KB). It is easy to create "edge" nodes that store relationship properties, but nobody has created a full feature extension/framework for this yet, but I expect one will be built because this is a very useful feature to have.

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#23

Some people asked why this release is so important: - It fixes several critical bugs that happened during the performance rewrite. Example: If a server crashed and had its data wiped, there wound up being some sync issues. But this release fixes those. - First time for us to hit 2K table inserts/second synced end-to-end across a federated (browser server server browser) network topology. This load test was running on…

What are some appropriate real production use-cases for this? Particularly since you can't trust the user to tell you the 'real' state of a resource, the REST model is to send discrete state changes to resources and having an explicit endpoint to validate that the change is allowed (and logical).

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#24

This looks really cool. I'm no database expert, but a decentralised graph database is an intriguing idea. Has it been tried before? (decentralised databases I mean, not graph databases)

I'm building one, slightly different use case though.

Nice! Have any links to share?

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#25
post #23

Some people asked why this release is so important: - It fixes several critical bugs that happened during the performance rewrite. Example: If a server crashed and had its data wiped, there wound up being some sync issues. But this release fixes those. - First time for us to hit 2K table inserts/second synced end-to-end across a federated (browser server server browser) network topology. This load test was running on…

What are some appropriate real production use-cases for this? Particularly since you can't trust the user to tell you the 'real' state of a resource, the REST model is to send discrete state changes to resources and having an explicit endpoint to validate that the change is allowed (and logical).

We're currently seeing these use cases:

- Autonomous IoT on mission critical hardware. (We rolled out a pilot with a government for this)

- Distributed machine learning. (https://github.com/cstefanache/cstefanache.github.io/blob/ma...)

- Games (built with React! https://github.com/PsychoLlama/connect-four ) and realtime GPS tracking (https://youtu.be/7ALHtbC9aOM).

- And we're chatting with a bunch of companies doing some really cool stuff: robotic manufacturing, ethereum/blockchain 'lightning network' state channels, realtime decision engine / predictive fraud detection, federated home servers / DNS on top of gun, multiplayer VR, and more.

You should NOT use gun for any globally/strongly consistent data, like bank account balances and such.

Ever since we introduced our Security, Encryption, Authorization framework, people are starting to build more user facing apps, like P2P crypto social networks, and collaborative tools.

Which leads to.... if you cryptographically sign the data, you can trust that the user's copy of the data! It is very untraditional, but that is what we are trying to push/encourage. We even produced an entire animated explainer series, 1 minute each, to explain the concepts: http://gun.js.org/explainers/data/security.html !

REST is a very good model, I actually designed gun around the best parts of it - GET and PATCH (although for simplicity it is just called PUT). Graphs are a stateless representation of the data, which when statefully connected (via WebSockets or something), allow us to efficiently transfer only the delta/diffs and maintain sync. While you can run a traditional server with gun as an endpoint for validation, it is actually possible to do validation client side (as long as all clients are running the same rules) as well.

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#26

This looks really cool. I'm no database expert, but a decentralised graph database is an intriguing idea. Has it been tried before? (decentralised databases I mean, not graph databases)

https://dgraph.io/

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#28

I checked GUN out a while back and it looked cool, but I wanted something to use with react-native. Now there seems to be a package to do this ( https://github.com/staltz/gun-asyncstorage ), but I am still unsure about how production ready this is. Any thoughts in general or experiences with Gun and react-native?

Yes, Andre Staltz's (of CycleJS) work finally got it working on Android and iOS with React-Native! We're planning on having an example/starter app for it soon (unfortunately, Google Chrome and iOS follow the WebSocket spec just slightly differently, so it errors on iOS currently but it is an easy fix, we just need to figure out a way for them to both work simultaneously).

That sounds great :). Any place I should keep an eye on for updates?

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#29
post #23

Earlier quoted context omitted.

What are some appropriate real production use-cases for this? Particularly since you can't trust the user to tell you the 'real' state of a resource, the REST model is to send discrete state changes to resources and having an explicit endpoint to validate that the change is allowed (and logical).

We're currently seeing these use cases: - Autonomous IoT on mission critical hardware. (We rolled out a pilot with a government for this) - Distributed machine learning. ( https://github.com/cstefanache/cstefanache.github.io/blob/ma... ) - Games (built with React! https://github.com/PsychoLlama/connect-four ) and realtime GPS tracking ( https://youtu.be/7ALHtbC9aOM ). - And we're chatting with a bunch of companies do…

> - Autonomous IoT on mission critical hardware. (We rolled out a pilot with a government for this)

> You should NOT use gun for any globally/strongly consistent data, like bank account balances and such.

Re: GUN 0.7.9 – 15M read/sec, 15K write/sec, 2K sync/sec MIT Licensed Graph Database

#30
post #8

For god's sake, man, run a linter on this thing. The mixing of spaces and tabs alone makes the code embarrassingly difficult to read. http://imgur.com/a/XlSQD

Fix your editor and set the tabspace to the correct value ? I'm guessing 2 spaces is the right value in this case.
Post reply on HN