atomicdata-dev / atomic-server

An open source headless CMS / real-time database. Powerful table editor, full-text search, and SDKs for JS / React / Svelte.
https://atomicserver.eu
MIT License
997 stars 46 forks source link

Atomic-Server + Content Addressing (like IPFS) #66

Open joepio opened 3 years ago

joepio commented 3 years ago

Since Atomic Data uses a lot of (non-local) HTTP resources, there is a risk of remote errors that make data unfetchable. When a server goes down, a resource has changed or a domain name hasn't been paid for - the request will fail. That is part of the web, and we have a chance to encounter this every time we open a webpage.

With Atomic Data, however, we rely even more intensely on remote data. Atomic Properties, for example, tell us something about the datatype of an Atom. When parsing triples with new properties for a client, the properties need to resolve. IPFS might help with this, as it can enable 'freezing' of resources. The frozen resources could still contain a link to the original source (HTTPS address) which can be used for updating properties.

joepio commented 3 years ago

Responsibilities of IPFS module in server

Implementation

Full ipfs node in app (depracated)

The rust-ipfs crate seems to be the only true option. I've been following it for quite some time. I think it still needs the add feature, though. Lacks a DHT implementation, and it might take a while before this is realized.

EDIT: It's no longer maintained

Client-only - use external gateway

ipfs-embed is lighter weight, but requires an external ipfs node.

ipfs-api is an interesting one. Connect to an external gateway, and use that as both storage and resolve mechanism.

https://docs.rs/ipfs-api/0.11.0/ipfs_api/#writing-a-file-to-ipfs

IROH

New rust implementation: https://github.com/n0-computer/iroh

Seems to be promising! Unclear if it can be embedded, yet.

EDIT: Iroh Can be embedded!