It’s the weekend after a week full of exams. I’m exhausted and am just waiting to graduate high school. But, like any other developer I feel the urge to go ahead and start another weekend project. I’m learning some pretty interesting stuff in AP Calculus, but I get tired of doing algebra during homework at times. I think to myself: Why not build something that does my math homework for me?
That’s where I got the idea to build Newton, a really micro micro-service for math. I wanted to make it easier for developers to do math without being constrained by codebase sizes or non-existant APIs in their preferred language.
So what makes it interesting? Other then being super cool and functional, of course, Newton requires no storage space other than its source files. It doesn’t access or modify a database, and it doesn’t even dynamically create configuration files or any of the matter. Each request and response is protected by Zeit Now’s HTTPS encryption. Plus, it runs solely on simple GET requests.
I didn’t think much of those characteristics, but after a bit of interaction with the tech community I think Newton is a serverless function.
Explain "serverless architecture" to me like I'm five years old. #DevDiscuss— The Practical Dev (@thepracticaldev ) April 5, 2017
@ThePracticalDev Very small machines on a network; LOTS of them work at the same time. But their brains are very small, they can't remember what they did!— Eric Elliott (@_ericelliott) April 5, 2017
Eric Elliott gave an unexpected yet informative response. Newton fits those characteristics. Zeit abstracts global hosting for Now, so that satisfies the machines on a network. Newton is a relatively small package (~3.3kB), so that fits the small brain, and like I said it doesn’t access or process persistant memory. Seems like serverless to me.
@ThePracticalDev Write code as a bunch of function and then pretend infrastructure doesn't matter.— Elliot Blackburn (@elliotblackburn ) April 5, 2017
That seals the deal. I use Now, because I don’t have to worry about anything other than how my code runs. And, Newton does one thing: math.
Wait, math is a lot of things.
We get the point. But just to be sure, I took to r/serverless.
Eh, that answer is good enough for me.
So, in the end I built a small serverless function as a weekend project to help me do my math homework and help others make cool things. Newton has grown to become more popular than I initially expected, and I‘d love to witness its expansion and see what others make with it.
And don’t forget: it’s serverless, I think.
Thanks for reading! As always, you’re awesome.
For more information on serverless architecture, start here.