#ServerlessApplications
E V E N T M A N A G E M E N T
@JONATHANFMILLS
To the cloud
To The Cloud!
Dilbert
GraphQL Event Manager Functions
GraphQL Event Manager
Functions
GraphQL Event Manager
Functions
GraphQL Event Manager
Functions
What does it take to add a user?
POST: Add User
POST: Add User Add User Message
POST: Add User
Audit
Permissions
AD Integration
Add User Message
POST: Add User
Audit
Permissions
AD Integration
Add User Message
Event Manager
Service Bus
Event Hub
Event Grid
Event Grid Event Hub Service Bus
What do we use?
VS
Event Message
An event is a lightweight notification of a condition or a
state change.
The publisher of the event has no expectation about how
the event is handled.
The consumer of the event decides what to do with the
notification.
Discrete Series
Discrete events report state change and are actionable.
To take the next step, the consumer only needs to
know that something happened.
The event data has information about what happened
but doesn't have the data that triggered the event.
Discrete Series
Series events report a condition and are analyzable.
The events are time-ordered and interrelated.
The consumer needs the sequenced series of
events to analyze what happened.
VS
Event Message
A message is raw data produced by a service to be
consumed or stored elsewhere. The message contains
the data that triggered the message pipeline.
The publisher of the message has an expectation about
how the consumer handles the message. A contract
exists between the two sides.
I need a response…
Event Grid Event Hub Service Bus
What do we use?
Event Grid use a publish-subscribe model to 

handle events.
Publishers emit events, but have no expectation about
which events are handled.
Subscribers decide which events they want to handle.
Event Grid routes events from both Azure and non-Azure resources.
Event Grid isn't a data pipeline, and doesn't deliver the
actual object that was updated!!!
VS
Event Message
Event Grid supports dead-lettering for events that aren't
delivered to an endpoint.
Dead Lettering?
Dead Lettering?
Message that is sent to a queue that does not exist
Message length limit exceeded.
Message length limit exceeded.
Message is rejected by another queue exchange.
Message reaches a threshold read counter number
Queue length limit exceeded.
dynamically scalable

	 serverless

	 low cost

	 at least once delivery
Event Grid Event Hub Service Bus
What do we use?
Azure Event Hubs facilitates the capture, retention, and
replay of telemetry and event stream data. The data can
come from many concurrent sources.
Azure Event Hubs facilitates the capture, retention, and
replay of telemetry and event stream data. The data can
come from many concurrent sources.
Event Hubs allows telemetry and event data to be made
available to a variety of stream-processing infrastructures
and analytics services.
It is available either as data streams or bundled event
batches.
A single solution that enables rapid data retrieval for real-
time processing as well as repeated replay of stored raw
data.
A single solution that enables rapid data retrieval for real-
time processing as well as repeated replay of stored raw
data.
It can capture the streaming data into a file for
processing and analysis.
low latency
at least once delivery
millions of events per second
Event Grid Event Hub Service Bus
What do we use?
Service Bus is intended for traditional 

