peer-pad icon indicating copy to clipboard operation
peer-pad copied to clipboard

Put js-ipfs in a Service Worker

Open daviddias opened this issue 7 years ago • 4 comments

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.

daviddias avatar Jan 24 '18 01:01 daviddias

This could also improv PeerPad perf since js-ipfs would run on a separate thread.

Can also be interesting for orbit.chat //cc @haadcode

daviddias avatar Jan 24 '18 01:01 daviddias

I'm pretty sure ipfs-postmsg-proxy could be adapted or forked for this.

alanshaw avatar Jan 24 '18 09:01 alanshaw

@diasdavid That's a great idea. I'll be toying around with this in the next days.

pgte avatar Jan 25 '18 09:01 pgte

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..

haadcode avatar Jan 25 '18 12:01 haadcode