News for hackers. Stuff that matters.
Re:The Serverless Revolution Has Stalled by whalesalad on Monday October 12, 2020 @05:43PM (#24759768)
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 make it available for others.

stack is vue/python/s3/lambda/dynamodb/stripe but the tooling I developed is generic enough to directly support any lambda runtime for any sub-namespace of your project so it would also support a react/rails application just as well.

Re:The Serverless Revolution Has Stalled by dahfizz on Monday October 12, 2020 @09:05PM (#24761286)
As a systems developer, comments like yours make me amazed at the state of web development. From the outside looking in, it seems like 10% code and 90% monkeying around with tooling and frameworks and stacks.
Re:The Serverless Revolution Has Stalled by whalesalad on Monday October 12, 2020 @11:17PM (#24761913)
It’s still a very young ecosystem. Serverless hasn’t had its Rails moment (yet).

I don’t think it’s as bad as people make it out to be.

Re:The Serverless Revolution Has Stalled by x86_64Ubuntu on Tuesday October 13, 2020 @12:59AM (#24762424)
What's the Rails moment? It's already hit the part where people speak about it as if it will save the world.
Re:The Serverless Revolution Has Stalled by Toutouxc on Tuesday October 13, 2020 @02:35AM (#24762877)
I believe it's the moment when there's a solution that just makes sense and works well for most people. A gold standard that other solutions will try to develop more and spice up, instead of reinventing it.
Re:The Serverless Revolution Has Stalled by whalesalad on Tuesday October 13, 2020 @07:06AM (#24764309)
Precisely!
Re:The Serverless Revolution Has Stalled by rektide on Monday October 12, 2020 @05:53PM (#24759878)
A lot of these DX (developer experience) concerns are, imo, rooted in what the article describes as "Vendor Lock".

Sure, you can write a bunch of tools to work around the crufty, terrible development environment's shortcomings. But ultimately, you are just locking yourself further & further & further in to the hostile, hard to work with environment, bending yourself into the bizarre abnormal geometry the serverless environment has demanded of you.

To me, as a developer who values being able to understand & comprehend & try, I would prefer staying far far far away from any serverless environment that is vendor locked. I would be willing & interested to try serverless environments that give me, the developer, the traditional great & vast powers of running as root locally that I expect. Short of a local dev environment, one meets both vendor lock in, & faces ongoing difficulties trying to understand what is happening, with what performance profiles/costs. I'd rather not invest my creativity & effort in trying to eek more & more signals out of the vendor's black box. Especially if trouble is knocking, then I would very much like to be able to fall back on the amazing toolkits I know & love.

Re:The Serverless Revolution Has Stalled by heavyset_go on Monday October 12, 2020 @09:31PM (#24761412)
I agree with your sentiments. I've found that OpenFaaS[1] has been nice to work with and you can deploy it wherever.

[1] https://github.com/openfaas/faas

Re:The Serverless Revolution Has Stalled by TheOtherHobbes on Monday October 12, 2020 @07:32PM (#24760716)
AWS is shaping up to be Oracle 2.0.

That isn't a compliment.

Re:The Serverless Revolution Has Stalled by ethbr0 on Monday October 12, 2020 @08:43PM (#24761173)
Given an opportunity to milk existing, locked-in customers in lieu of investing in R&D and new products, few leadership teams can resist.

Time will tell.

Re:The Serverless Revolution Has Stalled by mushbino on Monday October 12, 2020 @10:26PM (#24761649)
I'm predicting AWS will wait for a competitor to do the R&D work, see if it's successful, and then look for a way to beat them at their own game.
Re:The Serverless Revolution Has Stalled by rektide on Thursday October 15, 2020 @06:28PM (#24794954)
aws's whole pitch has been cutting out server huggers & engineers, relying on aws. since day 1. often to wonderful effect. with far far better software programmability than our old crufty ways.

but lambda gets to the point where there is no local parity, where it's detached, is no longer an easier managed (remotely operated) parallel to what we know & do, but is a system entirely into itself, playing by different rules. one must trust the cloud-native experience it brings entirely, versus the historical past where the cloud offered native local parallels.

Re:The Serverless Revolution Has Stalled by jsemrau on Monday October 12, 2020 @06:06PM (#24759990)
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.
Re:The Serverless Revolution Has Stalled by phinnaeus on Monday October 12, 2020 @09:53PM (#24761510)
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 by nullsense on Monday October 12, 2020 @08:24PM (#24761062)
CDK is a massive improvement over raw CloudFormation, and people are starting to move away from Terraform and to things like CDK or Pulumi.
Re:The Serverless Revolution Has Stalled by demosito666 on Tuesday October 13, 2020 @03:37AM (#24763193)
This is a really funny thing, since for the last ~10 years I've been hearing how we're deliberately doing IaC/CM tools "not a programming languages because reasons" (and thus have to do horrible hacks to support trivial things like loops and conditions), and now suddenly we're building libraries in programming languages that convert the code into non-programming-language description, which is then interpreted by a program into several other intermediate representations and finally emits trivial API commands. I guess the next step would be write a declarative language on top of CDK or Pulumi that will compile it into python which will generate CF/TF files.
Re:The Serverless Revolution Has Stalled by robertlagrant on Tuesday October 13, 2020 @03:47PM (#24769528)
The magic is in knowing which trivial API commands to call to make the infrastructure match the desired state.
Re:The Serverless Revolution Has Stalled by whalesalad on Monday October 12, 2020 @07:02PM (#24760523)
I manage a handful of projects with Terraform and it works well in many situations. It has improved a lot recently but for a long time I really hated the syntax. I still do to some extent but have learned to cope with it most of the time.

If you are working on a project where all of your infrastructure will live on AWS I would definitely urge you to give it a second look. The amount of infrastructure I manage right now with a single .yaml file is really killer.

Re:The Serverless Revolution Has Stalled by fizixer on Monday October 12, 2020 @06:41PM (#24760298)
> ... 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.

Re:The Serverless Revolution Has Stalled by collyw on Tuesday October 13, 2020 @05:42AM (#24763864)
Benefits of a single language are outweighed by the fact that the language is JavaScript.
Re:The Serverless Revolution Has Stalled by whalesalad on Monday October 12, 2020 @07:15PM (#24760627)
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 getting into the field.

Django: avoid unless you have a highly compelling (read: $$$$) reason to learn and use this tool. I cannot think of one, honestly.

Flask: fantastic, but be conscientious about your project structure early on and try to keep businees-logic out of your handler functions (the ones that you decorate with @app...)

Sophisticated or more sugary Node.js backends are not something I have ever explored, aside from the tried-n-true express.js. I tend to leverage Python for all of my backend tasks because I haven't found a compelling reason not to.

Re:The Serverless Revolution Has Stalled by slaymaker1907 on Monday October 12, 2020 @10:05PM (#24761562)
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 by darkteflon on Monday October 12, 2020 @08:38PM (#24761155)
Could you elaborate on why you dislike Django? Would be great to hear from someone with extensive Python experience.
Re:The Serverless Revolution Has Stalled by whalesalad on Tuesday October 13, 2020 @09:51AM (#24765518)
That is such a tough question to answer carte blanche.

All-in-all, Django is not bad software. I have a bad taste in my mouth though because as I learned and developed new approaches to solving problems in my career I feel like Django got in the way of that.

For instance, there are some really killer ways you can model certain problems in a database by using things like single table inheritance or polymorphism. These are sorta possible in Django's ORM, but you are usually going against the grain and bending it to do things it wasn't really supposed to. Some might look at me and go: ok dude well don't do that! But there are plenty of times where it makes sense to deviate from convention.

That is just one example, but I feel like I hit those road blocks all the time with Django. The benefit of Django is it is pre-assembled and you can basically hit the ground running immediately. The alternative is to use a microframework like Flask which is very lightweight and requires you to make conscious choices about integrating your data layer and other components.

For some this is a real burden - because you are overwhelmed by choice as far as how you lay out your codebase as well as the specific libraries and tools you use.

After your 20th API or website backend you will start to have some strong preferences about how you want to build things and that is why I tend to go for the compose-tiny-pieces approach versus the ready-to-run Django appraoch.

It's really a trade-off. If you are content with the Django ORM and everything else that is presented, it is not so bad. If you know better, you know better. Only time and experience will get you there.

Re:The Serverless Revolution Has Stalled by darkteflon on Tuesday October 13, 2020 @06:46PM (#24771180)
That's great, cheers for that. It's helpful to know that your concerns are mainly to do with taking an opinionated vs non-opinionated approach - that's a framework for thinking about the choice between Django and (e.g.) Flask that many people (including myself) can hang their hat on.
Re:The Serverless Revolution Has Stalled by StavrosK on Monday October 12, 2020 @09:40PM (#24761448)
On the flip side, not being able to use Django is one of the reasons against serverless for me. There's immense value in having a library for anything you might think of, installable and integratable in minutes.

You have to roll your own way too often in Flask et al, so much so that I don't see any reason to use Flask for anything other than ad-hoc servers with only a few endpoints.

Re:The Serverless Revolution Has Stalled by wussboy on Monday October 12, 2020 @11:42PM (#24762050)
Check out Django-Zappa. It’s Django that runs in a Lambda.
Re:The Serverless Revolution Has Stalled by StavrosK on Tuesday October 13, 2020 @05:01AM (#24763638)
Oh I had forgotten about that, thanks!
Re:The Serverless Revolution Has Stalled by empthought on Monday October 12, 2020 @08:50PM (#24761209)
Django gets you a lot if you have a traditional app with a traditional RDBMS and a traditional set of web servers. It’s too opinionated to easily map into AWS serverless.
Re:The Serverless Revolution Has Stalled by lstroud on Monday October 12, 2020 @10:45PM (#24761738)
I really like Chalice for serverless Python projects.