4 ms·
I struggle with trying to understand how serverless is radically different in concepts than old-school cgi-bin. In both scenarios, you don't necessarily own th
by oogali 8y ago
I struggle with trying to understand how serverless is radically different in concepts than old-school cgi-bin.
In both scenarios, you don't necessarily own the servers.
Best practice dictates that your static content lives in a separate area rather than within your application (a different directory or alias, or in the serverless context: an S3 bucket)
You don't worry about patching upstream OSes or applications.
You front your application and static content with an "API gateway" (or in the cgi-bin case: Apache httpd w/mod_rewrite).
Your application's implementation is governed by whatever interpreters are available to you (#!/usr/bin/perl vs. #!/usr/bin/python vs. Node from a drop-down)
Any environment specifics are injected into your application's operating context (environment variables in the case of cgi-bin, or an argument to your entry function in the case of AWS Lambda).
The one radical difference I do recognize is the independent-ish execution environment: e.g. my CPAN modules, don't intermix with your CPAN modules.
It seems like the same paradigm, but with a new coat of paint.