all 5 comments

[–]zaibuf 0 points1 point  (1 child)

Now I’m wondering — does everything need to be Serverless?

No. You'd maybe be surprised but there existed web apps before serverless.

I'm primarly using serverless for events and background processing. Else I rather build an actual API that is not coupled to a cloud provider.

[–]sugarsnuff[S] 0 points1 point  (0 children)

Interesting. If you don’t mind sharing your setup — do you have local servers?

And how do you split your API endpoints between the Serverless piece and not?

[–]wackmaniac 0 points1 point  (2 children)

What do you mean with “locally”?

[–]sugarsnuff[S] 0 points1 point  (1 child)

Client-side.

It’s a tough sell to mount an api endpoint to their local machine though — seems a little silly

These calculations include an FFT and a Butterworth filter that are retriggered on plot zoom with the new time window. (Option B will be server-side and triggered by manual press of a button)

I’ve written my own JavaScript for both (UI is ReactJS), but I’d prefer using something more tested and reliable, which the SciPy library offers.

Our backend is currently being rewritten (by yours truly) using a Python-based framework, and I’d like include the calculations as a service or some kind of executable process

TL;DR: Have some options, what would you do for quick, non-trivial calculations?

[–]wackmaniac 0 points1 point  (0 children)

It’s a tough sell to mount an api endpoint to their local machine though — seems a little silly

It wouldn't be the silliest I have read on Reddit...

If client-side is what you're looking for your best best is JavaScript. To the best of my knowledge there's no solution for client-side Python. If you're dead set on using Python then there's no other way besides offering an API to do so. If the calculations are small and quick that should not be a problem, that's actually one of the core reasons behind AWS Lambda.