Live data from Hacker News

The Serverless Revolution Has Stalled

infoq.com

251–260 of 670 posts

Re: The Serverless Revolution Has Stalled

#251

Earlier quoted context omitted.

I felt your pain immediately and decided to write my own mini-framework to accomplish this. What I have now is a loosely coupled, serverless, frontend+backend monorepo that wraps AWS SAM and CloudFormation. At the end of the day it is just a handful of scripts and some foundational conventions. I just (this morning!) started to put together notes and docs for myself on how I can generalize and open source this to mak…

I never got the hand of cloud formation. I suppose it is nice from a visual (drag and drop) point of view, but I couldn't use it in production and moved on to manage my architecture with terraform.

It sounds like you're describing the Cloudformation template visualiser/editor in the AWS Console, which I have never heard of anyone using as the primary interface for their Cloudformation templates.

Personally for simple projects I've had pretty good experiences writing a Yaml-based template directly, and for more complex projects I use Troposphere to generate Cloudformation template Yaml in Python.

Re: The Serverless Revolution Has Stalled

#252
post #144
post #25

Kind of surprised the article didn't mention lack of reasonable development environment. At least on AWS, the "SAM" experience has been probably the worst development experience I've ever had in ~20 years of web development. It's so slow (iteration speed) and you need to jump through a billion hoops of complexity all over the place. Even dealing with something as simple as loading environment variables for both local…

I used to be complain about the same thing and even asked someone who was head of BD for Serverless at AWS what they recommended, and didn't get an answer to my satisfaction. After working with more and more serverless applications (despite the development pains, the business value was still justified) I realized that local development was difficult because I was coupling my code to the delivery. This is similar to t…

> Instead, you can write a function that takes parameters from elsewhere and call your business logic there.

This is what I tried to do initially after experiencing the dev pain for only a few minutes.

But unfortunately this doesn't work very well in anything but the most trivial case because as soon as your lambda has a 3rd party package dependency you need to install that dependency somehow.

For example, let's say you have a Python lambda that does some stuff, writes the result to postgres and then sends a webhook out using the requests library.

That means your code needs access to a postgres database library and the requests library to send a webhook response.

Suddenly you need to pollute your dev environment with these dependencies to even run the thing outside of lambda and every dev needs to follow a 100 step README file to get these dependencies installed and now we're back to pre-Docker days.

Or you spin up your own Docker container with a volume mount and manage all of the complexity on your own. It seems criminal to create your own Dockerfile just to develop the business logic of a lambda where you only use that Dockerfile for development.

Then there's the whole problem of running your split out business logic without it being triggered from a lambda. Do you just write boiler plate scripts that read the same JSON files, and set up command line parsing code in the same way as sam local invoke does to pass in params?

Then there's also the problem of wanting one of your non-Serverless services to invoke a lambda in development so you can actually test what happens when you call it in your main web app but instead of calling sam local invoke, you really want that service's code to be more like how it would run in production where it's triggered by an SNS publish message. Now you need to somehow figure out how to mock out SNS in development.

Serverless is madness from start to finish.

Re: The Serverless Revolution Has Stalled

#253

Earlier quoted context omitted.

How does moving to 'serverless' change the need for patching and other security maintenance? You've just moved it to a server owned by someone else. Sounds more like passing the buck rather than ensuring security.

soc2 compliance for Lambdas happens through AWS https://aws.amazon.com/compliance/services-in-scope/ not through our team's engineers. So for example, if we have a service deployed in an EC2 instance, we have to update the instance(s) every month by a certain date. Sometimes, we have to update early if there is a severe security issue. We also have to manage things like security software that has to run on every inst…

I guess in places where I've worked we've had Ops folks that handled things like access controls, managing secrets, servers, network, etc. Usually in space rented in a commercial datacenter, where the datacenter handles power, cooling, physical security, and where the building has a diversity of internet providers. Its a team effort. In my opinion, software developers shouldn't be responsible for OS level patches, OS access controls, etc. It makes sense in a startup situation but it doesn't scale and it only takes one misstep.

Re: The Serverless Revolution Has Stalled

#254

As someone on a two-man-team who runs a lot of little "utility" functions in AWS Lambda with the Serverless Framework[1] to support our DevOps / Build processes, it's been one of the most productive tools in my toolkit (after the initial learning curve, of course). It allows me to stand up a practically maintenance-free endpoint in a matter of hours (usually to glue separate services together): * Want to run a quick…

