Build a Serverless Web Applicaion
aws.amazon.com
aws.amazon.com
If you are paying for servers, your app isn't serverless. Real serverless to me means decentralized p2p and offline apps. I also consider p2p-routed apps with centralized control serverless as long as they continue to function in a read-only state when the control server is down.
TL;DR: It's just a name. Get over it.
Serverless means no server, which is false, because there is a server that runs your code.
> because the experience of development is such that you don't really have to think about servers, along with all the complexity of provisioning, configuring and managing them.
That sounds like you are talking about 'web hosting' or 'application hosting', which existed decades ago, don't see any point in inventing a confusing buzzword when we have perfectly fine terminologies already.
> TL;DR: It's just a name. Get over it.
It's a useless and confusing marketing buzzword that makes having intelligent conversations harder. I would love to understand your rationale for defending this confusing buzzword.
A marketing buzzword is something like "web scale", which might be used by a non-technical person to describe a technology, but has no real technical meaning. Serverless is not a buzzword because it is the name used for a collection of technologies, even if it isn't a specific product. "Software containers" also falls into this category.
Yes, serverless architectures involve servers. Well done for recognising this, you are very smart. In fact, you are smart enough to realise that the architectures we are talking about here are very distinct from traditional web hosting services. So, it's convenient to use a different name for them.
Finally, it doesn't really matter whether you like the term or not. It is the accepted term and it is here to stay. If you want to engage in conversations on the topic you will need to move past your misgivings.
What collection of technologies does it name? And how is that different from "web scale" technologies that is also a group of technologies?
> Yes, serverless architectures involve servers. Well done for recognising this, you are very smart.
If you would have strong arguments, you wouldn't need snarkiness.
> In fact, you are smart enough to realise that the architectures we are talking about here are very distinct from traditional web hosting services.
That's the exact opposite of what I've said, if you look at it from a server management point of view, traditional web hosting and "serverless" are one and the same, both are used to run the code you upload and both are managed by someone else.
> So, it's convenient to use a different name for them.
It's not convenient, it's confusing.
> Finally, it doesn't really matter whether you like the term or not. It is the accepted term and it is here to stay.
Accepted by who?
> If you want to engage in conversations on the topic you will need to move past your misgivings.
If you want to engage in conversations on any topic with anyone, you should read what's on this website https://yourlogicalfallacyis.com/ and stop doing them.
But didn't we get "The Cloud" to do that? I mean I'm fine with rebranding but this is a really fine line.
I personally am angered at the 'everyone should be a sys admin' culture we've come into as a profession, it completely trivializes the role of sys admins who are critical to any product/company. Good sys admins bring a lot to the table, just like experienced DBAs.
Edit; wow either everyone really hates sys admins and dba's or prefer "adminless", any down voters care to explain?
In truth, I don't think the name 'serverless' will stick in the long term, there is just too much animosity for it. The useage here by AWS is the first time I've seen it in a couple of months. Anecdata, but I think most would admit it's not very common.
I would argue that "sys admins" - in the form of dedicated personnel - are not "critical to an product/company". I know plenty of smaller companies who are successfully bringing in profits, making payroll, etc, but do not have any sysadmins employed. At some point, they will need those skills (and probably stronger DB skills) but these aren't always critical to every project/company/org. Perfect is the enemy of the good.
EDIT: middle ground.
Yeah sure sys admins and dbas aren't critical, but if an organization values what they can do, they can multiply the productivity and effectiveness of the app and product teams.
Specifically, features are faster to implement because the schema is not jacked, the app is responsive and stable because the data is normalizesd and indexed for the access patterns, data is consistent. Customers are happy.
Similar for the network/server side for sys admins.
The policy of "only DBA can make any changes to anything, and all schema changes have to be discussed, reviewed, vetted and approved by DBA" has benefits, in some situations, but also problems.
I had a DBA question why I needed pagination. "No one has ever asked for it before, and never needed it, and I think you're building your application wrong if you need that". After a few weeks of contentious meetings, we got hand-rolled stored procedures for each specific table/query, but they also took days to get to us.
But, hey, you know... at least the tables were normalized and we had "proper" indexes. We just took weeks to get done what should have taken a few hours to prototype (because, during the time we were building the tool, the team we were building it for ended up buying some third party service because we were taking so long).
We've all got war stories of incompetence on all sides (dba, dev, pm, whatever). This is why I advocate "middle ground". I trust a DBA who's actually done a bit of raw coding in their life. I trust a developer who understands the basics of SQL and DB workings (again, 'basics' are fine). I trust the estimates of a PM who is engaged with the team on a regular basis. I trust the views of a business analyst more if they actually show up to meetings and listen to the parties involved.
* how many real or virtual servers are running your code.
* how the servers were provisioned or setup.
* how to access the servers (either via SSH or programmatically), either than through predefined APIs.
* what happens when the servers break.
* what causes the servers to disappear.
* etc.
The "server" concept has been abstracted out of the equation and you're no longer required to think in terms of servers. (there is one exception: RAM usage is still something you need to predict for AWS Lambda.)
Instead, you're thinking in terms of limitations and usage of the service.
With the above said, serverless has a bit of journey to make. The toolchain is growing and the workflow of local development, testing and deployment is still a work in progress. I feel like it's a great time to jump in because there is a lot of exciting work to do and a good foundation to build on top of.
Now the same thing has got another stupid name: Serverless. I wonder what the same stuff will be called two years from now.
What has changed is that the suite of services now exist to fully enable an application to be (almost) completely serverless.
Similar to micro-services, people will overuse the word and it will seem like a fad. IMO, it's more than a fad. Once the toolchain is mature, it will become the default way of building applications.
Web 3.0 is truly serverless because your application lives on a decentralized p2p cloud.
Ethereum/Swarm(or IPFS)/Whisper is an example of a serverless p2p stack.
You may as well call the service they're selling "managed", because that's what it is.
When "cloud" or "serverless" will be cheaper than managing your own dedicated servers, then it will actually be useful. Until then, it's just marketing.
It's akin to someone saying it's "free" because you don't have to think about the money, e.g. you pay with a credit card.
Perhaps the name it should be called is adminless or backend as a service. In any case, there's probably not much one can do about the name at this point.
What's odd is that we already have "infrastructure as a service", which is generally what this is. An entire infrastructure to run your code, without having to set it up (although you still need to configure logging to get useful data in most situations, it seems).
#define TRUE FALSE //Happy debugging
"Serverless" had no previous meaning - it's not like Amazon bastardized an existing term. The word will ultimately be defined once people expect it to mean something specific. Personally I like Amazon's use of the term here.
A recent similar example: the word "performant". The number of stubborn people who screamed "performant isn't a word!" was ridiculous. Everyone understands the intention behind the word "performant" without needing to have it explained to them. The introduction and wide adoption of a word is exactly how new words are folded into language. Language is fluid! Language has never been static and inflexible, and pouting because we have extended the dictionary over and over again for thousands of years is frivolous.
"With serverless computing, your application still runs on servers"
So it's not serverless? Why are you calling it serverless?
This practically fits in the same boat as docker...
It is even specifically incorrect to claim that AWS lambda functions always run on servers; they have at least three distinct execution environments, one of which is IoT devices via AWS Greengrass another being inside the Cloudfront CDN. It's also a stretch to suggest that the primary execution environment for AWS Lambda is a server device; that is not AFAIK specified anywhere.
So, although the term itself may annoy you, the counter-claim that "it must be servers" is a demonstrably false assumption.
Why not call it "hosted" or "virtually-hosted" instead?
A server cannot do anything without being a server.
I quote: "Serverless computing allows you to build and run applications and services without thinking about servers."
Serverless clearly is not serverless.
down voted edit: LOL
My experience with servless is that while this may be true at a certain level:
> No server management
I feel like in Amazon's current toolset, you are MORE aware of "servers" than you ever have been before. It's just abstracted into a different layer (cloudformations, etc). The boilerplate for severless projects it's a complete mess, imo.
Besides that, the Develop/Test/Deploy/Manage lifecycle is really difficult to reason about. I would hate to be the one on call when a serverless service goes down and I have to figure out what's going on!
I look forward to Amazon releasing more tools (or cleaning up the ones they have) to make Serverless a breeze to work in.
[EDIT] clarification of a couple minor things
Serverlessconf just announced their NYC conference, expected to be the largest yet. If Austin is any indicator, it will be huge. [1] Tim Wagner at AWS likes to spout the stat that billions of financial trades are already being processed per day on AWS Lambda. The "serverless" market is gigantic and growing rapidly.
And then there's companies like StdLib [2], where we've built an abstraction layer on top of serverless architecture that turns remote procedure calls (and APIs) into first-class citizens of your development environment with a single package and allows you to ship applications without ever worrying about infrastructure. We just closed a $2M seed [3] and are announcing some transformative partnerships shortly. We're tackling some of the exact issues you have problems with, and we're not the only ones.
The future is already here. It's just not evenly distributed. ;)
Disclaimer: I am the founder of StdLib. :)
[1] https://nyc.serverlessconf.io/
[2] https://github.com/stdlib/lib/
[3] https://techcrunch.com/2017/06/27/stdlib-just-raised-2-milli...
But like I said, I don't think that the tooling is there right now for mass migration (or anything like it). It's really difficult to test/debug. It's difficult to dianose issues. It's difficult to even set up a "Hello World" API Gateway that uses lambdas. It's painful... as are all new technoligies.
I guess what I mean to say is: I look forward when I just jump on AWS and start using it for a production app, and the boilerplate and amount of config files I have to maintain drops.
I'm also aware of the tool called "serverless" ( https://serverless.com/ ) which is also a step in the right direction.
[1] - https://iopipe.com
dang, I think there should be a feature to add an optional anonymous and private comment to the person when you downvote something, to let them know why (but with no arguments).
I can tell you it's pretty difficult as a founder to draw the line around self-promotion; on one hand, you don't want to be an ass, and on the other, you're genuinely excited and passionate about the future you're helping to create and have personally poured your blood and sweat into for thousands of hours.
I hope that "real recognizes real" at some point in the communication chain and we're able to maintain that with our developers. I appreciate your post here, definitely.
Plus working with a command line just seems more "right" than clicking around in AWS backend.
Amazon got the same guts, but their presentation of these tools is horrendous. It's aimed at the highly skilled developers who would get the concepts in a blink, with the only problem that these are the same people who can spin out servers with more pleasure and probably in the same amount of time.
Google meanwhile, with their purchase of Firebase, makes some really appealing tools that are not just easy to use, but also easy to understand. Besides, their dev outreach is quite stunning, and so is the email support.
Would love to see Amazon compete, but they have a long road ahead.</2c>
They recently Google-ified their website but it's still less of a mess than Google cloud console (which feels like navigating a helicopter's dashboard).
First impressions matter and I think Firebase nailed it. The website presents the value clearly while also allowing you to get into the weeds if you need to. They ought to put their design team in charge of the rest of Google's cloud platform.
In most cases people are trying to enhance what they already have which means needing access to what is already there.
Amazon is absolutely dominating this space
Do you have any advice on how we could make this stuff more accessible to new developers?
When you say the presentation do you mean the overall marketing, the UX, or just the CSS?
I know a ton of people who have no problem spinning out an EC2 instance to scrape the web for all their needs in a heart beat, and yet I don't know many who just want to make software for people, without all the complexity of setting things up.
Look at Firebase, they have "Authentication", "Database", "Storage", and "Functions". If I want to Auth users into my app, it's quite literally a one line of code. Meanwhile Amazon has "Cognito," which requires setting up identities, rules, connecting it to other AWS services ... head explodes.
That's a small example, but AWS is built for some serious enterprise business, and if you want to make something like Firebase, you need to repackage it all, and dumb it down to a simple use case. Run whatever 265 services are necessary in the background, but give the user 1 thing to worry about.
I fully understand that would be really hard to do, but that's the point. Gotta do the hard thing for the user, and they will come.
As far as UX/css/visual, it's all of it. Like another commenter mentioned, in order to make things pleasant you gotta move away from the AWS style guide and towards something unique and friendly. Right now the entire AWS website look like it's been built in a spare time by a sys admin (because it probably has been).
IMO it's okay to make "AWS Light" a stand-alone offering, like Heroku, but that means you need to commit to maintaining such a service, and from what I hear through the grapevine Amazon is quite happy to be the piping for the internet, without having to run the consumer side of things.
Have you seen lightsail or codestar?
1. Take "Amazon" out of every product name. Have a look at this list for example: http://docs.aws.amazon.com/general/latest/gr/aws_service_lim... This adds nothing but clutter to the page.
2. Stop calling everything "Simple". If it's simple, people will be able to tell for themselves. Calling things simple potentially makes people feel dumb if they have a problem with it.
3. The sheer number of offerings (over 18 groups with multiple items) on the "Services" tab of the AWS management console is overwhelming. I'd have a designer see if there was a better way of organizing things.
Not saying I don't like the architecture (actually think it's quite useful for many scenarios). Not sold on using DynamoDB (I'd rather use a traditional SQL store).
I had to use lambda at work to import files from s3 ranging anywhere from a few megs up to 10-20gb. Ended up using two lambdas (one for creating byte ranges and another for processing those ranges).
I wouldn't be surprised if it achieves a near-monopoly for a while... But I think that eventually more flexible open source solutions will take over. Open platforms like Docker and Kubernetes will likely replace Lambda just as Linux replaced Windows on the server-side.
Are you serious? Every major player in the market has a more or less equivalent offering. They started appearing within weeks of AWS Lambda's launch.
https://cloud.google.com/functions/
https://azure.microsoft.com/en-us/services/functions/
https://www.ibm.com/cloud-computing/bluemix/openwhisk
There are also a number of open source projects emerging... to support migrating between providers to reduce lock-in, or to roll your own service:
I am not sure if Docker/Kubernetes are comparable with Lambda. But currently there are some attempts to develop an open source alternative to Lambda and other proprietary FaaS (Function as a Service) platforms like OpenWhisk for Cloud Foundry: http://openwhisk.org/
Or perhaps I missed the point of your last sentence.
I wonder why Google is so passive in this regard; sometimes I think they have an aversion to honest money and real products.
https://m.youtube.com/watch?v=F8-y_d7l-2c
An interesting thing to note is that efficiencies in this space only increase. Which theoretically lowers prices. You also get some pretty rapid and massive parralellization when you need it. The pywren project has some insightful examples and benchmarks of teraflops of compute and 10s gigabits/s of data arriving as part of a single function call. It's a different paradigm that will transform a lot of workloads but not all.
It's hard not to get swept up in the frenzy around it.
- keep your lambda functions warmed up
- node has better warmup time than java lambdas (not sure of python)
- memory size impact of lambda functions (negligible in most cases)
- manage lambda timeouts
- dynamodb latencies are negligible
- api gateway typically does not introduce latencies
- multitenancy challenges with single store of dynamodb
Python and node are both sub-second, compared to Java's 10+ seconds.
I haven't checked my function thoroughly yet, but I think API gateway introduce quite a bit of latency (at least in my case). My maximum invocation time is 600ms, according to AWS Lambda monitoring tool, but network request takes around 1s (checked in chrome dev tools).
Also, worht noting is that my code is hosted in the us-east region and I'm based in Europe. I'm not sure how much latency this introduce.
Buy stuff from Amazon... but for Pete's sake don't make them a core project dependency for your software projects. You only have yourself to blame when they start ratcheting up their prices.
Avoid them at your own peril and detriment to your ability to execute as a business.
With the exception of a few masochists, we don't write software in machine code anymore. Same will be said for cloud infrastructure (actually, it's already there). Breathe and accept the future, focus on building what's next and / or adding value to your business.
I don't subscribe to the theory that this is "the future".
The future is bare metal IaaS with something non-provider specific that sits on that as that is 100% portable between Cloud/in house. Docker/openstack that sort of thing.
Really? I deal with this daily. Can you email randhunt@amazon.com - if you're genuinely having or had issues moving 22TiB to S3 please LMK as that's abnormal for our customers and I want to fix it for you and others.
For the public record this was mainly down to the problem of client reliability and migrating data live when there are 8,000 people hammering it with reads and writes. We went for a read/write through system and background synchronisation. The latter we had real reliability problems with and the upload performance wasn't great.
Also ROI didn't stack up in the end versus our SAN so we canned it.
Frugality
Accomplish more with less. Constraints breed resourcefulness, self-sufficiency and invention. There are no extra points for growing headcount, budget size or fixed expense.
Because you know Leadership Principles aren’t just a pretty inspirational wall hanging.
I get that this isn't reality though. Once you provision something the amount of maintenance is minimum if done well.
For others, e.g. if bandwidth is a large part of your cost, picking them will mean your competitors who go with other providers will be able to sell well below your cost and still have a healthy margin.
Avoiding them (and Google Cloud and Azure) is often essential if you want to survive.
Systems, at scale, especially when run by biological processes (read: all man-made systems), have a tendency to centralize. Economies of scale dictate that this is just more efficient. We don't have to do anything. The "evolutionary reward" (i.e. your business thrives and moves quickly) of building on AWS far exceeds SPOF issues for small, medium, and most large players. Yes, we get fun references when S3 goes down [1], but it's not as bad as literal water pipes taking down your webservers like what happened with Stats Canada [2].
The fact that Azure and Google Cloud exist maintains a competitive market. I liken it to Darwin vs Linux vs Windows. Optionality, but fundamental components of the cloud.
[1] http://funender.com/wp-content/uploads/2017/03/amazon-aws-is...
[2] https://twitter.com/StatCan_eng/status/873285710094233603
Very well put. Couldn't agree more.
Not just EC2 - we use S3, Glacier, Elastic Beanstalk, IoT, DynamoDB, RDS, Lambda, VPC, CloudFront, CloudWatch, Polly, Rekognition ... and I don't think I have ever seen a price increase /hr or /Gb in all that time.
Computing / storage tends to get cheaper - even adjusted for inflation.
AWS has decreased prices 62 times. I'm not aware of a time where their prices increased - (maybe mechanical turk)?
Are you?
In fact I'm not aware of any cloud vendor ratcheting up their prices (I don't consider Oracle a cloud vendor). I've seen misbillings / changing terms on google cloud that resulted, unfortunately, in a few specific types of workloads having increased costs... even then I'm pretty sure they addressed that responsibly... but I'm not aware of any vendor ever increasing costs... only decreasing them... over the past 10 years.
Point being, you have a problem that needs solved (transportation, cloud hosting). You can pick options which mitigate downsides imposed by your personal values (environmentalism, cloud vendor lockin). You don't have to stop driving.
"This workshop is broken up into five modules."
And most of those module links are broken too ;-)
Can only be viewed in a step-by-step mode.
https://aws.amazon.com/getting-started/serverless-web-app/
are broken - but the links to the modules at the top of the page work OK.
If somebody is looking for an even more comprehensive guide to building full-stack apps with Serverless and React.js, I created http://Serverless-Stack.com.
It's open source and up to date with detailed screenshots and code samples.
Disclaimer: I work for aws
There's free tier as well if you want to just try out without commitment
This would basically be the game-changer for building backends on lambda.
The absolute key and most valuable piece in most backends is the persistent datastore. I absolutely want to build functional stateless business logic on lambda, but I absolutely will not, no matter the gain from not having to manage servers, have my database be dynamodb or any other non-RDBMS, for any serious application in 2017.
If it weren't true, then of course I might consider using DynamoDB or similar. But I think these situations are few and far between.
I'm often wrong though and happy to learn about some counter examples if you have any / have my assumptions corrected.
The "interesting" part is how to secure user credentials to login to the RDS instance, and manage connection pools etc, but it's not that difficult
You can run your RDS instances and your Lambda's in the same private VPC. It doesn't secure your credentials per se, but it does prevent anyone else from accessing your database with Lambda.
> With serverless computing, your application still runs on servers,
...