Open b5 opened 4 years ago
Notes for potential QriIDService that would successfully connect and stay connect to other peers that support the qri protocol
stars loop that listens for qriIdentityRequests
ensure only one service exists
has a way of tearing itself down & emits teardown event
keep track of connected qri peers
on disconnect, remove qri peers
handles /qri/0.1.0
, /qri
, /qri/0.1.0/profile/0.1.0
listens for connections
/qri
or /qri/0.1.0
, protect the connection/qri/0.1.0
protect the conn & send pid to qriIDold profile request process -> should return error saying "qri no longer supports this protocol, please update to the latest version of qri"
qriID loop
HandleProfile - gets a request from a peer and sends back your profile
We've been talking a bunch lately about revising and improving our p2p story. To figure out the role for the
p2p
package, and peer-2-peer in our stack more broadly. I think it's easier to start with a user story that should exist in the near future:Oversized Version Push:
nyc-transit-data/yellow_taxi_trips_2018
.qri push nyc-transit-data/yellow_taxi_trips_2018
to push this dataset to the registry. a. Qri does a logsync to send the history, which puts the dataset history on the registry. b. Push pushing a version is rejected with a new canonical error:ErrVersionNotAccepted
. The error itself is wrapped with a reason:dataset version not accepted: 15Gig version size exceeds max 250MB version size
. c. My local node knows about this error, and responds by creating a preview locally, then callsremote.PushVersionPreview
with the preview. The preview is signed with my key pair and sent to the remote (in this case, the registry). The remote accepts the preview.CLI prints an error message for me:
However, the remote did accept log data and a preview of the dataset, and you can provide this dataset to others via the distributed web by leaving 'qri connect' running, or pushing this dataset to a peer remote. For more info on peer-2-peer datasets, see: https://qri.io/docs/peer-2-peer-datasets
qri has pulled log data from https://registry.qri.io, but this remote doesn't have version QmFoo... connecting to the decentralized web to search for dataset version providers...
dataset successfully pulled from the d.web!