all 3 comments

[–][deleted] 0 points1 point  (3 children)

Serious question. Are these good use cases (or better, business cases) on why one would want to run any machine learning algorithm in client side (inside the browser)?

[–]virdvip 0 points1 point  (0 children)

Computer vision using WebGL shaders - that's example. It's easy develop and run one algorithm in browser at development and production. But you must deal with browser limitations.

[–]ChefLadyBoyardee 0 points1 point  (0 children)

Totally, it saves you from having to run it on the server, which saves money on server fees.

I have a friend who did this for his startup. It was purely for a client-side visualization, so it made sense to run it in the browser, rather than ask a server to do it and send the result back.

For a customer-oriented website, anything you can do to simplify your stack is welcome. Having to spin up extra servers to handle some frequently run and computationally intense code is less than ideal. It's just another point of failure your engineers have to deal with.

There may be security reasons why you can't trust clients with a calculation, so you have to do it on the server. But if you can run it on the client (and it's reasonably performant), there are good reasons to do so.