Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

RFC: extend peerInfo #70

Open
pgte opened this issue Dec 2, 2018 · 3 comments
Open

RFC: extend peerInfo #70

pgte opened this issue Dec 2, 2018 · 3 comments

Comments

@pgte
Copy link
Contributor

pgte commented Dec 2, 2018

In peer-star-app we pass around PeerInfo objects to represent peers in apps and collaborations.
Once we introduce identity and capabilities, we need to encode and exchange this new information, and I'm thinking whether the PeerInfo objects would be the best place for this.

If yes, is there a safe extension mechanism where an app can store arbitrary information about a peer?

@pgte pgte changed the title extend peerInfo RFC: extend peerInfo Dec 2, 2018
@satazor
Copy link

satazor commented Dec 5, 2018

I like this idea. One possible way to ensure that those extensions do not conflict with each other is by using Symbols. The extensions would have a "getter" where you pass the PeerInfo and it would return the underlying data. For instance, getIdentity(PeerInfo) would return that symbol key's value that the identity extension created.

@pgte
Copy link
Contributor Author

pgte commented Dec 5, 2018

Would also love to have your input on this @alanshaw

@alanshaw
Copy link
Member

Could you give some more info on the requirements please?

  • How long does the data need to live?
  • Does it need to be transferred between peers? All of it?
  • What happens when the data is updated?
  • Can I edit data for any peer? How do conflicts get resolved?

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

No branches or pull requests

3 participants