-
Notifications
You must be signed in to change notification settings - Fork 8
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
Push based messaging. #7
Comments
The receiving peer needs to learn about the sending peer's key somehow (in order to get the relationship dat). You could maybe have every peer listening on a discovery-swarm channel for establishing relationship dats with initiating peers (e.g. something like https://www.npmjs.com/package/hyperexchange), but this still only works if each peer is always running this server. a way around this might be by forwarding messages through other peers. |
This is very much related to the message layer proposal + design I'm working on: Messaging proposal |
In dat-pki, I'm going to move forward with doing just pull based messaging where both users have to be aware of each other, after relationship and/or group dats have been established among everyone. For now, I'd like to implement everything useful we can think of using only the current |
@jayrbolton just added it here: https://github.com/lukeburns/hyperexchange. all it does is set a similar approach to this might be to pass around initialized handshakes that you've learned about from other peers in userData w/ hypercore-protocol so that you don't need to make a direct connection to the peer you want to handshake with -- they just need to connect with someone you've told about the initialized handshake. |
What do you think about just including a little TCP daemon that can handle push messaging for users as part of this library? All messages sent over tcp can be encrypted to them using their pubkey. This could be used for receiving encrypted messages (eg dat addresses) from people you don't know, without initial handshakes. Every device for every user would run a tiny TCP server. |
Are you imagining just sending user messages over the TCP server, or using that TCP server to establish a relationship dat? If the former, we lose verifiable message history and all the features of dat, which I think would be desirable to preserve. If the latter, it would totally work, but it might also be accomplished during the hypercore handshake without the additional overhead. |
Haha, I forgot about that comment! I just meant the latter, and maybe using discovery-swarm instead with the swarm id being the user's "profile dat", other users would then send their own public profile dat addresses over this swarm. I'm not sure that's the best way though -- open to suggestions |
So metadat is setup for
However, it would be nice to add push-based messaging. This would allow user A to message user B without user B knowing user A. The push messages could be handled by the receiver according to a hardcoded set of message types built into metadat (eg "initiate-contact", "send-dat", etc). Maybe this can be done with hypercore
The text was updated successfully, but these errors were encountered: