I’m a rather large noob when it comes to app development and blockchain/holochain. I was wondering how well a video streaming app would work if developed on holochain - is this at all feasible?
Say if an app like Tik Tok was built on holochain, how would its progression as an app differ? What about all the AI stuff? Sorry for the super basic questions, just a man with some ideas and little technical experience.
Hi Dan @PavPowell, thanks for joining us on the Holochain Forum and for the inquiry.
Earlier in the year, we received a similar question. Re: Tiktok on Holochain. Below is the response I shared based on my discussions with some of our devs.
–
If streaming is a main driver, there are a few options. See below for things the project will need to consider. We will need to know some of their functional requirements to better assess the project.
Initial thoughts:
We would need to know what kind of validation is needed (e.g. skrumble uses blockchain to establish a secure session, but then the video streaming happens offchain p2p ^^).
Static files can be stored in IPFS/bittorrent, etc.
Holochain can just store the merkle root or IPFS url etc. + metadata about the file for validation logic.
Holochain is not at all a file storage system or a real time streaming technology.
Holochain is about data validation and workflows.
There are plenty of existing projects tackling file storage (e.g. storj, sia, maidsafe, ipfs, filecoin, bittorrent, resilio).
P2P file storage is almost as old as the internet itself.
Conclusion/Next Steps:
Something similar to skrumble could be done on hc, where peers establish a session via hc, then stream video data though webrtc or something.
Important: FYI, looking at “fat client, skinny server” setups, there are 3 things servers must handle on traditional infrastructure. 1. secure workflows 2. persistence 3. long-running processes/queue runners. Holochain is mostly the 1st one (secure workflows). We have a graph database-style persistence for the second (but not really heavy media yet), and not much going for the last one.
Additional Information:
TikTop App - How to Implement on Holochain
15 second limit (makes it possible on Holochain)
Technically possible to put/store videos on Holochain (in the DHT, small files).
Video Storage - A social media app for sharing on Holochain is technically possible.
Video Streaming
Integrate and use another tech stack
Will need a centralized architecture
Send to single server and that server handles it
Can we use Holo for streaming?
Develop POC to demonstrate that you can store videos on Holochain without servers to show that Holochain is a viable solution.
Standard Holochain app where you have one type of entry for the video and you can push to and get from the DHT videos.
– Things to consider:
You will want to work to flesh out your idea/concept and determine what you would like to achieve. Perhaps partner up with someone to discuss the idea.
On a side note, are you using TikTok? It seems like a great platform for organic reach. I understand it’s quite popular among teens.
To give you a better idea, the app i have in mind is a live debate/ideas video streaming platform that streams users simultaneousy in split screen.
There are two settings I am considering:
Debate:
-Users have a set topic and a defined time limit to argue their positions and at the end a vote decides which wins.
Conversation:
-Users simply converse on a topic or whatever they like, no voting and no time constraints.
This is the basic idea, the inspiration for it comes from watching 2 users of the singing app Smule argue about the ethics of eating meat. It was lively, interesting and they treated eachother with respect which is something i seldom see on social media platforms (probably due to the face to face element).
Users could also join the conversation by “picking up the mic” which is a concept borrowed from smule whereby people can request to join the conversation. Seems to work for people singing awfully at eachother, why not internet discourse?
So is live streaming more or less feasible? This is long form content, so if tiktok is technically possible what about something like twitch?
Yes live streaming is possible, but it would need to be supported by other technologies.
I think it would be wise to iron out your needs/requirements and perhaps try a proof of concept. Tiktok and Twitch are different platforms and should be assessed accordingly.
I would refer back to the Video Streaming section as that seems applicable for Twitch.
Yeh you would not use holochain for the actual streaming as @dhtnetwork says. You might use it for the debating and conversation though.
The next step would be try try and come up with a minimal set of features you want and see what that looks like on holochain.
I love the idea of a head-to-head debating network! Seems like a video version of Kialo To me the most exciting question is, how do you design the UX to encourage perspective-taking, respectful debate, etc?
To chime in further, Holochain would be okay for streaming of pre-recorded content (subject to actual speed testing against a real DHT), but yeah, I agree with the others — live-streaming would be tricky. Holochain could be useful for debate discovery and ‘session initiation’ (telling nodes how to find the video), but there are things in the guts of the application stack that would make actual video delivery sluggish. It’s good for delivering chunks of content, but not a steady stream of bytes.
Cool discussion and I am also looking into this. Zoom doesn’t use webRTC but a custom solution based on websocket streams (centralized?) and canvas. I wonder why webRTC wouldn’t work between Holochain nodes.
I am currently working on a discussion/discovery platform and hope to be able to create a webRTC, websocket based solution on Holochain.
My strategy is…go with the flow and tackle problems while they arise. So, happy to share those when I get my hands dirty.
Hi @AdriaanB yes would like to hear about your progress as this topic and item has been asked many items. At this point, it seems implementation and trying it out may be the most clear way to confirm things.
yes, I’m interested in your findings too @AdriaanB. No reason you couldn’t use Holochain for signalling (“Hey, I’m at IP x.x.x.x, port xxx, I understand Theora and Vorbis codecs, and I’m ready to start the call now”). The problem that both Holochain and WebRTC face is that P2P is really hard with the current internet infrastructure — NAT and firewalls, specifically.
I haven’t looked deeply into WebRTC, but from what I understood is that you need a STUN-server (signalling) and a TURN-server as a fallback for the NAT/firewall problem. I read somewhere that only around 20% of the traffic has to go through a TURN-server to make it work for everyone. The ‘costs’ is in building/maintaining your TURN-server or using some service provider (https://www.twilio.com/stun-turn).
My idea was to have people download a Holochain desktop-client (kind of like Zoom) that does the signalling and find a solution/fix for the TURN-server. Would be really cool if Holo can provide/help with this instead of paying for a ‘centralized’ solution. But I haven’t got enough experience/knowledge with the possibilities Holo will offer. A last resort would be to fall back on some centralized solution.
I am really early stages in development and will get to the webRTC part in a month or two. For the MVP I would be happy to be able to go live without TURN or some temp solution.
If Holo is able to offer a solution to the NAT/firewall hole punching. Would it be possible to build an hApp/endpoint that acts as a TURN-server and routes media? That would be kick ass, because I can imagine people/Holo to offer and use these kind of services to the world instead of making use of Amazon etc.
Hmmmm, that would be cool to have an hApp do the actual media routing and remove the need for a TURN server. I suspect that, right now, it’s just not performant enough for that. Too much TCP/encryption/handshaking, not enough UDP/QoS/“good enough”. But in theory it’s possible right now as long as you don’t mind huge lag