Serverless Components
github.com
github.com
These components are lightweight and simple and trivially easy to use because they are lightweight and simple and cover trivial use cases. But if you build anything beyond the trivial you will eventually have to get into the weeds, and the details are no longer irrelevant, and the “bloat” will happen to your beautiful lightweight and simple Serverless configuration.
There’s no need to ridicule the inevitable complexity of complexity to sell this stuff. It’s just pointless negativity.
Their point is that you don't have to worry about any of this stuff to get simple tasks done, which you used to have to worry about.
The full statement from the source material says bloated cloud infrastructure "configurations", referring to verbose configuration files. Needlessly critical? It depends on your experience with these.
These, serverless, cloud, and more are abstractions. Fortunately, if the abstraction doesn't fit your needs, you aren't forced to use them.
https://github.com/serverless/components/tree/master/templat...
It’s cool that aws has the data api for lambda to connect to aurora serverless. But then you’re stuck with MySQL instead of postgres, and also stuck with ~100ms db access times.
https://www.jeremydaly.com/aurora-serverless-data-api-a-firs...
100ms is pretty damn slow still unfortunately. Also, I much prefer postgres to mysql.
There are certainly use cases where nosql is very helpful - heavy writes, as a denormalized cache, simpler non relational data models etc http://highscalability.com/blog/2010/12/6/what-the-heck-are-...
I've never really seen those issues unless there is a more extreme circumstance.
In my read of "web app", in most cases you want to push/data in and out of the database. And modelling 1:1 and 1:n relationships is pretty natural in my experience. Deeply nested relationships are a pain, but they're usually a pain in SQL too. Document-orientation helps here a bit, but with some drawbacks. Where I think it does fall over completely is analytics, and OLAP-like work.
I guess hotspots can be an issue. However, that implies considerable related transaction volume, which I'd argue DynamoDB can excel at.
If you're using a framework like Rails - then sure, DynamoDB is out. But so is Lambda. The pattern of SPA (React/etc), Lambda, and DynamoDB is what's emerging instead of those frameworks. Definitely agree it can't cover many cases, but covers a lot of ground for me
Most apps I write for my own business, or see in production at companies I work for use a mix of sql and nosql depending on what they are doing. Mongo seems quite popular for heavy write loads, while still supporting some indexing and querying. It's great for fan out also.
I often see teams and devs failing to use DynamoDB effectively only because they don't know/use best practices. It just needs more time.
What I don't like about DynamoDB is the vendor lock-in. Otherwise it's a great product and works really well for many use cases.
DynamoDB, however, has:
1) 1st-class integration with aws-sdk
2) A cool feature "streams" which can trigger other services when your data changes: https://docs.aws.amazon.com/amazondynamodb/latest/developerg...
For what it's worth, this tool kit (components) could be useful useful for the toy case of someone setting up something like DocumentDB. DocumentDB (not DynamoDB) is the mongo-emulating nosql document-based DB option-- it has automated vertical/horizontal scaling (up to 64tb https://docs.aws.amazon.com/documentdb/latest/developerguide...)
A DocumentDB cluster has no public endpoints so any resources that interact with it (ie a lambda function) need to be in the same. You can't modify a lambda's VPC unless that lambda function has a special permission set from an IAM blah blah
Automating that bit would be cool
Granted I haven't really tried building anything yet, but part of that is that I needed a way to get an overview what could even be done. This seems like a nice way to get introduced.
Here are a lot more examples: https://github.com/serverless/examples
And if you'd rather define the infrastructure side as code vs YAML, you might want to check out Pulumi as well: https://github.com/pulumi/examples
Or AWS CDK
If you have arbitrary funds.
Point is serverless costs more per unit deliverable
When the Serverless Framework was created in 2015, there were only few use-cases you could do with a serverless architecture (an architecture built on auto-scaling, pay-per-execution cloud services, like AWS Lambda) because the services that had serverless qualities were few and immature.
Since then, a growing number of new and existing cloud services have "serverless" qualities. These days, "serverless" seems less of a fad, and more of an important chapter in the story of the cloud, as it evolves as an abstraction over infrastructure.
It's likely large and small cloud vendors will continue to introduce serverless cloud services to the market. All of which will continue to expand the number of use-cases you can do with a serverless architecture.
The Serverless Framework's initial application model is a great abstraction for many use-cases, and it helped hundreds of thousands of people start building serverless applications, easily.
Now, it's time to expand that model. Serverless Components represent multiple models, all designed around specific use-cases. This approach can better suit the growing number of serverless use-cases we're seeing. Additionally, as students of developer tooling and infrastructure provisioning, we've learned that by first knowing the use-case, you can build better infra/app automation that's faster, more stable and more relevant. There are many innovations we seek to introduce with the Serverless Components paradigm.
Overall, the "serverless" movement is about building applications with radically low overhead. As software eats the world, this trend seems to have come at an appropriate time. Serverless cloud services will continue to emerge and mature. Fortunately for us, they represent the greatest building blocks of all time. Who knows, perhaps a new golden era of software development is upon us.
Either way, Serverless Components is here to make it even easier for every developer to deliver radically low cost/overhead software.
With that in mind - you already have a system that is highly configurable and easy to figure out - I really have a hard time figuring out what the purpose of Serverless Components is - is it mainly the sharing Components part?
The backend is a simple event based system. I am using Lambda (.NET Core), DynamoDB and SQS on the backend. Frontend API calls trigger Lambdas, which either schedule or create SQS messages, that fan out to a number of Lambdas. For domain management I use serverless-domain-manager which is able to create subdomains in AWS Route 53 and create mappings between CloudFront and Route 53 DNS.
I have two deploy stages, dev and prod, which automatically deploy to their separate instances and subdomains. This is all setup in a single serverless.yml file and deployed through AWS CloudFormation (which Serverless allows me to know practically nothing about and still deploy my changes).
GitLab CI/CD builds, tests and deploys my dev stage on commit to develop branch, while the prod deploy is a manual job in GitLab from the master branch. Netlify also automatically deploys the frontend on commit.
So I guess that is my tech stack :)
Edit: Also, these services are practically free until you hit a substantial amount of resource consumption.
Many common use-cases (APIs, Websites, Websocket backends, Scheduled tasks) are perfect for serverless architectures.
Serverless Components give you a React-like experience to deploy them more easily than ever.
---
Short video preview: https://twitter.com/goserverless/status/1156977112147845120
---
Here's a quick-start guide...
Install Serverless Framework
• npm i -g serverless
• https://github.com/serverless/serverless
---
Pick a template:
• Serverless Fullstack App - https://github.com/serverless/components/tree/master/templat...
• Serverless Websockets Backend - https://github.com/serverless/components/tree/master/templat...
• Serverless API Backend - https://github.com/serverless/components/tree/master/templat...
• Serverless Website - https://github.com/serverless/components/tree/master/templat...
• Scheduled Task - https://github.com/serverless/components/tree/master/templat...
• & More - https://github.com/serverless/components/tree/master/templat...
---
Make sure you have AWS credentials set up
• https://github.com/serverless/components#credentials
---
Hopefully these enable everyone to build more and manage less.
Enjoy,
Team @ Serverless.com
Pick a template:
• Serverless Fullstack App - https://github.com/serverless/components/tree/master/templat...
• Serverless Websockets Backend - https://github.com/serverless/components/tree/master/templat...
• Serverless API Backend - https://github.com/serverless/components/tree/master/templat...
• Serverless Website - https://github.com/serverless/components/tree/master/templat...
• Scheduled Task - https://github.com/serverless/components/tree/master/templat...
• & More - https://github.com/serverless/components/tree/master/templat...
Can you elaborate on what you mean by this? As a user of both serverless and react I’m afraid I’m failing to see your point here.
Other than that - exciting stuff. I’ve been eagerly waiting for the ability to build some more powerful abstractions, preferably with as little yaml as possible. :)
Serverless components can be used declaratively (YAML) or programmatically (JavaScript).
It's the JavaScript experience that takes a lot of inspiration from React when you wish to write your own reusable Serverless Component.