Thought of a fun little hypothetical scenario. You have 2 weeks to create a YouTube killer (basically a better version of YouTube). What tech stack do you go for and why?
Don't care about the stack as one thing
Things to focus on by priority
Algolia, FaunaDB, NextJS
I'm currently trying to decide between fauna & hasura, any reason you chose fauna?
I never tried hasura, but the main reason I chose fauna is how they handle transactions and user rights. It's huge because it allows you to remove any permission logic from your code.
Interesting choices! Any reasoning for going for these particular picks?
Those platforms allow you to focus on shipping something high quality fast while they do the heavy lifting. In only two weeks, you want the fastest time-to-market while uncompromising on user-experience.
Would love to know the reasoning behind your choices. More specifically Cloud Functions.
Basically, they are incredibly easy to manage and super scalable.
Using a JAMstack type framework is great for performance & security.
Authentication would be handled out of the box by Firebase. Data is stored in the Firestore Database, videos can be stored using their Storage API and Cloud Functions would be used for things like "when a video is uploaded to storage, run a function to compress and convert it into web format".
I've never really given Firebase much consideration for anything as I've seen it can get quite expensive. Might be worth looking into, thanks! 😄
This is what I thought too.. firebase would be too expensive at scale.
I can +1 this for small and prototype projects. Firebase is incredibly generous with its free tier and there's a good chance that you won't pay a dime (if you've got a good data model)
I'll start!
For the backend, I'd go with PHP and more specifically Laravel. Would allow me to build something really quickly, since it comes batteries included (User authentication, queues and S3 integration are going to be particularly useful for this). It's also what I'm most proficient in, so I wouldn't be wasting too much time on reading documentation and just learning to use the tools in general.
Databases - MySQL. Battle tested, easy to set up and run. Redis for the cache and queueing as it integrates with Laravel beautifully.
For the frontend, I'd be using Tailwind CSS and just HTML with maybe jQuery/vanilla JS where needed. Since I'm familiar with Tailwind already, there would be less friction than trying out something new. Plus the fact that it's reasonably styled by default means I can produce something that's visually pleasing at the end of it without much effort. Opting to not use a JS framework because it's just fluff (at least in the beginning). The app can function perfectly fine without it as it doesn't really rely much on dynamic content. Saves time separating the frontend and the backend as well. Why make two apps when you can make one?
Hosting - DigitalOcean. Cheap S3 compatible storage for videos and cheap, fast to set up servers. If it gains traction, scaling should be a walk in the park. I'd throw some sort of CDN into the mix as well, to keep the bills down.
+1 to the D.O. and put behind a load balancer which handles the SSL Cert on Day One, so you can add Droplets to scale when you need them.
Yep, that was my thinking as well! If you have your provisioning automated (with something like Ansible), you could scale without any effort. Add a new server, provision and the LB just picks it up. Could maybe even automate creating a new server.
This comment was deleted 6 years ago
Yeah, I'm not sure of what CDN I'd use. Haven't really researched this and just went off the cuff as a for fun exercise 😄
Good point about CDNs having video restrictions. I'd probably go for whatever brings the overall bill down as much as possible. If it only increases the bill, I'd swerve it completely then, at least in the beginning.
Whichever one I’m most comfortable with? No time to learn a new stack in two weeks, and you can build a youtube clone in any stack.
What's your go to comfort pick then? 😄
This would be my stack:
(5. Optional video processing modules using Celery)
In fact, I started Tuesday last week and have built most of a video delivery system (for teaching though). You can see the intro video: https://indiemy.com/
I would just start crying in the corner because even Google can't architect that in a way that makes it profitable.
I guess I'd use Go for the backend, break everything into microservices, I might use Svelte on the frontend.
Have a breakdown.
No comments system, too negative anyway, one less thing to deal with spam and data-wise.
No custom fonts, literally load nothing that isn't needed.
Compress all the videos back down to 240p because there's no way I'm dealing with that 4k bandwidth problem.
The USP is it's like old YouTube, pretty terrible but you can post basically anything, actually, it has to be low production quality or you get perma-banned, no celebrities.
No ads, you can donate or Patreon style support creators and we keep a percentage. You can broker your own in-video sponsorship deals, but you have to give us a cut of that in order to post the sponsored content.
Literally me
Haha. I love it! 😄
Beer and pizza!
That's a different kind of stack lol
You will not win this one without venture funding. The model is not friendly. You will get destroyed on Bandwith costs. The problem with the YouTube model is that you will have a lot of videos with not many people watching. This means you can’t take advantage of CDNs, which means your bandwith costs will be insane.
With our funeral streaming SaaS we charge $100-$500 a month. Even with this pricing model, the bandwidth cause is painful for us. If you’re trying to run on just ad income alone you will not be profitable.
Zoom Webinars?
It's a hypothetical scenario for people to talk about tech stacks they like and maybe learn something new. If it helps, imagine money isn't an issue.
Interesting take on Portrait Mode. Would that be because of the recent success of TikTok and similar?
Any particular reason for going ARM as opposed to Intel?
Haven't used TikTok, but people have demonstrated what they want and so you're correct that's the reason.
ARM as opposed to x86, because of power-efficiency(which is the largest factor in data center cost), so apart from being capital-efficient, if I want setup my own hardware nodes in data centres around the world it would be cheaper.
Fair point!
PeerTube
This comment was deleted 6 years ago
This comment was deleted 6 years ago
Oh wow, webtorrent looks like it could be a game changer for a streaming service! I imagine it'd take a fair bit of the load off of the servers, at least in terms of content delivery.