Closed j1n6 closed 4 years ago
Thank you. I will create a repository for this app.
The network-id
value 1
would by default peering to the swarm public gateway. A user can potentially create their own private cluster. this is interesting because a user can keep data privately in addition to encryption provided by Swarm, but also allow them to switch storage/hosting provider when presenting the right identity/ownership. The hosting provider should agree when full sync/replication is complete, then terminate the services to complete hosting switch.
Moving contents of this issue to https://github.com/personium/app-swarm
This is working in progress notes on integrating with Swarm Bee. FYI @dixonsiu
The Idea
Storing and managing personal or organisation data can imply greater responsibilities:
Storing sensitive information on the Swarm ethereum storage network could potentially simplify these concerns:
Swarm Details
Swarm is a distributed & decentralised storage running on the ethereum network (although not the only one). There were two major versions of Swarm developed over time.
Since the information is very sparse, if you are looking for up-to-date references, make sure you refer to the following:
Public Gateway: https://gateway.ethswarm.org/
Bee is a local node, just like Personium node, but local node file system will replicate data to the public gateway. The public gateway is used for demonstration purposes, but it is enough to demonstrate how replication works, test assumption and integration mechanisms.
I highly recommend run it with the binary
bee
to begin with, avoid using docker image at the start - because the volume mounting and network bridge can complicate things... Thebee
was built with golang, thus running the Swarm Bee node does not need to install any other dependencies.Download binary based on the platform: https://github.com/ethersphere/bee/releases/tag/v0.1.0
Start Bee Node
Step 1: Create a
bee-config.yaml
file in project working directory (remember to fill a password for decryption key):Step 2: Start the Swarm Bee Node, and a service URL should be available at
http://localhost:8083
Step 3: Upload file from local gateway the gateway provides a standard http API compliance with OpenAPI 3 standard. After uploading the file, the API responses with a JSON containing Swarm file reference.
with file upload encryption:
The public gateway decryption is disabled, this means the data are replicated to the public gateway, but your data is won't allow decryption.
The reference can be used generate a HTTP gateway link on localhost:
or once the file is replicated over public gateway, the same reference is accessible via: