Open benhylau opened 6 years ago
The file we want to distribute is the changing live.m3u8 because IPNS isn't reliable, and ipfs pubsub pub <topic> <data> seems to work well.
live.m3u8
ipfs pubsub pub <topic> <data>
First we need to enable --enable-pubsub-experiment in the /etc/systemd/system/ipfs.service for all the ipfs nodes. Then on server:
--enable-pubsub-experiment
/etc/systemd/system/ipfs.service
ipfs add live/current.m3u8 | awk '{print $2","}' | ipfs pubsub pub m3u8
On mirrors, run:
ipfs pubsub sub m3u8 > m3u8-sub.log
and in a crontab:
ipfs cat `awk -F, '{ print $(NF-1) }' m3u8-sub.log` > live.m3u8
We decided not to use this for Our Networks since:
http://<gateway>:8080/pubsub/<topic>
wget
Might be interesting to look at https://cluster.ipfs.io/
The file we want to distribute is the changing
live.m3u8
because IPNS isn't reliable, andipfs pubsub pub <topic> <data>
seems to work well.First we need to enable
--enable-pubsub-experiment
in the/etc/systemd/system/ipfs.service
for all the ipfs nodes. Then on server:On mirrors, run:
and in a crontab:
We decided not to use this for Our Networks since:
http://<gateway>:8080/pubsub/<topic>
)wget
is reliable and functionally this is just another way for us to do that without the benefits of IPNS