 Hi there, welcome to another edition of Tuesdays with Corey. I'm here with Jeff Holland, illustrious Jeff Holland, and he's gonna show us a fantastic demo end-to-end of the serverless platform in Azure, but not just any part of the serverless platform. He's gonna show all, I mean, all kinds of amazing stuff. The whole thing, the whole thing. Buckle up. Buckle up and strap in, because this is gonna be a wild ride. And I don't mean Mr. Toad style. That's a fact. I don't know what I mean. Yeah. Do it again. So please, first tell everyone who you are. Sure, yes. For those two people who don't know. That's a fact, two of the three watchers. And hi mom, by the way, thank you so much. One extra viewer for me. So I am Jeff Holland. I am a program manager here in Azure, and I not only... You've been on the show before. No, I haven't. No, really? No, I have not. This is my debut. Very exciting day. Dressed up in my nice blue shirt. The Azure blues. The Azure blues. And I focus on, like Corey said, serverless. So Azure Functions, Azure Logic Apps, Azure Event Grid. Not only get to outbuild it, but I enjoy using it myself. We didn't do a Logic Apps, I'm pretty sure we did. Kevin Lam. Don't look that episode up. It needs no more views. Okay, well, please proceed. And now you're done to two viewers. All right, so I will start this with a little bit of a story, because this is how serverless, yeah, I'll paint a picture, Bob Rossett. So for the holidays, I was gifted a video IoT doorbell that you just stuck at my house, and when you ring the doorbell, it's got a camera on it. It takes a recording of the entire, whatever interaction of the doorstep, and then it sends a ping, in my case, to my phone, to say, hey, someone's at your door. So that's cool. It's a nifty device, relatively inexpensive. But what I wanted to do is take it to the next level, crank it up to 11. It's before your time. Yeah, it was. It's before my time. So I hooked it up to Azure Serverless. And I'm gonna show you that now, and it's pretty cool, the capabilities that are there. I'm gonna show you how these pieces fit together. And this whole thing that we're gonna demo is all posted on GitHub. There's docs and blogs that show you how to build something just like this. So the first part of it is- Without further ado. Yeah. Someone rings my doorbell, okay? I need to know that someone rang my doorbell. So I'm here in Visual Studio Code, which is a phenomenal place to write Azure Functions. And what, look at this, you're right. In fact, I'm in JavaScript. One thing to call out, we do have a brand new Azure Functions extension right inside Visual Studio, so I can create apps here, I can publish apps, I can manage my apps, it's very nice. So I wrote a really simple Azure Functions. You can see here, not very long, where all I'm really doing is check to see if someone has rang my doorbell every, I've got a timer. So in my case, I look every 15 seconds. And if somebody rings my doorbell, I'm going to send that event to Event Grid. So what this enables me to do, instead of my function having to do any action, I'm going to leverage Event Grid, which we have talked about before. I think marketing, there is a space right there. What Event Grid allows me to do is publish these events, and then instantly have them routed to any consumers who may be interested in an event. It happens instantly, push-based, it's all serverless, super convenient. Just a few click on the buttons, and we've seen that actually on the, that we have invited Dan on this. Dan, yes, then that's a phenomenal one. Check that one out. Dan talks about Event Grid. I'm playing favorites a little bit here now. You're playing clearly. Gaining enemies. Yes. But you can see here, in my Azure Event Grid and my subscription, I've been able to automatically add in two, well, not automatically, I did this. It'd be amazing if it's automatically done. You read your mind. Machine learning to the next level. But I- That's Skynet style. Scary. I was able to register two end points right now. In this case, when someone rings my doorbell, I want to notify a function. And the logic app. And I'm going to notify a logic app. And the case, the case that shows you functions is lower case, logic apps is camel case. You take from that whatever you will. Sort of camel case. It's not camel case, it's just upper case. Yeah, that's a, I don't know. You like it. What's a Freudian slip when you're typing and you miss the shift key? I don't know. Let me know. So he said Freud before he's gone. But what's great about Event Grid is not only does it notify these instantly, but let's say tonight I say, you know what? Now I want this IoT doorbell to know about this or I want another thing to know. Without me having to go and change any of this function code, I just add a new listener and that thing is going to get notified on those events too. Just plug and play. There we go. So the next piece I'm going to show. Before your time. Yeah. So one of the listeners I showed you was an Azure logic app. And you have seen logic apps before as Corey rubbed in. And. That was that one for fantastic. Yeah. As compared to this one. I'm using here the Event Grid Trigger. So I was able to just come in here and say, hey, listen to any events coming from my ring doorbell in this case. And what logic apps let me do in the serverless space is now create an orchestration. So now I can do a process on top of that doorbell. So here I'm waiting for the recording to finish. It will like record as long as there's someone there. So I have this loop here where this is going to loop around and wait 15 seconds and then check again. With an Azure function. Right. Oh, go ahead. You got a question? No, please. Go on. Once the recording's ready. This is where the magic happens. A little bit jumpy, by the way. A little bit jumpy. This is where the magic happens. If you've stuck with us this long, here's the payoff. There is a connector out of the box with logic apps because logic apps has over 200 connectors. So I don't have to write this code. It's managed for me from the platform. This is to the video indexer service which is one of the Azure Cognitive Services. This is like a mashup service where it's actually going to take any video feed, grab all the people out of it, the sentiment, the transcript, everything. Emotions. They're trying to do some facial recognition. All of it. Yeah. I'm gonna do that with my doorbell. So now I have a record of who's come to my doorbell, what was spoken on my doorbell. I could add in more logic to like text me and be like, hey, you were out of town and Corey's been knocking on your door for 45 minutes and he won't leave. And that's good to know. I was looking for a place to stay. And now I can know through serverless. So I upload that video to Cognitive Services. Again, I didn't write this code. I just kind of said pass in the recording URL. I gave it a name. Yep. And now I have another loop where I'm waiting until that's processed. I'm gonna get the details of the video. And my last step, the grand finale, is sticking all that data into Cosmos DB. And you can then go do any sort of additional analytics you want to with that. That's right. So if I actually come in here and open up the video index or portal, this is where it gets a little bit creepy. But you can see this is like real. This is the video Cognitive Videos. This is the Cognitive Video Service that all my doorbell videos are getting uploaded to. So if I was to grab one of these and open it, you'd be able to see all the analytics. Like this is the one this morning, probably when I was leaving for work. So you can see I said the word to love because I'm such a good husband. So I was talking, see there I am saying hi even. But all this got processed. Did you know this was gonna happen? It's almost like I knew I was gonna be on Tuesdays with Corey today. So this is the video that automatically got uploaded. Five views even. 112, this was on 112. That's right. Oh, I don't know when this is published. The magic of Hollywood. Oh. But that's it. So that is end to end. Fantastic. What's awesome here too, the grand, I've said grand finale like 18 times. What's great though is if I come in here and look at my bill, so far this whole month, I've paid maybe eight cents for this entire solution. I don't have a bunch of visitors, as you can see from the event grid graph. Oh, word. It spins up. So you're saying more than normally popular people would pay a lot more. Maybe. But like, I don't need a server running 24 seven to process the events when the mail carrier comes and rings my doorbell. So serverless is a great fit for this. And if for some reason it did, I got a ton of visitors for whatever reason. You pay just for it. Maybe as a result of this. People are coming back. They want to see what you got. Then it would scale up. Then it would scale up. And I only pay for what I use. I have so many visitors that I can only run it with VMs. Just. It's just, you guys, and many, lots, lots of VMs. I'm always talking hundreds of VMs in my door. Yes. Just waiting. You know, if you're going VMs, at least go as your VMs. That's all I gotta say. All right. I'm joking, of course. Yes. I don't have any visitors, except you. This is getting a little too real. This is getting a little too real. Jeff, thank you so much. This is awesome. We have going for another show. Yes. Next week, I think we're gonna have you come back on talking about durable functions. That's a fact. So stay tuned, Mark. Stay tuned for the calendars. Enjoy that. And with that, thank you so much for joining us. If you have questions for us, we'll put his hash, his hash name, whatever. Yeah. I have a hash name on Twitter. I'm so tired. I will put, we'll put him on the, on the tweet out. He hit us up with questions with a hashtag Azure TWC. And with that, have a lovely Tuesday. And thank you, Jeff, so much for joining. Thanks so much. Oh. Thanks. You're making my voice. Yeah. That was some really nasty flies in the air. All right. You should put that by the way. That would be perfect. That would be perfect. Flies in the air.