libp2p / notes

libp2p Collaborative Notebook for Research
MIT License
37 stars 4 forks source link

Alternative discovery and transport protocols #6

Open vasco-santos opened 5 years ago

vasco-santos commented 5 years ago

We have been discussing recently what new protocols for discovery and transport we should aim to support in the near future.

The purpose of this issue is to discuss what are the possible protocols, its advantages according to the ones we currently support, offline-first capabilities as well as their compatibility with devices / types of nodes that we have.

We have been discussing some protocols so far, like bluetooth, audio-frequency, among others, and we have several other ones that we never discussed, such as infrared.

cc @momack2 @mgoelzer @raulk @jacobheun @daviddias @Stebalien @jhiesey

vasco-santos commented 5 years ago

One of the protocols that we have been talking recently is Bluetooth, for obvious reasons. It encompasses discovery and transport, it is widely spread in devices and requires low resources. One of the biggest points for it is the new WebBluetooth api https://github.com/libp2p/js-libp2p/issues/261 which would enable web nodes

In this context, I made some initial experiments with WebBluetooth and here follow my initial report. Basically, I Created a simple React app for finding and getting data from my smartphone through Bluetooth. A mobile app (BLE scanner) was used as my smartphone does not have Bluetooth Low energy support.

Concerns

Other notes

Conclusion

lidel commented 4 years ago

@vasco-santos I see latest WebBluetooth spec supports reading and writing to "Characteristic User Description":

If it was possible to expose such a writable characteristic value from a browser (which I don't think is possible atm?), then we would have means of passing arbitrary data between two browsers.

Tolsi commented 4 years ago

You might be interested, there's an article about custom audio transport protocol. Source code

bertrandfalguiere commented 4 years ago

I love the idea behind the audio transport! It may be nice to bootstrap a discovery by advertising an address for another, regular, protocol. I don't see many use cases apart from discovery, but I'm sure more creative people will.

Along the same line, we could even imagine a vibrating phone transmitting data to another's accelerometer. I don't know if it's feasible in practice and/or even useful...

lidel commented 4 years ago

A proof-of-concept for WebRTC signaling using sound: https://github.com/ggerganov/wave-share

lidel commented 4 years ago

Chrome 81 introduces the mobile web to NFC with an origin trial: