(and our group)
1st Career
2nd Career
1st Tuesday of the month
(except January 2019: is 2nd Tuesday)
5:30pm - 8:30pm
Richmond Heights Community Center
"Dale" Room
Free and open to the public!
https://www.meetup.com/stl-serverless/events/254589340/
Tell about your company while we enjoy your refreshments
Serverless does not mean, "No servers"
Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers. You can build them for nearly any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.
https://aws.amazon.com/serverless/
Serverless computing is the abstraction of servers, infrastructure, and operating systems. When you build serverless apps you don’t need to provision and manage any servers, so you can take your mind off infrastructure concerns. Serverless computing is driven by the reaction to events and triggers happening in near-real-time—in the cloud. As a fully managed service, server management and capacity planning are invisible to the developer and billing is based just on resources consumed or the actual time your code is running.
https://azure.microsoft.com/en-us/overview/serverless-computing/
Serverless lets you write and deploy code without the hassle of managing the underlying infrastructure. It enhances developer productivity by helping focus on what matters the most — building great applications and abstracting away the rest. Zero server management, no upfront provisioning, auto-scaling to meet traffic demands, and paying only for the resources used are just some of the benefits of serverless computing.
https://cloud.google.com/serverless/
Serverless lets you* think about servers less.
*Someone else is still thinking about the servers
Value Line
Storage
Queues
Notifications
API Gateways
Functions
Monitoring & Logging
and much, much more... Fargate, Aurora Serverless, etc.
Over time, monolith applications become increasingly difficult to understand, maintain and enhance
We started breaking up monoliths into microservices along bounded context seams
We now have the ability to break up microservices into stand alone functions which can be deployed and scaled independently
Authentication
Lookup User
Gen Token
Verify Token
Refresh Token
A function that does just one thing is far easier to maintain, enhance, or rewrite entirely
Authentication
package example;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import ...
public class GenerateToken implements RequestHandler<User, String> {
String handleRequest(User authenticatedUser, Context context) {
return generateToken(authenticatedUser);
}
private String generateToken(User authenticatedUser) {
// create JWT with claims
}
}
[ { "item": 1} ]
Item(1)
[ { "item": 1},
...
{"item" : 3} ]
Item(1)
Item(2)
Item(3)
These topics and more will form the basis for future talks
https://blog.newrelic.com/engineering/lambda-functions-xray-traces-custom-serverless-metrics/
https://read.acloud.guru/does-coding-language-memory-or-package-size-affect-cold-starts-of-aws-lambda-a15e26d12c76
https://read.acloud.guru/how-long-does-aws-lambda-keep-your-idle-functions-around-before-a-cold-start-bf715d3b810
request
trigger
return
response
API Gateway
(29 sec limit)
Lambda
(5 min limit)
event
trigger
Lambda
Add 1080p video to
S3 bucket
Transcode
to 720p
Save to 720p bucket
event
SNS
trigger
https://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html
exports.handler = (event, context, callback) => {
console.log(event);
const parms = event.queryStringParameters;
const min = parms ? parseInt(parms.min) : 1; // parms come in as strings
const max = parms ? parseInt(parms.max) : 100;
const randomVal = Math.floor(Math.random() * (max - min + 1) + min);
console.log("random number", randomVal);
console.log("min", min);
console.log("max", max);
const result = {
min: min,
max: max,
randomVal: randomVal
}
const response = {
statusCode: 200,
body: JSON.stringify(result)
};
callback(null, response);
};