peer-pad
peer-pad copied to clipboard
Put js-ipfs in a Service Worker
Here is an idea. In order to solve the "multi tab" issue, the js-ipfs node for PeerPad can be spin up on a Service Worker -- https://github.com/ipfs/ipfs-service-worker -- and then we can use the work that @alanshaw has been doing on postmsg-rpc -- https://youtu.be/qTOUMWujoEg -- to talk with the node.
This could also improv PeerPad perf since js-ipfs would run on a separate thread.
Can also be interesting for orbit.chat //cc @haadcode
I'm pretty sure ipfs-postmsg-proxy could be adapted or forked for this.
@diasdavid That's a great idea. I'll be toying around with this in the next days.
Agreed this is a great idea 👍 Not just for orbit.chat but in general I believe this pattern will help a lot of (browser) app devs. The way we currently have to put everything into one thread is quite heavy for apps..