How is owning an AWS account easier than a cheap dedicates server? You should have a code repo and backups in either case. At least some people mention "but I can scale this lambda x1000" and that's one advantage... But you can do all those tasks on a hetzner server in same amount of type, just python scripts.

On the flip side, serverless can scale to 0. Makes it very cost effective for one off functions

Re: The Serverless Revolution Has Stalled

#256

Earlier quoted context omitted.

> ... stack is vue/python/s3/lambda/dynamodb/stripe Did you chose python for backend dev? Any framework like flask or django? Also no preference of single-language for both backend and front-end, by using node.js backend? Just trying to get into web-dev.

Yes, it (Python) was chosen because we could leverage existing internal code that was written in Python and it happens to be my strongest language. If I could do it all over, I would still choose Python. That being said, I have been working professionally (building apps like this) for almost 14 years so my willingness to bite off a homebrew Python framework endeavor as I did here is a lot different than someone just…

Django is decent for POCs that need some level of security since you get authentication out of the box with no external database configuration necessary due to sqlite. Sometimes you have an endpoint that needs that due to resource usage, but the number of users is so low that setting up a complicated auth system isn’t worth it.

Minimalist frameworks are great for either very small (since they don’t need much of anything) or very large projects (since they will need a bunch of customization regardless).

In that regard, I think Django is kind of like the Wordpress of Python.

Re: The Serverless Revolution Has Stalled

#257
post #144
post #25

Kind of surprised the article didn't mention lack of reasonable development environment. At least on AWS, the "SAM" experience has been probably the worst development experience I've ever had in ~20 years of web development. It's so slow (iteration speed) and you need to jump through a billion hoops of complexity all over the place. Even dealing with something as simple as loading environment variables for both local…

I used to be complain about the same thing and even asked someone who was head of BD for Serverless at AWS what they recommended, and didn't get an answer to my satisfaction. After working with more and more serverless applications (despite the development pains, the business value was still justified) I realized that local development was difficult because I was coupling my code to the delivery. This is similar to t…

This principle works with front end development too. Crazy build times on large applications can be alleviated if your approach is to build logic in isolation, then do final testing and fitting in the destination.

It’s hard to do this when surrounding code doesn’t accommodate the approach, but it’s great way to design an application if you have the choice. I really love sandboxing features before moving them into the application. Everything from design to testing can be so much faster and fun without the distractions of the build system and the rest of the application.

Re: The Serverless Revolution Has Stalled

#258
post #18

I think it's more a case of it coming full circle. People realising that it's just another tool in the toolbox rather than 1 tool that can replace their entire toolbox. Much of the cynicism seems to come from that. I do agree with jason though - open ended serverless things charged per use are no fun. Now you can bankrupt yourself at scale with that bug & the 1000 instances.

People place such high expectations for new innovations solving all of their problems. No, it isn't a panacea: apply it only when it makes sense to do so.

I'm yet to meet such people in real life. At places I work people always treated serverless as a tool. Usually solutions would have a little lambda icing on a large monolith cake, so to speak.

Re: The Serverless Revolution Has Stalled

#259
post #137

Earlier quoted context omitted.

But you forgot that always-on server it lives on. The idea behind serverless includes the fact that you don't pay for what you don't use. So if no requests are served, you owe nothing. Your FCGI solution shuts down idle copies, but keeps the server running...

I don't really understand serverless, but if it's running a process in response to a request, then of course there's still a server, because something received that request. FCGI has a server running. And serverless has a server running, as long as its listening for requests.

The running server is a server you don't pay for.

Re: The Serverless Revolution Has Stalled

#260
post #66
post #25

Kind of surprised the article didn't mention lack of reasonable development environment. At least on AWS, the "SAM" experience has been probably the worst development experience I've ever had in ~20 years of web development. It's so slow (iteration speed) and you need to jump through a billion hoops of complexity all over the place. Even dealing with something as simple as loading environment variables for both local…

I found firebase functions pretty easy and painless. Worth a look.

I'm a big Firebase user with Firestore and has been great...no not perfect and the "cold start" is probably the worst issue. However, deployments are easy, the GUI tool keeps getting better, like the extension packages, and the authentication system is quick to implement.
Post reply on HN