From the course: Learning Cloud Computing: Serverless Computing

Plan your applications

From the course: Learning Cloud Computing: Serverless Computing

Start my 1-month free trial

Plan your applications

- [Instructor] So how do you plan a serverless application? So, when building serverless applications on Amazon web services, or Microsoft functions, for that matter. You have to deal with the core components that are offered to you by that serverless system. In the case of AWS lambda, this includes an application design, and then the ability to create a lambda function, which is typically container and code. Some sort of source or an event that's going to kick off the function, and what the outputs going to be. So whether it's just a simple application that is executed and produces an answer, or it's a very complex application, with many different containers and code pockets that are brought together to create the system, you're basically going through these same four steps. To finding the design, the function, the event and the output from the task. So, for instance a user can create an object in some sort of a storage system, let's say it's an S3 bucket. And that by itself creates an event. In other words, the presence of that object in that bucket becomes something that the function is looking for. And that kicks off or executes the serverless function. So, S3 is able to execute the lambda function and the lambda function is able to invoke itself and invent source mapping that exists in the bucket notification configuration occurs. And then we move on to the next step. And the lambda system executes the function and this is done by the event, hitting the function and executing it. So on planning an application like we just saw, there's a few things that need to be included. Number one, we need to figure out what functions we're going to write and produce out of the serverless system we're able to leverage. In this case, AWS lambda, what functions will make up the application, how they're configured, and how they're going to be executed. We also need to figure out how we're going to code it. In the case of serverless systems, there's a couple of layers there, we need to pick the programming language. And then we need to determine how it's going to be coded in that programming language. Need to figure out which event sources are going to kick off the function. In the case that we saw before, is it going to be the presence of an object in an S3 bucket or some other storage system? Is it going to be a message dispatched to the function? Is it going to be an email? Is it going to be data coming in from an IoT device? Anything can kick these off. And then we need to figure out how everything is linked together and how they interact one to another. Keep in mind when we're building functions, we're typically not putting all of the features and capabilities into one container. We're building many different containers and these containers can send messages to each other, or events to each other, and invoke each other. And by doing so, interact together to an essence form the system. We can have an outside step function, for example, interact with the functions and invoke them in certain sequences, or we can have an event driven application, which is able to kick off a series of events in between the different functions that we created in our serverless system. Also, we need to determine what the output is going to be or the actions in other words, what problem is going to be solved with the serverless function. Then define how we're going to continuously improve this, how this thing is going to fit into a DevOps processes, how we're going to continuously integrate it, continuously test it. So keep in mind that what we're doing here, is just building an application. That's the essence of it, but we're doing so The serverless framework.

Contents