Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: GUN URIs to universally reference data #1367

Open
simonausten opened this issue Feb 26, 2024 · 3 comments
Open

Proposal: GUN URIs to universally reference data #1367

simonausten opened this issue Feb 26, 2024 · 3 comments

Comments

@simonausten
Copy link

simonausten commented Feb 26, 2024

Very simply, what do we think to formalising a GUN-specific URI scheme to reference nodes in the db? For example:

  1. The pastebin at https://gun.eco/docs/Hello-World is accessed by calling gun.get('test').get('paste'). This could be represented gun://test/paste
  2. In the case of public space, say you have gun.get('~'+Bob.pub).get('test').get('TestProperty'). This could be represented gun://~bR+eukWF7mYgxibHHRc6tJ+G6PIMEB91O1WVEbAYuWU=/test/TestProperty, using the tilde convention
  3. There's a bit of an issue in frozen space, in that # indicates the start of a fragment in a URI, but perhaps an alternative character could be chosen. Thinking of characters which are valid, easy to type, and don't need to be percent encoded, an exclamation point would serve well, e.g. gun://!ZGhJ7M8vJh9ZaQe3z7XlL6Rv4Gf5T9zj7H8Kl9Mn4BvZ= (I kinda like the way this implies "this is the value, period!")
@simonausten simonausten changed the title PROPOSAL: GUN URIs to universally reference data Proposal: GUN URIs to universally reference data Feb 26, 2024
@crunchysteve
Copy link

crunchysteve commented Feb 26, 2024

I like this idea! Definitely a step in the right direction. I've been trying to get interest in a similar idea over here https://github.com/crunchysteve/peer-to-peer-dns-overlay only more generalised for all the hashtable systems, much like the standard DNS works with http ftp webrtc, etc. I only have the knowledge to conceive the model, not to code it, though.

I call it Personal Name Service (PNS) and not requiring any actual registration, just a check for conflict, and reissue at setup.

@amark
Copy link
Owner

amark commented Mar 25, 2024

Others can do this if they want, but GUN's architecture specifically chooses using UTF8 as its keyspace so it can support any URIs as a subspace, as in you could have gun.get('http://archive.org') or any other URI/protocol, so then prefixing GUN with gun:// would be problematic.

@bmatusiak
Copy link
Collaborator

bmatusiak commented Aug 17, 2024

scoping URIs to gun:// would be a problem. because of multiple apps trying to support the incoming URI requests.. what app would win? my app or your app?

it would still be best to handle your own URI request like myapp://gun/{path}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants