Offload computationally expensive tasks to the browser

Hey hackers,

I'd like to share a thought I've had for a while. When creating a product, you want to make sure that your profit margins are high. A lot of times, server costs are a major expense, especially when running computationally expensive tasks. Something to keep in mind, is that a lot of times, you can use the customer's browser to run expensive tasks pertaining to them.

For example, the product I launched (https://mastershot.app/) is a video editor. When I just started creating it, I could have decided to go in one of two directions.

  1. The classic way - rendering the video on my server
  2. More complex way - rendering each person's video in their own browser

I decided to go the 2nd way. And thanks to that decision, I'm able to allow much more generous plans to customers. Other competitors who render the video on the server have to limit either the resolution/duration/storage limit in order to remain profitable. I, on the other hand can offer unlimited everything due to extremely low server costs (essentially just hosting a static site + a bit of backend).

So the next time your considering performing expensive server side operations, stop and think whether or not it's a viable client side computation.

** Something I'd like to note however is that you should never use one user's browser to perform tasks for another user. This is extremely unethical and your users won't appreciate it.

  1. 2

    I've seen Mastershot before and it's looks great! I think other companies such as veed.io and maybe kapwing have done browser based editing a first, but then switched to a server side rendered model. I believe for the veed team it didn't create a consistent enough experience if the rendering is done client side. The speed of the video rendering will vary drastically from user to user, and mobile is probably out of the question depending on the phone. It is also super easy to have your work actually copied because all of the code is delivered to the browser. I think if you want to be the next photo pea it makes sense because it is a free product anyway, which doesn't give people an incentive to pirate it.

    1. 2

      From what I understood from VEED's blog post about the inception of their video editor, at no point in time did they do completely client side rendering. With regards to Kapwing, I found no evidence that they did the rendering client side either.

      With regards to varying rendering speeds, you are correct, different users will have different speeds based on their computer's strength. Mobile is out of the question for a different reason however. My vision is to create a video editor with powerful features that come from industry standard video editors and the interface required to create such functionality, in my opinion requires a computer to be functional.

      It's true that since everything is on the client side it can technically be copied, but the same holds true for many web applications. Additionally, it would be very hard for anyone to extend the functionality of their clone seeing as it's all minified and obfuscated.

      I'm still torn as to whether or not I should make it a subscription model, or a free ad-based model. But seeing as costs are extremely low due to the client side rendering, I have the freedom to choose to do as I see fit without worrying about spending large amounts of money on servers.

  2. 1

    I have just signed up to give it a spin. I can't add a text to a video. I click on the text button, but nothing happens.

    1. 1

      Are you sure the text layer isn't offscreen to the right?

      1. 1

        If it is offscreen, how do I find it?

        I can't find an email on your site. I have replied to your signup email with a screen recording.

  3. 1

    Nice https://www.photopea.com/ was on here and they were doing 500k a year.

    If you're rendering client side might be worth removing the sign up process?

    1. 1

      I’m currently working on storing the project files locally to accommodate that.

Trending on Indie Hackers
10 Free Illustration resources for indie hackers. 11 comments One of the best guides that I come across for SEO 11 comments Dev of 1 built a $4.2M ARR dealership system. AMA. 9 comments How Stripe operates like a civilization 7 comments Acquisition Channel Trends & Opportunities: Instagram, E-Commerce, Apple 7 comments Page 404. Why do we give a F$%k about details in design of our products? 5 comments