3.6 Introduction to Serverless Computing

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
18 hours 58 minutes
Difficulty
Intermediate
CEU/CPE
9
Video Transcription
00:00
>> Welcome back. In this episode,
00:00
we're going to take a look at
00:00
some Azure offerings in relation to
00:00
>> serverless computing.
00:00
>> My objectives include for you to
00:00
first understand serverless computing
00:00
and then look at some of
00:00
the Azure offerings related around this concept.
00:00
This includes Logic Apps,
00:00
Azure Functions, Service Bus, and Event Grid.
00:00
As always, we're going to start off with the question,
00:00
what is serverless computing?
00:00
If you've never heard of it before,
00:00
the name itself can be a little confusing.
00:00
How can you have computing power without servers?
00:00
Well, there's still servers involved,
00:00
but you don't have to worry about them.
00:00
Instead of building servers and installing
00:00
the operating systems and
00:00
configuring software dependencies,
00:00
you don't have to worry about that.
00:00
Serverless computing is
00:00
>> where you as the IT professional,
00:00
>> don't have to worry about managing servers.
00:00
Here, you only have to worry
00:00
about developing the code while
00:00
Azure will provision the necessary infrastructure
00:00
and manage it for us.
00:00
Basically, the underlying components such as servers
00:00
>> and operating systems are abstracted to where
00:00
>> we really don't care what's running beneath the app.
00:00
What's great is if your application
00:00
requires more resources,
00:00
the serverless compute can instantly
00:00
scale and adapt to changing workload request.
00:00
This means you don't have to panic and provision
00:00
more resources yourself when it can
00:00
be done automatically and instantly.
00:00
Another great feature is you only
00:00
pay for when your code is running.
00:00
This greatly differs from the model of
00:00
an application running on virtual machine.
00:00
Even if you have a small
00:00
virtual machine hardware profile,
00:00
you're still paying for that compute power,
00:00
even if your code isn't running.
00:00
Not the case with serverless.
00:00
You only pay for the resources
00:00
whenever your code is executed.
00:00
Now that's the basics of serverless computing.
00:00
If we look at our exam objectives for the AZ-300,
00:00
there are just a few of
00:00
the Azure serverless offerings that it focuses on.
00:00
In the rest of this episode,
00:00
we'll take a look at each of these four offerings.
00:00
First, let's discuss Logic Apps.
00:00
Logic Apps allow you to build
00:00
workflows and business processes
00:00
that require connecting to
00:00
multiple data sources and applications.
00:00
The Logic App workflow looks
00:00
a lot like a flowchart where we can visualize
00:00
it and we can have multiple branches of
00:00
logic based on decision points during execution.
00:00
You might see other solutions like
00:00
this identified or described as,
00:00
if this, then that.
00:00
Meaning if this happens,
00:00
then we're going to take this action.
00:00
Logic Apps use connectors which can connect to Azure,
00:00
Office 365 services, and other
00:00
third-party services like SAP and Salesforce.
00:00
These connectors can be used to start
00:00
a Logic App or process an action during the workflow.
00:00
Logic Apps are based on triggers,
00:00
which is when a specific event happens
00:00
or when new data is available inside a service.
00:00
You can also schedule the start of a logic app if
00:00
you only needed to periodically run the workflow.
00:00
Actions occur after the trigger
00:00
and our steps in the workflow.
00:00
Actions usually correspond to an operation that
00:00
performs some functionality against
00:00
the connector or other service,
00:00
like send in an email or posting a tweet on Twitter.
00:00
Logic Apps are great because you don't have to build
00:00
the code behind connecting to different data sources.
00:00
These connectors are managed by
00:00
Microsoft and other vendors.
00:00
It also follows the concept we
00:00
learned about in serverless computing,
00:00
and that it follows a consumption-based model
00:00
where you only pay for what you use.
00:00
Here I have a screenshot of the Logic Apps Designer,
00:00
and we'll see more on this and demos in later episodes.
00:00
You can see where we have a trigger
00:00
of when a new tweet appears,
00:00
then we have some additional actions like getting
00:00
the user information of the person who made
00:00
the tweet and then send an email to Outlook.
00:00
Our next serverless offering is Azure Functions.
00:00
These allow for running small bits of code.
00:00
If you look at functions
00:00
from typical programming practices,
00:00
functions are parts of a program that performs
00:00
specific task within a larger application base.
00:00
Azure Functions allow for writing
00:00
the code that you need to accomplish
00:00
a task without worrying about
00:00
writing out an entire app to use it,
00:00
or to configure the infrastructure to host it on.
00:00
In line with serverless compute concepts,
00:00
you don't have to worry about dynamically allocating
00:00
resources if your function sees more usage,
00:00
and you can use a consumption payment model
00:00
where you only pay for executions of the app.
00:00
Azure Functions supports
00:00
several different programming languages,
00:00
like C#, Java,
00:00
JavaScript, PowerShell, and Python.
00:00
You also have your choice of running
00:00
the function app on Windows or Linux systems.
00:00
The idea behind function apps is creating small bits of
00:00
code that you can dynamically execute when needed.
00:00
For example, we looked at
00:00
Logic Apps on the previous slides.
00:00
If there are no actions that meet
00:00
your needs when creating the Logic App,
00:00
you can then call an Azure function
00:00
to complete the task for you.
00:00
This starts the introduction and
00:00
the idea that we can chain together
00:00
different serverless offerings inside of
00:00
Azure to build more complex workflows.
00:00
Here we have an example of a function inside of Azure,
00:00
and this first trigger that we have
00:00
here is an HTTP trigger,
00:00
which is just when we access the function URL,
00:00
we're going to display a message to the screen,
00:00
and we will see more details about
00:00
this in our demo episode.
00:00
Next is Azure Service Bus.
00:00
Azure Service Bus is a messaging platform used to
00:00
ensure asynchronous data transfer
00:00
between applications and services.
00:00
This data is transferred using what is called a message,
00:00
which can be in JSON,
00:00
XML, or text format.
00:00
Now the idea of this service bus
00:00
seems a little abstract,
00:00
so let's think of some examples.
00:00
You could use Azure Service Bus for transferring
00:00
business transaction data from one service to another,
00:00
like sales or purchase orders or
00:00
updating inventory management systems.
00:00
This works by putting those messages into queues,
00:00
where they can wait until
00:00
the receiving application can
00:00
receive the message and process it.
00:00
In addition to processing these messages,
00:00
you could also set up topics to
00:00
send and receive multiple messages.
00:00
Topics are used in a scenario where
00:00
multiple applications or receivers
00:00
can subscribe to a single topic.
00:00
This provides a one-to-many communication possibility.
00:00
A message is sent to a single topic,
00:00
then each subscriber can take
00:00
that message and perform their own action on it.
00:00
The topic concept is
00:00
slightly different from the Service Bus queue,
00:00
and that messages in a queue are only
00:00
processed by one consumer or application.
00:00
Whereas you can have multiple subscribers
00:00
to a single message in a topic.
00:00
Service Bus has a few advanced features
00:00
and I want to touch base on a few of those right now.
00:00
The first is scheduled delivery,
00:00
which allows for submitting your messages
00:00
into a queue for delayed processing.
00:00
You might have a bunch of
00:00
messages in a queue that you want to
00:00
schedule a job to process
00:00
those messages at a certain time.
00:00
The next is batching, where the queue delays
00:00
sending a message for a certain period of time.
00:00
Any messages received during
00:00
that time period are held in the queue,
00:00
and then they are transmitted in
00:00
>> batches to the receiver.
00:00
>> Finally, there's dead-lettering,
00:00
which means the queue will hold onto messages
00:00
that cannot be delivered or processed at that moment.
00:00
The dead letter queue is separate from the main queue,
00:00
which allows for removing and inspecting
00:00
these messages that could not be
00:00
processed and then resubmitting them.
00:00
You can also set a time to live and
00:00
>> remove the message if
00:00
>> it cannot be processed in a timely manner.
00:00
>> Over here on the right, we have a screenshot of
00:00
creating a queue where you can
00:00
see some of these messages,
00:00
such as the time to live,
00:00
a locked duration,
00:00
or enabling dead-lettering on message expiration.
00:00
Next, we have Event Grid,
00:00
which allows building applications that are
00:00
based on event-driven architectures.
00:00
You can subscribe to
00:00
Azure resources and then trigger an event handler,
00:00
such as an Azure Function,
00:00
Logic App, webhook, endpoint, or Azure Automation.
00:00
You can see we're taking some of
00:00
the previous serverless concepts
00:00
and we're tying them into the Event Grid here.
00:00
Some scenarios for Event Grid include when
00:00
an image is uploaded to a blob storage container,
00:00
you can trigger an Azure Function
00:00
and then analyze the image.
00:00
Or when a virtual machine is provisioned,
00:00
Event Grid can detect this new resource and use
00:00
Azure Automation to make sure
00:00
the virtual machine is configured correctly.
00:00
Here I have just a little diagram
00:00
showing the idea behind Event Grid.
00:00
On the left, we have different events sources
00:00
like blob storage,
00:00
resource groups or subscriptions,
00:00
those are ingested by the Event Grid,
00:00
and then they are sent on to event handlers
00:00
where you might trigger an Azure Function,
00:00
a Logic App, or a storage queue, or Azure Automation.
00:00
You can start to see on
00:00
the left-hand side we have a lot of
00:00
these resources we've been
00:00
working with so far in this course,
00:00
and on the right, we have some of
00:00
these serverless concepts we've just
00:00
learned about it in this episode
00:00
>> to act on those sources.
00:00
>> That does it for
00:00
our introduction to serverless computing.
00:00
Next, we're going to jump into
00:00
the Azure portal and take a look at
00:00
how to configure a Logic App in our Logic App demo.
00:00
See you in the next episode.
Up Next