Serverless is the newest trend in cloud computing and reflects a change in how applications are hosted. Modularization of solutions has led to the notion of Microservices, and the ‘serverless’ idea allows for hosting such services on top of infrastructure abstractions that eliminate many of the concerns of the common hosting model where applications are explicitly concerned about their hosts and lifetimes. Event-Driven Architecture concepts are ideal to interconnect these ‘serverless’ services and this session will shed light on these trends and usage scenarios.
3. • “Serverless” is PaaS
• The promise of “Platform as a Service”
is to liberate you from managing low-
level infrastructure and focus on apps
and data
• Virtualization is IaaS
• Containers and container orchestrators
are a very flexible way to share,
configure, and reuse portions of
virtualized infrastructure.
• Container platforms may form a
complete virtualization layer, including
software-defined networking.
“Serverless” = Platform as a Service (PaaS)
“Serverless” means
you supply the app
Containers may be
how “you manage”
4. • Managed Cluster
• You supply applications that are deployed on a cluster that allows for
placement, replication, ownership consensus and management of
stateful resources
• Managed Middleware
• You supply applications that are deployed on sets of independent,
“stateless” middleware servers, like web servers or pure compute hosts
• Applications may be always-on or start on demand; typically maintain
shared cached state and resources
• Managed Functions
• You supply (small groups of) function implementations that are run for
you when triggered by a configured condition.
Some PaaS Compute Options
6. • … is responsible for holding, processing,
and/or distributing particular kinds of
information within the scope of a system
• … can be built, deployed, and run
independently, meeting defined
operational objectives
• … communicates with consumers and other
services, presenting information using
conventions and/or contract assurances
• … protects itself against unwanted access,
and its information against loss
• … handles failure conditions such that
failures cannot lead to information
corruption
A “Service” is software that …
7. • Defining property of services is that they’re Autonomous
• A service owns all of the state it immediately depends on and manages
• A service owns its communication contract
• A service can be changed, redeployed, and/or completely replaced
• A service has a well-known set of communication paths
• Services shall have no shared state with others
• Don't depend on or assume any common data store
• Don't depend on any shared in-memory state
• No sideline communications between services
• No opaque side-effects
• All communication is explicit
• Autonomy is about agility and cross-org collaboration
Services: Autonomous Entities
8. The modern notion of
“Service” is not about code
artifact counts or sizes or
technology choices.
It’s about ownership.
9. • A system is a federation of
services and systems, aiming to
provide a composite solution for
a well-defined scope.
• The solution scope may be
motivated by business,
technology, policy, law, culture,
or other criteria
• A system may appear and act as
a service towards other parties.
• Systems may share services
• Consumers may interact with
multiple systems
System
11. • Scales by cloning the app on multiple
servers/VMs/Containers
• A microservice application
separates functionality into
separate smaller services.
• Scales out by deploying each service
independently creating instances of these services
across servers/VMs/containers
• A monolith app contains domain
specific functionality and is
normally divided by functional
layers such as web, business and
data
App 1 App 2
App 1
Runtime and Deployment Models
Monolith Microservices
12. • Single monolithic database
• Tiers of specific technologies
Monolithic approach Microservices approach
• Graph of interconnected microservices
• State typically scoped to the microservice
• Variety of technologies used
stateless
services
stateless services with
separate stores
stateful
services
stateless
presentation
services
State Management
13. Thumbnail
Service
Thumbnail
ServicePhoto Share
Service
Photo Share
Service
Photo Share
Service
Photo Share
Service
Thumbnail
Service
Photo Share Service
Thumbnail
SharedLib-v7
Photo Share
Service
SharedLib-v1
Photo Share
Service
node.js
Thumbnail
Service
.NET
Photo Share
Service
V1
Thumbnail
Service
V1
Thumbnail
Service
SharedLib-v7
Scale Independently Different Technology Stacks
Conflicting Dependencies
Independent Deployments
Thumbnail
Service
V2
SharedLib-v1
Microservice Architecture Benefits
18. Azure App Services
API Apps
Easily build and
consume APIs in
the cloud
Web apps
Web apps that scale
with your business
Mobile apps
Build mobile apps
for any device
Logic Apps
Automate business
process across SaaS
and on-premises
19. Web Apps Gallery
• One-click installation of Wordpress,
Joomla, Drupal
Auto scaling
• Manual
• Automatic, based on load or schedule
Continuous integration
• Integrate w/ VSTS, GetHub, TeamCIty,
Hudson, or BitBucket
Platform Features
Deployment slots
• Staged deployment slots
• Maximum depends on pricing tier
WebJobs
• Run program or script on Web App VMs
• Continuously or schedules
• Scale to handle load
Connectivity
• Hybrid connectivity
• VNet
22. • A service can be made up of a
fleet of independently deployed
functions that jointly operate on
a shared set of resources
• The service interface is made up
from the union of the function
interfaces
• The function interfaces may be a
mix of RPC-style call interfaces
and event driven ones
Microservices and Functions?
Function
API and
Implementation
25. • “REST“ is great for interactively
accumulating and acting on
state from multiple sources.
• Let‘s not pretend all clients are
like that – there‘s a lot more
• HTTP and RPC are great to
obtain immediate answers.
• The longer it takes to generate
the answer, the more brittle the
model becomes
Service Communication
34. • Report independent, actionable
state changes to authorized
subscribers
• “Blob created”
• “Sales lead created”
• “Order confirmed”
• Allows simple, noninvasive,
reactive extension of the
functionality of a service
Discrete Events are an Extensibility Enabler
37. Event Grid
Sub-second end-to-end latency in the 99th percentile
10,000,000 events per second per region
24-hour retry with exponential back off for events not delivered
Push Push
* Coming soon
39. • “Core” functions of services
allow for direct interaction:
• Commands, Requests, etc.
• Extensions react to events
emitted by services based
on core activities.
• Might turn to the emitting
service to ask for details or
perform actions.
Event-Driven: Cores + Extensions
Direct Interaction
Extension by subscription
Messaging
Eventing
40. • Services: Autonomous software entities grouped around
resource ownership and team ownership scopes
• Platform-as-a-Service: Hosting options for services with tailored
degrees of control for certain scenarios.
• Managed clusters: Complex, stateful, high reliability, always-on.
• Managed servers: Stateless/shared-nothing, on-demand start.
• Managed functions: Event-driven, short-lived
• Messaging and Eventing: Communication backplane for
services, eventing as extensibility enabler.
Summary
41. Event Hubs
Telemetry
stream
ingestion
Service Bus &
Azure Queues
Cloud
messaging
Event Grid
Event
distribution
Logic Apps
Workflow
and LOB
Integration
IoT Hub
IoT
messaging
and manage-
ment
Notification
Hubs
Mobile push
notifications
Relay
Discovery,
Firewall/NAT
Traversal
Stream
Analytics
Data
Lake
Storm
Spark
Azure
Functions
Storage
Blobs
Microsoft Azure
How to decide
Does app require third party components?
Do security requirements mandate the use of third party monitoring software?
Does app require specific framework configurations?
The more customization that is required, the more one moves towards IaaS and away from PaaS.
Familiar and fast
Leverage existing skills in languages, frameworks, etc.
Easily add versioning, SSO, monitoring, etc.
Gallery contains common building blocks/templates
Enterprise grade
Securely connect to on-premises resources with AD integration
Compliance – ISO, SOC2, PCI
Enterprise-level SLAs
Global scale
Auto scaling within and across different geographical regions
Bindings abstract away where the data is coming to
Logic Apps
Programming free paradigm with a visual designer, drag and drop workflows
With Connectors to different types of services (eg an FTP server)
Talking Points: (Updated on 4/3/17)
Lets talk about what really makes up MSFT’s Serverless platform: At the center of the Serverless platform, is our compute offerings: Azure Functions and Azure Logic Apps. Azure Functions is an event based Serverless compute experience that helps you accelerate your development. Run time is open. Function code can be executed in vm or somewhere else, on prem or in clould. Logic Apps is a powerful orchestration tool. It enables building a Serverless app in minutes – by orchestrating multiple functions using a visual workflow tool.
Say you have your apps up and running using Serverless. Congratulations! You now need to collect intelligence from different apps across platforms to take actions upon. There are a few essential components which we think are core to building Serverless applications are:
Data/ Storage –Functions has triggers and bindings with Azure document DB and Azure Blob storage
** Triggers: Triggers are event responses used to trigger your custom code. They allow you to respond to events across the Azure platform or on premise.
** Bindings: Bindings represent the necessary meta data used to connect your code to the desired trigger or associated input or output data.
Messaging such as queues and topics using Azure Service Bus and Azure Event Hubs
Integration – that includes core LOB apps and SaaS apps integration via Azure Logic Apps.
Intelligence on data and sentiment/ predictive analysis using Cognitive services and Machine learning
Conversation as a service – how do we equip developers to build apps that offer an end-to-end experience for their end users – Azure Bot Service offers a Serverless interactive bot experience.
More, developers are spending more time writing code that allows them to add huge business impact with Serverless. MSFT offers numerous development tools such as IDE Support for Visual Studio in functions and Logic Apps, enables local development (vs web browser coding environment), visual debugging capability, all with your tools of choice.
Lastly, I also want to highlight top scenarios and use cases for Serverless:
Real-time Stream analytics: Customers can use Functions to feed real-time streams of data from application tracking into structured data and store it in SQL online.
SaaS event processing: Customers can use Functions and Logic Apps to analyze data from an excel file in Onedrive and perform validation, filtration, sorting and convert data into consumable business charts
Web app architecture: Used a lot in creating targeted marketing collaterals – when a customer clicks on a webpage, it triggers a webhook, that uses a function to create an ad that matches the customer profile and displays a completed webpage.
Real-time bot messaging: When customers send a message to a chatbox, Functions calls Cortana analytics to generate appropriate answers and sends a response back.
//from before: Customers have different paths to build a Serverless app – start by building the distributed application components using functions by leveraging the numerous templates and declarative bindings Or
Start with the workflow and orchestration of Serverless application using Azure Logic Apps. The visual designer enables developers to quickly and easily author, edit and visualize orchestration of multiple functions and workflow.
Lets talk about what really makes up MSFT’s Serverless platform: At the center of the Serverless platform, is our compute offerings: Azure Functions and Azure Logic Apps. Azure Functions is an event based Serverless compute experience that helps you accelerate your development. Logic Apps is a powerful workflow and orchestration tool. It enables building a Serverless app in minutes – by orchestrating multiple functions using a visual workflow tool.
Say you have your apps up and running using Serverless. Congratulations! You now need to collect intelligence from different apps across platforms to take actions upon. There are a few essential components which we think are core to building Serverless applications are:
Data/ Storage –Functions has triggers and bindings with Azure document DB and Azure Blob storage
** Triggers: Triggers are event responses used to trigger your custom code. They allow you to respond to events across the Azure platform or on premise.
** Bindings: Bindings represent the necessary meta data used to connect your code to the desired trigger or associated input or output data.
Messaging such as queues and topics using Azure Service Bus and Azure Event Hubs
Integration – that includes core LOB apps and SaaS apps integration via Azure Logic Apps.
Intelligence on data and sentiment/ predictive analysis using Cognitive services and Machine learning
Conversation as a service – how do we equip developers to build apps that offer an end-to-end experience for their end users – Azure Bot Service offers a Serverless interactive bot experience.
More, developers are spending more time writing code that allows them to add huge business impact with Serverless. MSFT offers numerous development tools such as IDE Support for Visual Studio in functions and Logic Apps, enables local development (vs web browser coding environment), visual debugging capability, all with your tools of choice.
Lastly, I also want to highlight top scenarios and use cases for Serverless:
Real-time Stream analytics: Customers can use Functions to feed real-time streams of data from application tracking into structured data and store it in SQL online.
SaaS event processing: Customers can use Functions and Logic Apps to analyze data from an excel file in Onedrive and perform validation, filtration, sorting and convert data into consumable business charts
Web app architecture: Used a lot in creating targeted marketing collaterals – when a customer clicks on a webpage, it triggers a webhook, that uses a function to create an ad that matches the customer profile and displays a completed webpage.
Real-time bot messaging: When customers send a message to a chatbox, Functions calls Cortana analytics to generate appropriate answers and sends a response back.
//from before: Customers have different paths to build a Serverless app – start by building the distributed application components using functions by leveraging the numerous templates and declarative bindings Or
Start with the workflow and orchestration of Serverless application using Azure Logic Apps. The visual designer enables developers to quickly and easily author, edit and visualize orchestration of multiple functions and workflow.