Diving into A Serverless Application


For the uninitiated, a serverless application is one that obviously still runs on servers but runs as an application via a service providers various automatically managed computational resources. All of that jargon essentially means that you can write code and not worry(too much) about the infrastructure as it is managed for you or via code. Today I’ll be sharing some pains and pleasures of working with the serverless framework, one of many frameworks that let you easily take advantage of a multitude of provider’s cloud resources.

IT JUST WORKS

It really does. Assuming you know what you are doing(more on assumptions later), you can easily get a simple REST API up and running with very little difficulty. I was able(using node) to get a basic ordering system up in about 15 minutes. I was using AWS, it spun me up an API Gateway, Hooked it up to my lambda functions and I was off to the races. Another thing that just worked was ENV Variables(though AWS Secrets Manager gave me some trouble initially).

BUT NOT REALLY

Serverless Framework assumes a great many things, like for instance that you won’t be serving binary assets through your application. The general solution to this problem is to serve your website as a static website and have it consume a separate API. That’s fine, I just wish there was a well documented tutorial on how to set that up(blog post pending). Another thing is database migrations(not an issue for NoSQL people). For those of use who have relational data this can be a show stopper. My solution was quite elegant, however undocumented and pretty much freestyle.

If you couldn’t tell, my biggest problem with serverless right now is the lack of documentation, but that’s most likely because it’s so new. Perhaps it’s on the early adopters (ie. myself) to make the tutorials to open up the space a little. I’ll commit to trying to explain some of these things in future posts and tutorials.

Leave a Reply

Your email address will not be published. Required fields are marked *