enterprise applications.
These enterprise applications require transactions,
ordering, duplicate detection, and instantaneous
consistency.
Service Bus can connect existing on-premises systems
to cloud solutions.
Works as Queue OR Subscription
How those play with real examples
GraphQL Event Manager
Functions
Functions
On Demand
No InfrastructureOn Demand
Code in response to eventsNo InfrastructureOn Demand
On Demand Code in response to eventsNo InfrastructureOn Demand
What Events?
a
HTTP Event CosmosDB
Blob StorageStorage Queue
Event Grid Event Hub Service Bus
Function is a little misnomer. Think of it as an app.
Durable Functions are possible now
GraphQL Event Manager
Functions
GraphQL
GraphQL
GraphQL
GraphQL
GraphQL
{
"firstName": "Jon",
"lastName": "Mills",
"dob": "1/1/1999",
"title": "Consultant"
}
{
"_id": "5d73b3ae9aeb47e81242100a",
"index": 0,
"guid": "c3d8d460-bc6f-4956-9f89-d499f68b7128",
"name": “Jonathan Mills",
"gender": "male",
"company": "BUNGA",
"isActive": false,
"picture": "http://placehold.it/32x32",
"age": 38,
"eyeColor": "blue",
"email": “jonathandfmills@gmail.com“,
"phone": "+1 (876) 546-3397",
"address": "820 Hendrix Street, Bladensburg, Pennsylvania, 2902",
"about": "Voluptate reprehenderit ullamco in ad labore eiusmod officia ut. Sint proident excepteur occaecat aliquip dolor
tempor in. Do quis esse aute nostrud proident deserunt proident commodo minim nulla qui et.rn",
"registered": "2018-03-17T10:36:24 +05:00",
"latitude": -34.569843,
"longitude": -70.319078,
"tags": [
"Lorem",
"amet",
"in",
"officia",
"minim",
"nulla",
"veniam"
],
"friends": [
{
"id": 0,
"name": "Robles Buckley"
},
{
"email": “jonathandfmills@gmail.com“,
"phone": "+1 (876) 546-3397",
"address": "820 Hendrix Street, Bladensburg, Pennsylvania, 2902",
"about": "Voluptate reprehenderit ullamco in ad labore eiusmod officia ut. Sint proident excepteur occaecat aliquip dolor
tempor in. Do quis esse aute nostrud proident deserunt proident commodo minim nulla qui et.rn",
"registered": "2018-03-17T10:36:24 +05:00",
"latitude": -34.569843,
"longitude": -70.319078,
"tags": [
"Lorem",
"amet",
"in",
"officia",
"minim",
"nulla",
"veniam"
],
"friends": [
{
"id": 0,
"name": "Robles Buckley"
},
{
"id": 1,
"name": "Kirk Ashley"
},
{
"id": 2,
"name": "Tameka Kelley"
}
],
"greeting": "Hello, Mandy Watts! You have 1 unread messages.",
"favoriteFruit": "strawberry"
}
{
"firstName": "Jon",
"lastName": "Mills",
"dob": "1/1/1999",
"title": "Consultant"
}
GraphQL is a query language for your api
{
"_id": "5d73b3ae9aeb47e81242100a",
"index": 0,
"guid": "c3d8d460-bc6f-4956-9f89-d499f68b7128",
"name": “Jonathan Mills",
"gender": "male",
"company": "BUNGA",
"isActive": false,
"picture": "http://placehold.it/32x32",
"age": 38,
"eyeColor": "blue",
"email": “jonathandfmills@gmail.com“,
"phone": "+1 (876) 546-3397",
"address": "820 Hendrix Street, Bladensburg, Pennsylvania, 2902",
"about": "Voluptate reprehenderit ullamco in ad labore eiusmod officia ut. Sint proident excepteur occaecat aliquip dolor
tempor in. Do quis esse aute nostrud proident deserunt proident commodo minim nulla qui et.rn",
"registered": "2018-03-17T10:36:24 +05:00",
"latitude": -34.569843,
"longitude": -70.319078,
"tags": [
"Lorem",
"amet",
"in",
"officia",
"minim",
"nulla",
"veniam"
],
"friends": [
{
"id": 0,
"name": "Robles Buckley"
},
{
gql`
query PeopleQuery {
People {
firstName
lastName
dob
Title
}
}
`;
{
"firstName": "Jon",
"lastName": "Mills",
"dob": "1/1/1999",
"title": "Consultant"
}
{
"_id": "5d73b3ae9aeb47e81242100a",
"index": 0,
"guid": "c3d8d460-bc6f-4956-9f89-d499f68b7128",
"name": “Jonathan Mills",
"gender": "male",
"company": "BUNGA",
"isActive": false,
"picture": "http://placehold.it/32x32",
"age": 38,
"eyeColor": "blue",
"email": “jonathandfmills@gmail.com“,
"phone": "+1 (876) 546-3397",
"address": "820 Hendrix Street, Bladensburg, Pennsylvania, 2902",
"about": "Voluptate reprehenderit ullamco in ad labore eiusmod officia ut. Sint proident excepteur occaecat aliquip dolor
tempor in. Do quis esse aute nostrud proident deserunt proident commodo minim nulla qui et.rn",
"registered": "2018-03-17T10:36:24 +05:00",
"latitude": -34.569843,
"longitude": -70.319078,
"tags": [
"Lorem",
"amet",
"in",
"officia",
"minim",
"nulla",
"veniam"
],
"friends": [
{
"id": 0,
"name": "Robles Buckley"
},
{
{
"firstName": "Jon",
"lastName": "Mills",
"dob": "1/1/1999",
"title": "Consultant"
}
gql`
query PeopleQuery {
People {
firstName
lastName
dob
Title
}
}
`;
gql`
query PeopleQuery {
People {
firstName
lastName
dob
title
age
}
}
`;
{
"firstName": "Jon",
"lastName": "Mills",
"dob": "1/1/1999",
"title": "Consultant",
"age": "38"
}
GraphQL Subscriptions allow real time updates
GraphQL Event Manager
Functions
gql`
subscription personAdded($personId: ID!) {
personAdded(personId: $personId) {
completionMessage
}
}
GraphQL Event Manager
Functions

Async