 Ladies and gentlemen, please welcome principal program manager of the cloud and enterprise group Scott Hanselman Hi friends. I know hi. I Know it has been a long day. There's a lot of information here It's extremely overwhelming and sometimes hard to process. Let's try to put some of this stuff into context I know that we have a lot of demos. I've got a lot of demos But what I want you to understand is the power that this all gives us as developers this sense of I can do that I can build this I can see how that Snaps into this you can look at all of this as being a parade of demos But for me I look at it as this kind of cafeteria of all these wonderful things that I want to try and I want to Plug together so I've brought you a whole series of demos that are very personal to me about not just stuff You could create but stuff that has been created that has been created with the technologies that give us superpowers Now it is also important to note that one size does not fit all and that's one of the things that makes me happy about working on Azure and working on ASP net is that whether it be tiny shared virtual machines and small websites that I do on the side on a Hobby or whether it be super large machine learning type systems that can put together the power of Thousands and thousands of processors I can go and do that I can run Raspberry Pi code and I can run massive analytical systems in the cloud The cloud that is Azure allows us to do all of that kind of stuff and what I like about it and why I still work here And why it makes me so happy is because it we still there we lost our battery there this this microphone is not powered by the cloud So we lost that there for a second It's all good Is it is an open and flexible cloud it is a cloud that lets us use the technologies that make us happy if you want to use Puppet you want to use chef you want to use mess if you want to use Linux use what makes you happy and That for me means enjoyable development and I like to see these pieces all dropping together because Now I can build things the way that make me happy and I I put that in there I said enjoyable development happy development I want that feeling even when I'm by myself where I can accomplish something go Look there's no one else here, but look I did it. It was amazing that sense of power is why we continue to do this so I'm going to show you some of the great stuff that we've built and Some of the tools that we get to to use now here. We are I wanted to point out briefly that if you go to Get dot ASP dot net so get ASP net You can go up there, and that's your acquisition point That's where you go to get ASP net you can get ASP net for six you can use web forms This is the ASP net that you know and love and you can install that for windows today You can also go and get ASP net 5rc that runs on the dot net core And when you hit this website right now I hit it on a windows machine So it says install for windows, but if you go and hit it on a Linux machine It'll say install for Linux and if you hit it on an iphone It'll say view source and then you can go off and look at the source for dot net This is where you go to get these things now this application that I'm running right here I am going to add some open source software to it now This is an open source bit of software called the glimpse Some of you who are web developers may be familiar with things like F12 tools right and when you are inside of your system and you are doing Debugging you're going to go and set up f12 tools to see your JavaScript and then you saw earlier we had Application insights to do production time debugging, but there's a middle ground where people need a different experience So this tool glimpse is going to inject itself into ASP net we're going to bring up our Public website that we brought up before and I want you to look in the lower Right-hand corner there Look at that This is giving me insights This is actually a little bit of JavaScript that's injected a dashboard into my application and I can see How long the database took I can see what time was spent on the client what time was spent on the server This is that bridge between what you see in f12 tools and what you see in some deep analytics I can even go and hit let's hit some database work here here. We've just hit Some database glimpse pops up. It tells me how much time was spent in the database But let's even go farther. Let's dig in. Let's see what the database query was Exactly how much time was spent on the network tools like this or what make me enjoy ASP net so much This is actually an open source project. We had the gentleman that worked on this join our team and plug this in So now you've got an experience where you've got f12 tools in your browser You've got glimpse bridging browser and server and you've got application insights when it's time to go to Production this stuff is really really fun now if I go over into Azure right now and look at app insights for this website. We'll click on this We can see the application health Seize things like server response time how long the browser page took to load again a bridge between the JavaScript The client side and the server side coming into one single view now This is an application view because this app runs in the web Sometimes you'll have applications that run in virtual machines. You'll have like a legacy app and Virtual machines run anything that you want And when things go wrong it can be a little bit challenging to diagnose because it may not have been an application area in the website It may have been somewhere else in the virtual machine This is a azure Diagnostics that allows me to look at the failures in this legacy application. So here's some failed requests You can see the different requests I can see that we have a exception here See exactly when they happen I'm gonna pick one of these exceptions and see what's going on and It's interesting because I'm seeing JavaScript on the client so that says that something went wrong in the browser But that might be an echo of something that happened on the server So what I really want to do is I want to look at the telemetry Before and after this moment and see if there's something nearby the smoking gun So here I can see five minutes before and five minutes after I can see that we are Processing tracing data here 10% and Then suddenly I can see both an exception within a dot net application or even go down into Unmanaged code click on that and get the details that I'm gonna need to solve that problem When these things go wrong, I'll get an email And I can go directly to that from the email So I got a notification that this went wrong I can go and say click on the application portal and go right to it So you're getting a full lifecycle there to debug the issue that you that you might have Let's switch over to the slides here for a moment So we hear a lot about virtual machines and websites and it can be a little overwhelming because there's a lot of acronyms There's I ads and paths and there's all these TLA's right these three-letter acronyms I like to look at it like this. There's virtual machines that you own you manage you make one you own it It's like a puppy. You have to keep it alive. You are now responsible for this virtual machine You have to run Windows update on the puppy Websites you don't have to worry about those things the operating system handles it for you Now there is this middle ground Where you have these stateless virtual machines where Azure manages the update and you have still full power so that's a nice place that sits between platform as a service and Infrastructure as a service pads and I ads There's also this new thing called service fabric because sometimes when you model large object oriented systems You can't just go and make a million of some kind of an object and have them all have state and that's why we keep oscillating as a Industry between object oriented and service oriented and we're going back and forth about what the right thing to do is Sometimes it's just nice to model a million of something and have those million objects have state But you also want to deal with the life cycle management of those objects But then you have to think about versioning these stateful services these micro services are what we want to write but it's hard Service fabric allows you to do that and one of the ways that I like to look at it It's platform as a service is kind of like a hotel room like the one that I thrashed Down down the street because I'm a rock star and I don't have to worry about it because it's platform as a service Someone's going to put that back together Unlike the virtual machine, which is my home where I have to go home after this and clean the gutters because I am Responsible for that space Service fabric is kind of like those little Japanese capsule hotels where this is a little bit of space It's very stateful and it's handled for you, but you don't worry about the larger system You just do your job you sleep and then you leave the capsule hotel So it's kind of like you know renting a small room you get many things you get life cycle management I'll show you what that means. We'll give you some demos here You get independent scaling you get updates and it's the updates that are so crazy because once you go and deploy something What if you want to go and update it? Do you have to bring the system down again? But you're managing all this state. How do you deal with that? It's also important to point out that service fabric can run on windows in Azure or on another cloud If you want to run it on windows in Amazon you can do that and in the future perhaps on Linux or in a hosted cloud It's totally up to you. So let's see an interesting example of what the fabric can do and we had talked about How it's this is a health clinic right and we've got all of this iot data that's flowing in I've actually got a band on and we're going to pretend that there are people with bands on out there in the world So we've got thousands of thousands of bands all providing data and they're flowing that into the fabric This is all real this is in fact running on 40 virtual machines And in this case here it is modeling a hundred thousand bands and it's going to continue to add bands to this system now I wrote an algorithm to express the stress level of the people Just want to get a sense of America's stress Unfortunately, I did a lousy job and I only made three like stops. It's like black, which is not stressed Green which is like medium stress and high which is like either stressed or dead But it didn't make a very attractive Map here But the system is working How do I upgrade this system with 10 million health reports and a hundred thousand bands all at the same time? what I want to do is Take this system and upgrade it. I've made some changes here. This is where we send the health report and where the doctor Gets the health report back from the band in fact the doctors are what they call actors in the actor model and Each doctor is an object. So we're really talking about a hundred thousand bands objects and fifty thousand doctors across 40 virtual machines What I'm going to do is I'm going to go and publish this and I have Enabled this Configuration I plug the configuration of the surface fabric into my system So I actually made a new algorithm that I'm going to call new algo I made it in code But I'm going to make this change as a configuration object and I'm going to just bump the version of this and I want to point Out again each object is a real thing like doctors are something and bands or something There's hundreds of thousands of objects running right now, and I'm going to hit publish and you have to think about this from A different layer of abstraction before I sent a single website to a single docker container Here I'm thinking about this business object this band or this doctor And I'm going to send that out to 40 virtual machines, but I don't really want to worry about 40 virtual machines Do I right? I want to worry about The business problem the higher level of abstraction. I want to be able to go into a Explorer like this and see These are the apps they run on n number of machines I don't really know how many machines as many as is needed and when we see the upgrade starting you see that the current version Here we go upgrade progress What we're going to see as the upgrade proceeds is the objects actually update in Production so right now there's a moment where part of the objects are version one and the other one's on version 1.0 point 1 And that is rolling out throughout the entire thing while we still make new objects So we're actually modeling in this case already 11 million health reports from bands across a hundred and ten thousand doctors And this application continues to roll forward to this new version So this is a higher level of abstraction that we can we can think about and it's enabling a whole new class This is absolutely real 40 virtual machines updating all in Azure Cool, I know it'll take a minute for that to soak in it's okay. I don't feel bad No, no, that's okay So so let's talk about this That's a pretty cool map a lot of amazing stuff happened You know that's that's that's amazing, but what what did we actually solve? Okay, so This models these Internet of Things objects, I've actually got a couple of devices plugged into me right now I've got this band. This is real and it's modeling my it's looking at my heart rate But I'm also a type one diabetic and I've been diabetic for 20 years One of the things that every diabetic does when they become diabetic is they try to solve this problem Usually with Microsoft Excel, but at some point they try to figure out well, I'm diabetic and I'm an engineer Let's plug some wires together and see what we can do So when we say the Internet of Things, I think it's great that you the normal sugared people You know you have your Fitbits and we think that's adorable, but but I have You know an insulin pump and that insulin pump is plugged in There's the insulin pump and it's plugged into my arm. It's 24 hours a day and that talks to a system Here is a CGM. That is my actual live blood sugar right now Now you see how it's kicking up there a bit. That's because of stress That's actually plugged in down here in an implant in my side, sorry to show you my chubbiness and This is real when you hear Internet of Things you think Fitbit and you think Raspberry Pi, but I think this Okay, and we've plugged this into some cloud systems that I want to share with you while the Internet of Things is fun Things like Raspberry Pi is this is great This is a Raspberry Pi and this is an Internet of Things enabled one We've actually got some C code on this that is talking to this temperature sensor So what does that temperature sensor look like? Let me switch over To some code here and show you This is some C code inside of Visual Studio. This is the low-level stuff C code makes your eyes blur a little bit sometimes what you need to know People who are wearing suits is you've got IOT hub and you have Azure devices So the takeaway there is that that's cloud enabled But for the developers that think this is crazy I want you to notice that we've actually got a Visual Studio plug-in to do remote debugging of things like Raspberry Pi's in Visual Studio, so whether it be high-level Updating hundreds of thousands of objects or whether it's low-level and doing remote gdb debugging to a Raspberry Pi We can do that now. Let's talk about my system Let me bring back to the slides here for a moment This is overwhelming. It's Azure right to all these icons. What's going on? It's all these people that are doing all of these things. Well, let's talk about me and the system that I'm building That's me in my shirt I've got my band the band goes to Microsoft Health that goes ultimately into storage My glucose system actually goes up into an API and I pull that data in as well Because that's personal to me. I've got my heart rate over years I've got my blood sugar over years. What can I do with that? Well, I'm going to show you some visualizations some graphs I'm going to plug things into office and see if Azure machine learning can answer some really interesting questions About me and my health and this is all live and this is all real So let's come back over to this machine here This is a system called night scout. This is an open source Node application that is running in Azure and this talks to my CGM my continuous glucose meter And I want you to point out a couple of things here this is the first presentation today and this is now That is a real-time System that is showing my blood sugar and one of the things that happens is not just that I drink orange juice Which by the way I have in case I pass out But also stress stress dumps glucose into the system And this is just one of the things that I have to deal with when I'm managing my blood sugar And actually I'm not sure if the guy can get a tight shot of that But this just popped up and it will appear in the the cloud. It's warning me that I'm now going high So in a second the website is also going to announce and then I'll get a notification on my band And on my watch and then people are going to start calling me and then it'll be scary So there we go notifications just showed up So let's talk about how that notification did in fact shut up So I've got a band and this is some data in the cloud. How do I see that? Well, it turns out that the band Can talk some JavaScript. I can take JavaScript out of the band This is up at developer.microsoftband.com you may have a band you may not be a programmer But you may have a url that points to some JavaScript or a blog or some XML and you want to create a tile I made one for my blood sugar So now I've got night scout on my system and I can see my blood sugar right there What's interesting about this is that I can use this visual designer But I can also Look at the manifest directly and look at this That's the code there sugar is high if it's over 150 Notification and then I'll get a notification on my band This could be done with a build server whether you want to water your plants Whatever that is the personal internet of things and that's what makes me happy But let's think about this once my blood sugar is in the cloud. What else can I do with it? Well, I can send notifications My wife can be concerned. She's probably going to be calling in a moment to make sure that I'm okay But this is part of the process. Remember how I said I want to analyze this stuff in excel Well, it turns out that I'm not very good at vba visual basic for applications, right? remember that 80% of the world's business logic runs in excel, I think that's a fact and In fact, there's an excel j s api javascript api for excel I can write an add-in for excel In javascript using the web technologies that I know how to make so we went and we made the the Hansel sugars project and I'm going to actually show you Some of the code here in just a second here we go Where we're going to populate a table in Excel using javascript using web technologies and what is exciting for this exciting for me about this is that I Didn't know how to do this before you see I'm a web developer But now I can go in here and put it in my target range hit refresh And now we're going to go and talk to the back end system and then dynamically populate a chart in excel of my blood sugar That I could then send to a doctor or my wife you have to think about the sense of power and enthusiasm that I suddenly have For excel which I did not care about before I'm a web developer That's a web application in pain there And it works in excel online and one day it'll work in excel on an iPad like Once you learn how to use one Lego piece you can then plug them into other stuff So it's extremely heartening for me to be able to do this and again if my blood sugar isn't interesting to you And it shouldn't be maybe some hobby of yours or something at work or some Inspiration will come into your mind and you'll think about how you can plug these things in together That's what's so exciting about this. So I've got all my blood sugar in real time. I can collect it into the cloud What else can I do with it? Let's switch over to another machine here. I'm going to switch over to a a Mac This is a Mac running VS code and this particular Mac is got the code to collect my data from the oops From the health API Okay, so we're going to go and make restful API calls be standard API calls off to Microsoft Health with where this is where the band data is stored because this is the thing that's so important. It's my data It's my heartbeat data. My blood sugar is my data. So once I have that ownership of that data What can I do with it? I can plug in that data and do different stuff So let me see if I can jump out of here. This is gone full screen full screen It can be a little confusing. There we go I'm going to take that data I'm going to pull it out of the Microsoft health API and this is a storage explorer The reason I wanted to show you this on a Mac is that this is the Azure storage explorer that we've released that is cross platform We're looking at the CSV files of my blood sugar data as it's sitting in the cloud I'm seeing my heart rate data. Pardon me. I'm going to hit download. I'm going to throw that on The desktop watch the right side Now I have power now. I have control now I've got a hold of that and I can run an analysis on it now in this case. I just brought it down to the desktop I could do some test Notification about my blood sugar I've got and I can do some analysis here But maybe I want to do that analysis in a more sophisticated way when you start thinking about the Internet of Things You start thinking about huge amounts of data. I said it has my heart rate Well, like how much is that? Well, I mean is it an average over a minute over five minutes over hours This is a huge amount of data. My blood sugar is doing three or four hundred Datasets every single day over the course of a year. This adds up to huge amounts of information This is where simply putting it into Excel and sorting and going it looks like a pattern Isn't going to be enough for me. I'm going to need to do some machine learning I want to find out about why does my blood sugar go up when I'm stressed out What is Thanksgiving dinner look like maybe I can answer those questions with machine learning? So I'm going to switch back over to this this system here and What I've what I'm going to do I'm going to jump into Here this is a machine learning kind of algorithm that I've put together an experiment if you will to pull in data From the heart rate on the right there from azure storage and the glucose data and I'm going to come up with a stress index I'm inventing a number. It's the Hanselman stress index and we're going to load that data up and what we're going to do is Clean it up do a little bit of normalization Do a couple of analysis run some statistics and then come up with a data set that the result is going to be a Time-based data set of my stress Okay, so that's kind of interesting It's pretty powerful though that But I need to see it over time So how would I express this over time and what value is there in it? Well, there is this API in office 365 and all of Microsoft called the graph API right the Microsoft graph Graph dot Microsoft comm and this allows me to pull my information remember how I keep stressing It's my my blood sugar and my heart rate and my calendar and my email I want a unified API to go and get those things and the graph API You can see there graph dot Microsoft comm allows me to make those requests So what if we looked at my blood sugar and my stress and my heart rate over time Overlaid on an office 365 calendar that could give us some insights and again I don't know anything about this stuff. This is what's so important and why as a developer. This is so exciting I know JavaScript. I know the web. I know C sharp and now I'm feeling comfortable about the cloud But when I say when I see hey, this is an API and it uses JavaScript and I can access all of the graph data in Microsoft That's amazing. That's that's a playground of excitement. So I can go and build this Get a start date and an end date. This is all standard Parsing of Jason parsing of JavaScript all using the graph API. Let's go and see what kind of a question That that could potentially potentially answer. So here is my calendar the stress index as it applies to Calendar data, let's click on one. This is all real Okay, so here's glucose is updating I can see the different rehearsals and I can see heart rate and sugar and stress changing I can actually run queries and see the result of that machine learning and ask the really Burning question the question that we all have which is what is the most stressful person in my life that is causing these problems And raising my blood sugar It is a really really great time to be a developer. I can put stuff like this together now It is an extremely personal time. It is extremely empowering time You know how we keep telling everyone, you know, teach the kids how to code everyone needs to learn how to code That's a part of it, but we need to teach people how to think about systems how to plug stuff in I don't know the graph API But it made sense because it's using open web technologies I don't know a lot of open source systems, but I'm learning those libraries and I'm bringing them in because they're using open tech Dot net is open source if I have questions. I can look at the docs, but I can also read the source Maybe I want to run a Mac. Maybe I want an iPhone I can build those systems with the mobile tools and visual studio Maybe I want to run on Ubuntu then I can use visual studio code and I can write Angular and I can use go I can run those things in the Azure cloud It is such an exciting and powerful time to be a developer right now I really hope that you have as much fun building stuff as we have had building this stuff for you And I really look forward to seeing what you all can build. Thank you very much and have a really great day