C# Networking with Chris Woodruff - podcast episode cover

C# Networking with Chris Woodruff

May 22, 20251 hr 3 min
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

Do you understand how networking works in C#? Carl and Richard chat with Chris Woody Woodruff about his new book on networking with C#. Chris runs down the fundamentals of networking and then discusses the different approaches readily available in the C# world, including web sockets, gRPC, SignalR, and many more! The conversation also turns to the upcoming QUIC standards built into HTTP/3 that should simplify networking. Sure, you could go with the defaults, but why not explore all the options!

Transcript

Speaker 1

How'd you like to listen to dot net rocks with no ads? Easy? Become a patron for just five dollars a month. You get access to a private RSS feed where all the shows have no ads. Twenty dollars a month, we'll get you that and a special dot net Rocks patron mug. Sign up now at Patreon dot dot NetRocks dot com. We'll get down rock and roll. It's dot net Rocks. I'm Carl Franklin and I'm Richard Cavell, and it's gonna be a good show. Chris Woody Woodruff is here with us, but before we talk to him, I

need to talk to you, Richard. What's up? You know, this is the show that comes out during build. So how is your build? Oh it's wonderful.

Speaker 2

Yeah, you were having a great You've been having a great time. I think you're flying back on Thursday, too, so you should be in the air at this particular moment.

Speaker 1

That's right. I need to fly back a little bit early because my daughter is having a graduation party for her masters So that's awesome. Well, and it looks like Thursday's only a half day anyway, now, so yeah, not a big deal. Well, this party is going to involve lots of smoked meats.

Speaker 2

Well, that's one of my favorite kinds of party.

Speaker 1

Yeah, I've got something interesting for Better Know a Framework, So let's roll the crazy music. All right, man, hit me? Yeah, aspnut Corp dot Diagnostics dot health checks. Oh no, not again. Are you actually doing the framework on Better Know a framework? Well, it's not really a framework. It's a it's a third party thing. It's oh, it's okay, it's as a get up repo. Yeah, enterprise health checks for asp net Corp

diagnostics package. But that's awesome if you scroll down, like when you look at all of the things that it's about, all the package, just that it supports. It's like everything everything. No, wow, but it's only just asp dot net corey toly yeah Toly, But I mean, how unhealthy can core get? Yeah, so it's it's too much for me to explain. I mean, it's basically that's what it is. It's health checks but nice. But it supports everything, so it's cool. I'm not going

to read the list. It's a long list. Check it out. Yeah.

Speaker 2

But yeah, all right, you don't you a more importantly, you don't have to write this stuff. Somebody's already built a repository. It's got a bunch of contributors.

Speaker 1

Yep.

Speaker 2

So it's not up on nine yet. It's still dot net eight. But who knows. By the time you hear this than they I've already got it.

Speaker 1

I've already got it. I can see the issue in there being worked. So that's a good sign. Yep, good stuff. Awesome, No, learn it, love it. Hey. Richard who's talking to us today.

Speaker 2

Grabbed a show off of episode nineteen forty six, the one we do with Elias Pirnin when we were talking about audio, video and dot net, and this comment comes from Kurt Nichols who said, it's just a few weeks ago. He said, for what it's worth, Marshall dot alec h global, which is something that we talked about on the show. For doing dealing with video stuff is unmanaged memory allocation.

Unmanage memory is not involved in garbage collection, does not move within the address space, and does not need to be pinned, and span of tea is very handily for manipulating a native buffer. If you're doing things like this, consider implementing a safe handle that is safe handle zero minus one is invalid for releasing the allocation. So actually a very important clarification. And once again here we are talking about old school yeah sockets and stuff, you know,

managed versus unmanaged behavior. Elias also responded to that comment. He said, Span of Tea is awesome and this safe and then I asked, this safe handle take care of the allocation too, or just provide a wrapper of sorts for the life cycle stuff and it just provides the rapper.

Speaker 1

You have to deal with your own allocations. Cool.

Speaker 2

So, Kurt, thank you so much for your comment in a coffee. Music cod by on its way to you, and if you'd like a copy of music go buy. I right a comment on the website at dot net rocks dot com or on Facebook, So publish every show there and if you comment there and I reading on the show, we'll send you copy of music to go buy.

Speaker 1

Music two code my is still going strong, twenty two tracks. I listened to it all the time still when I'm coding, and you can download it well yeah, penny for it of course, but you can get it at music to code by dot net. You can get the collection in MP three flack or wave or all three if you want. Nice hey knock yourself out.

Speaker 3

I have a done DVD, not DVD CD.

Speaker 2

Yeah, that's right, school. Yeah, you burned it to CDR.

Speaker 1

I love that. No, no, no no. When I came out with it, you actually made a CD.

Speaker 3

Yeah.

Speaker 1

Yeah, so you have production CDs I have. I did. That was the whole uh kickstarter. That also speaks to the idea that Chris has a working CD player, which is shocking to me. It is shocking to me too.

Speaker 3

I have a couple my kids have CD players because they like to play my old CDs.

Speaker 1

I just bought a new car at VW Atlas and it does not have a CD player in it, but it has everything else. Yeah, just to just be key in somewhere, yeah, sort of. Before that was Chris Woody woodrowf our guest. But before I introduce him, let's talk about nineteen fifty one. All right, where do you want to go? So nineteen fifty one is the show number, and so what we've been doing is highlighting what happened

that year. Major events include the continuation of the Korean War, which we talked about last week, the Treaty of San Francisco, which formerly ended the Pacific War with Japan, and the beginnings of the Cold War with the Rosenberg Trial, also the Schumann Plan. Six nations agreed to pool European coal and steel resources, which was a precursor to the European Union. Yeah, and let's see, that's the easy Cupean Eecy economic cooperation

is the beginning of that. In Libya gained independence from Italy. I don't know if people knew that that Libya was once part of Italy. Right, and then you sort of actually mentioned the Rosenberg Trials. That's when supposedly the Rosenbergs leaked the plans for the atomic bomb to the Soviets. Yeah, not good.

Speaker 3

No.

Speaker 1

Technological advancements included the first transcontinental television broadcast, the introduction of the first commercial color TV broadcast, and the first direct dial telephone service. So up until then you had to call an operator, yeah, to get a call put through it. And how could we forget that UNIVAC one was delivered by Remington Rand.

Speaker 2

It wasn't actually delivered. There's a great story here. Oh it's cool. So UNIVAC one the very first one he gets sold to the Census Bureau, right, and that's the one that comes that's available in nineteen fifty one, and so the sense they do this big thing in March of fifty one about hey, so the first computer is going to say sypua da da da da da. The party's over now, It's like, okay, it's time to deliver this. And I'm like, listen, it's the only one we got.

We kind of wanted to use it as a demo unit, and we're afraid to take it apart in case it doesn't go back together again.

Speaker 3

Oh man.

Speaker 1

So the second one was actually for the Pentagon, and that one they install at the Pentagon the same year. They don't actually get up the nerve until they build a couple more. They don't get up a nerve to take apart the demo model and move it to the census Buro till the end of the year. And this thing is this the one that took up the city block. Well, it wasn't quite that big, but it is big. But the UNIVAC console, if you ever go look at this, it's what you think of when you think of old

school computer. It's the great, big black panel with all the switches and the knobs and stuff on it. Like there's no CRTs at this point, right, we're ahead of all of that, right.

Speaker 2

What more important invention from nineteen fifty one, which is this is the year that Bell Labs announces what they call the grown junction transistor. So this is shockly you know, the Bell Labs they had the point contact transistor, is trying to develop an easier to make transistor, although it's still not real easy to make, right. And what he's doing is that he's melting semiconductor germanium as making into a liquid it's very fairly high temperature, and then pulling

that out as a single crystal. And that the geranium is actually doped, so there's a little bit of antimony in it as well. That makes it what they call an N type semiconductor. Why antimony, Because geranium has if you go look at your periodic table and I know you have one, it's right over there, has four outer electrons on its outer electron shell, which is what makes

it a semiconductor, and antimony has five. So in the natural crystal forming process, when all those electrons will lock in with other ones, the doping material ends up with a free electron and that makes it and type stepping conductor. Wow, So you're drawing out the single crystal germanium. And about Chris and I, our mouths are just hanging open here.

Speaker 1

We're just like, what the heck.

Speaker 2

So now you're literally talking in thousands of an inch, but you're pulling a single crystal of this N type geranium out of the liquid and as it's forming, it's only going to be you know, maybe a quarter inch long the whole thing. But as it's forming, you put a droplet of P type on it, which is geranium doped with gallium. And then you've cut off the crystal and now you have to weld gold wires to it. But you now have an N type rob with a

P type mount in the center of it. So you're making an NP N transistor.

Speaker 1

Somebody had to have a wild imagination to be able to say, hey, if we did this, what would happen?

Speaker 2

But this is how semiconductors. And again now now that they've described a process to get idea of how expensive these transistors were, like they were basically not commercially viable, right, but that they worked and they were stabler even though they were essentially handmade. Then the other types, although interestingly in nineteen fifty one as well, ge and RCA because that was Bell lads who were just talking about announced

a different kind of transistor called an alloyjunction transistor. So here what they did was they made a geranium crystal which was also dope with n antimony, so it was ND type, and then they fused droplets of indium doped gallium on each side of it to make what is now known as a p NP transistor instead of an NPN transistor. Was it cheaper, It was a little easier to make, but not a lot easier to make, but it also worked. It was faster to form because he

didn't have to actually draw a single crystal. At the same time, all of these things become obsolete by nineteen sixty, right, But there were stepping stones when the Planner. Yeah, when the Planner transistor comes along because the planet, which is actually a way to mass manufacturer transistors. Although there were lower quality, they were cheap. And that was made by fair Child Semiconductor, which was the company formed out of

Shockley's company that was formed to create these things. And Shockley was a bit of a character, not a nice man at all, and he called those eight that laughed to form share Child the traitorous eight, though most of those guys would go on to form a third company, you know.

Speaker 1

As Intel Intel. That's it. Yeah.

Speaker 3

You know.

Speaker 1

The thing that I know is that scientists, I think it was in the fifties, found that if you group two helium adams close enough together that they would actually laugh. Yeah he he helium fusion. Is that what we're talking about? Okay, okay, all right, all right, well that's all I got. All Right, we're here to talk about dot net and I think c sharp networking with Chris Woody Woodriff, So let me

introduce him. Chris Woodriff is a seasoned software developer with a career that spans before the dot com boom, kind of like us. He specializes in enterprise web development, cloud solutions, and software analytics, is on API design and scalable architectures, and is recognized as a Microsoft MVP and dot net and web development. He's also a dedicated mentor, instructing courses for aspiring tech professionals and speaking at international conferences on

database development, web APIs, and software architecture. Woody co hosts the Breakpoint Show podcast and has previously led engineering teams at Rocket Homes and Driven Developer relations at Rocket Mortgage. His consulting work has benefited companies like Apartments dot Com and Major League Baseball Advanced Media, right MLB.

Speaker 3

MLB Advanced Media.

Speaker 1

Yeah, they're a offshoot, all right, but it is Major Baseball, not something else. Okay. Woody enjoys bourbon. And I know this because he is the guy that introduced I think Richard and myself to Blanton's maybe maybe definitely introduced me. I don't know about Richard.

Speaker 3

Yeah, I take bourbon everywhere with me when we go to conferences.

Speaker 1

Yeah, and he enjoys writing about his experience at Woodrift dot dev outside of tech. You cannect with them on Blue Sky at Woodrift dot dev in Macedon at Macedon dot Social Slash at c Woodrift. I can't believe we've never had you on the show before. We've talked to you. Kind of embarrassing, isn't it talked to you so many times at all these conferences going back years.

Speaker 3

Yeah, it just it just never happened. It's okay. It takes time, yeah, you know what. You know what, like bourbon, it takes time to take time for for something a good thing to come out.

Speaker 1

So okay, I'll take that, but yep, we're sorry.

Speaker 3

Yeah, no problem.

Speaker 1

Well, like a Pappy twenty three.

Speaker 3

Well, back in the day, we had a competing podcast, you know we were doing. I was on deep Fried Bites.

Speaker 1

Yeah yeah, I remember. So I never considered you guys competition.

Speaker 3

I know. It was never all friendly. We're all friendly.

Speaker 1

Yeah, so I do remember deep Fried Bites good stuff.

Speaker 3

Yeah yeah so yeah.

Speaker 1

Speaking of bourbon, I have a an unopened bottle of Pappy van Winkle twenty three year old, still unopened. It's still unopened. It's in a safe.

Speaker 3

Richard hasn't seen it yet. Huh.

Speaker 1

Well no, when I got this batch and then I promise we'll talk about C sharp networking. When I got this batch, it included a fifteen year old which I gave Richard for his birthday, which has been drank and it has it was drunk pretty quickly after I gave it to you.

Speaker 2

I think, listen, I do not collect whiskey. I drink whiskey.

Speaker 3

Yeah yeah. So my brother's a doctor, so he buys the uh Pappy in the family. But I do have to say my first bottle of good bourbon was George T. Stag Love It four two thousand and four and I was living in Lexington at the time, and uh, one of the guys in my church was a sales guy for Buffalo Trace and said, hey, do you want a bottle? And it was like forty five dollars or something, this before Bourbon exploded. So yeah, And how that bottle got killed was my brother in law. I saw him mixing

it with diet coke the last ounce or two. So yeah, yeah, oh that broke my heart.

Speaker 1

It's just it's shameful.

Speaker 3

And I could feel everyone listening.

Speaker 2

Just keep I keep a bottle of Maker's Marker. It's like here, just go ahead, put your coke in this.

Speaker 3

Yeah. Yeah, I always have a cheap bottle like Beam or something around. Yeah.

Speaker 1

So but yeah, nothing wrong with that. Well anyway, yeah, you were the first one that introduced me to Blant and said, have you ever had Blants? If you like Makers mark you know, because it's weeded, it's weeded like Makers, and I think it's better. And then it shortly thereafter became very hard to find. And now that there was a flood at Buffalo Trace, So do you know the status of that? Are they are they back to production?

Speaker 3

Yeah? It only took them a week to get back to production. And all of the barrels that were submerged or partially submerged in water, they actually sold because they couldn't bottle them, so they actually sold them to collectors. And I hear people are going to like bottle them and sell them or you know, like orphan barrel. You know, sure, orphan barrel came out. I think it's supposed to be kind of like that. But no, they were back up pretty quick.

Speaker 1

That's good.

Speaker 2

Yeah, yeah, so because the water directed quickly. But you know that Pappy warehouse on the on the Buffalo Trace property, it's on there. It's half underground, so I'm sure that must have filled up with water. Yeah yeah, and then they they did, you must have lost a lot.

Speaker 3

You know. They had the story where they were digging for a new a new rick house.

Speaker 1

A rick house is where they store the barrel, right, and and found the old old old distillery.

Speaker 3

And they found the old old like before, like the original. She's distilled, and I think that's still underwater. I think they're trying to pump out water in that.

Speaker 1

But such a shame, but yeah, yeah it is. Okay, So we're here to talk about C sharp networking. And this is a topic near and dear to my heart, but only because many many, many, many many years ago I wrote a book on socket's programming and visual Basic. And it was even before visual Basic had a really stable windsock control. I was actually using a third party control because it was working better. I caught some flack over that, but coming from serial communications programming before that,

which was a nightmare. The you know, the the TCP IP stack and windsock on top of that was like a dream come true. So I know, I know that you do cover sockets in your your online book on c sharp networking, but it's a vast topic and I don't know where do you want to start.

Speaker 3

I don't know we can start why, Like why did I write? I mean, people ask like, why do you write a book right these days when everything's online and.

Speaker 1

Most people also don't care about the low level programming stuff. Give me an HDP client, you know, give me some poll exactly, and that's it.

Speaker 3

Well, and in the second half of the book, so the book is kind of broken up into two parts. The first part is all the fundamental stuff that I think people should know. Maybe they don't need to use it every day, but you should understand like what the dot net framework abstracts away. And then the second half I go through all the different types of network communications. So I talk about like rest APIs and web sockets and MQTT and gr PC and message queueing and stuff.

But what the most the most fun I had in writing the book was the fundamental stuff because I love HTTP, Like I've actually read the full protocol and I don't think anyone should. I just kind of did it to

to do it because I was so interested. I mean, I've done conference talks where I just talk about HTTP, and so that got me interested in this, and I was like, man, I really want to dig down into this and get something out so people can know a little bit more about what it really takes to communicate between two computers.

Speaker 1

You wanted to inhabit the ghost of Tim berners Lee.

Speaker 3

Sure, yes, Yeah.

Speaker 2

It also occurs to me here that if you're trying to to side on a particular connection process through any one of these APIs, through MQTT ORGRPC and so forth, at least knowing them all in context so that you can make a more informed decision. Yeah, yeah, I mean most of the time we don't care much about networking because the defaults are good enough, but sometimes they're not.

Speaker 3

Well, here's the thing. I mean. You have to know about about asickerness, so I have a chapter on async. When it's related to networking. You have to know about multi threading, so I have a chapter on multi threading in relations to networking. And down the line error handling, data serialization, error handling, and fault tolerance. So you were talking about Polly, I have a chapter on Polly that.

You know what, most people when they write their servers and their clients never think about fault tolerances, never think about what happens if I don't get anything back from the other side. And you should.

Speaker 1

Absolutely, yeah, and just lifting a error is not enough.

Speaker 2

I mean the whole thing with Polly, and not to plug your thing more, Carl, But I'm pluging your thing more. But it's like, listen, there's a bunch of things you could do, but you shouldn't write any of that because it's written for you. Just go get the poly library and you'll be fine.

Speaker 1

Yeah.

Speaker 3

Yeah, there's there's lots of patterns to Polly that that will solve a lot of your problems.

Speaker 1

Or just use the HDP Client Factory, which is sort of Polly under it, but it's easier.

Speaker 3

Yeah, yeah, yeah, And and Microsoft has come out with their own Polly like like you said, so you don't have to use Polly. I still think Polly is has lots of edge cases that it covers. So it's it's I think a little more breadth.

Speaker 1

Yeah. So and also you know, it's it's good to understand. For me, it was really good to understand just pure windsock programming, pure sockets. Right, I have a client, I have a server. Client connects to the server. That connection stays open until one of them closes it, and so during that time you can send and receive at the

same time asynchronously over that socket. And uh, but then you quickly realize when you want to go to use this, Oh I what if I, you know, want to define some message that I want to send and have the server understand it. Well, now how do I do that? So now you've got to think about protocols and if you're both not if both sides aren't using the same protocol, hilarity ensues. You know, it's like pulling up to the drive through and uh, you know Wendy's and can I

help you? And you say, yeah, I want to make a deposit. Yeah right, what what are you talking about?

Speaker 3

Yeah? Yeah, And that comes down to when you open up a socket. There's really there's three types of protocols that that you get. You get uh TCP, you get UDP, and you can do your own you can have your own custom protocol like do whatever wild things that you want. Right and for a long time, I mean, most people use TCP, but if you're streaming video or streaming audio, UDP is the way to go. It's a much better protocols the last week and.

Speaker 1

See, yes, because TCP has error checking built in and delivery guaranteed delivery basically exactly exactly so. And the thing that a lot of people don't understand is routers and TCP IP routers, and the whole protocol was built to a stand nuclear war yep, dark now. It was built so that, hey, if one set of routers goes down in the network, we'll just find our way around.

Speaker 2

Yeah yeah, which it still does to this day. You don't even think about the fact that, yeah still does. Undersea cables go down on a routine basis and most people can barely tell.

Speaker 1

Yeah, exactly, and we just find another way around.

Speaker 3

Richard, when you were talking about transistors, I was really thinking when you said in the sixties, but really what made transistors so cheap? And uh is really the space program, which is another government I mean they had to mentorize to be clear.

Speaker 1

Fairchild Semiconductor's original business was building navigation systems for i CBMs.

Speaker 3

Yeah.

Speaker 2

Yeah, and they needed to make the integrated circuit to get that system down to be small enough and robust enough to survive a launch into space.

Speaker 3

Exactly.

Speaker 1

Yeah. When life and death are on the line, you know, we get innovative.

Speaker 3

Yep, yep. And you know what, we have the Internet too, and it's it's cool. I really love. I mean I was programming when I was a kid with nothing I had. I couldn't afford a modem, I couldn't afford the long distance phone calls. So when I got to university, man, I had so much fun, right because this weird thing called Mosaic showed up on the on the Unix on our solarist machines.

Speaker 1

That's one of the first web browsers.

Speaker 3

Yeah, it was. It was the first web browser mosaic.

Speaker 1

I also remember Cello. You remember Cello?

Speaker 3

Remember Cello?

Speaker 1

It was ninety three something like that.

Speaker 3

Yep. And I remember Gopher before yes, before uh, the Internet, we were using Gopher for lots of research and stuff.

Speaker 1

So Gopher is a very simple folder based protocol that instead of having websites, you have Gopher sites and you'd get a basically a menu of folders and you could, you know, trans you know, navigate down. There was no search or anything. You have to know where it was. But if somebody published a paper in a published papers folder, you know, and you you basically had a URL to

it and you can download it anywhere. And I used to use Gopher for boy, this is going back, but one of the first talks I did on the Internet was ges satellite imaging Gopher server. And I can't remember where it was. It was in California somewhere, but it would their computers would download satellite images every five minutes and populate these Gopher servers. And so here I am doing a talk at vibits on the Live Internet and I show this you know Pacific, because I was in

California and San Francisco. I showed a picture over the Pacific and there was like this huge, huge storm cloud coming and it was only five minutes ago that this thing was posted, and people like ran out of the room. Yeah, suddenly nobody cares about your talk anymore exactly. But the power went out, like you know, and we were stranded in the hotel for a while, like you know that, and all people didn't know until they were unless they were at my talk. Yeah that it was going to happen.

Speaker 3

But that really shows that computers really didn't become a thing until they were connected, right, I mean modems back in the eighties where you would go to the well or the well was kind of a.

Speaker 1

Bb BBS site.

Speaker 3

BBS in San Francisco that all and I would have loved to have connected to that because it would have been cool to meet to talk to people that were connected. But like, yeah, it's back then. Long distance calls were expensive.

Speaker 2

And it cost money and everything. And that's what's the big deal for the Internet, right, was that, Yeah, suddenly the distance didn't matter. Everything was already connected. But yeah, we had our bbs is in Vancouver.

Speaker 1

Yes, now we're all reminiscing and yeah, but welcome to three guys Talk about technology and it doesn't exist anymore, I know, but it's good for the young ins to know that. You know, this is kind of your pedigree, this is where all this stuff came from.

Speaker 3

Yeah, and I'm just trying to share. I'm just trying to pay it forward. I'm trying to give a little bit back because I got a lot of help twenty twenty five years ago. I mean, I'm all I think this December. I know, I've been working professionally for thirty years now. Yeah, time flies. I banged my head against the wall so much that all my hair fell out. That was back in the nineties when there wasn't really

any good internet connections and what like. You didn't you couldn't ask chat, GPT, how like write some code to do this, or even even go the stack overflow. But I think we're going off, We're going off into everything.

Speaker 1

Well, well, that's okay, We're going to take a quick break when we come back. Here's a question you can think about, what are some of the and gems and networking that people may not know about? And you can answer that question right after these very important messages. We'll be right back. Did you know there's a dot net on aws community, follow the social media blogs, YouTube influencers, and open source projects, and add your own voice. Get plugged into the dot net on aws community at aws

dot Amazon dot com, slash dot net. And we're back. It's dot NetRocks. I'm Carl, that's Richard Hey, and Chris Woody. Woodruff is here. And before the break I asked them to think about this. What are some of the hidden gems in networking that people may not know about and then typically go unnoticed.

Speaker 3

Yeah. I think one thing is we hit upon this subject in the first half of the show, which is fault tolerance and learning how to get your network back communication back up and running so and that uses poly and and some other different technologies and frameworks. And the other one is you really have to For me, I think it comes down to understanding what the best protocols

and frameworks to use. So so many people just go, oh, we'll just do everything in rest APIs right, Well, that might not be the best thing.

Speaker 1

I don't even know if people know what rest is, because first of all, it was a very hip term to use. And then you know, when we first talked to people, Richard, it was just like, well, it's just HDP. You just get a request and it comes back. And but there really talking about API endpoints and how to handle them and how to structure the data that comes back from an API endpoint and getting a little more goo around that that's standardized.

Speaker 3

Yep.

Speaker 2

But it almost became that a buzzword thing. It's like, well, yeah, that's not RESTful.

Speaker 1

Yeah it's right. Well well I'm sorry, but yeah it works.

Speaker 3

Finally, I finally have used the sixth law or sixth rule of rest. So so there's six constraints that Roy Felding when he wrote his PhD thesis, which rest was part of, just a small part. He said six constraints that you had to do like client server, and there's a bunch of things, right, but the sixth one is where no one really knew how to cross over that

and that is when giving code in your response. So when you when you call a rest API endpoint to be RESTful, it should return code or something that that you use to uh change the state of your client. And I finally learned I'm finally using and crossing that law, and I'm doing it with HTMX, which I'm actually writing another online book about HTMX is a very small Java script framework. But I kind of digress.

Speaker 1

But so the question is is is that smart is is using code's earning code? Is a response? Is that sneak it is? I'm also sure I want to be in charge of every line of code that I execute.

Speaker 3

Well, why not have the server tell you what?

Speaker 1

What?

Speaker 3

Uh? Based on a based on a HTTP request, you get back some HTML that then you replace other HTML in the dom and you have you have a new UI without refreshing the whole page.

Speaker 1

And that gives Well I use Blazer, so that's not an issue for me. But anyway, I can't see what I did there.

Speaker 3

I know, I know, I know, I do server I'm more old school. I like server side stuff.

Speaker 1

But but but in general, though, I think that opens uh. That increases my attack surface. If what you're bringing down executes code, you can bring down some bad code.

Speaker 3

Yeah you could. You could know.

Speaker 1

So that's why I say I like, I know, I like when when I do rest or when somebody says, you know, make this RESTful. What I do is I create a response class and that response has like a list of errors, and it has a success and failure, and then it has either an entity or a list of entities, collection of entities, and that's it, you know, just the response code and all of that stuff. So then my code figures out what to do with that.

Speaker 3

Yeah.

Speaker 1

I like having the transport that the client, the API client and the server just doing what they should be doing. I don't want to mess in it.

Speaker 3

My you, I know, and we're really geeking out.

Speaker 1

I'll include a copy of Fielding's dissertation because you see Irving published it.

Speaker 2

Because one of the options in REST and it just say it's optional is code on demand. Yep, that's the sixth yep to I mean, to your point there, Chris is like, you decided to do the weird one.

Speaker 1

Yeah. I guess it's cool, but it's just not It doesn't smell good to me.

Speaker 3

I know, you do have to be careful and everything, but when you were talking about response codes and stuff, I was my mind was like, oh, the language of httph and and that's another thing I kind of talk a little bit about in the book. Is in the the introduction to everything, I talk about HTTP is a language. It's a protocol, but it's a language between the server and the and the clients that calls it.

Speaker 2

And as all protocols effectively are.

Speaker 3

Yes, and it communicates devices. Yeah, it communicates through the

response codes. Because I mean, so many people go, I'll just pass back a two hundred when when there's when it's successful, Well, know what what happens in the when you do a delete When you when you send over a delete request and it deletes a resource on the server side and it doesn't return anything back in the in the HTTP response body, you should always send back a two oh four because that tells the client that there's nothing in the in the response body.

Speaker 1

Right, if you think about it, the response code are for HTTP, right, Like for example, if you get a five hundred, that doesn't mean that your API end point ran and there was an error. You shouldn't set the code to five hundred. That's not for you. Yes, five hundred is the I don't know where I can't even reach the sendpoint.

Speaker 3

Yep.

Speaker 1

Yeah, only four hundreds for you, Yes, four hundreds the last and the year can set.

Speaker 3

So but there's there's a whole thing like in in the first couple chapters of the book, I talk I just geek out on HTTP and talk about that and stuff. But the most interesting chapter I think is the last one, and it's looking to the future with quick HDP three Yeah, HTTP three q U I see, and that that is the protocol that soon will replace TCP, and it will because TCP is slow, because it does, like Carl said in the beginning, it does have to do error checking

and everything. Quick is going to replace that and we're going to have a much quicker Internet in the future soon.

Speaker 2

Over on run as we because server twenty twenty five now implements h TWB three. We've been talking about these ideas, although you really upset administrators when you talk about this stuff because it's integrated with TLS one point three and so forth, Like it's inherently support secure approach. So it's like quick end points should be exposed on the Internet. It's designed to be. But you still have most administrators everything's behind a firewall.

Speaker 1

This is enough, you're moving. They're cheese man. Yeah, now they're scared. But you know the other part Quick is really about TEA about IBV six. Yeah, right, all addresses being routable, Like we've just gotten to this weird place because we didn't move to six and still largely haven't, and so we've done all this network translation, all these years trying to stretch all the IP four addresses out, which we've done still. But so we just don't have

this mindset of stuff shraudible. But also just because you're behind ant firewall doesn't mean you're safe. No, no, none of this has anything to do with safe. Absolutely not. Somebody gets into your net work, your toast.

Speaker 3

But but like quick is going to going to go from multi step handshakes, you know when when a website, when you get to a website, there's multiple handshakes and stuff, there's gonna be a single handshake, which is going to be good. We're going to get rid of the headline

blocking with multiplexing. I mean, there's there's lots of different stuff that I go through in the in that chapter to set people up and uh I even have code, so every chapter in the book also has code out in the UH in the same GitHub repo that the book is published from.

Speaker 1

So there's multiplexing. If I remember correctly, that was basically to send to one IP address and then it gets multi cast multi casting, I guess is what it is, right, And that's just to get around the limitations of the hardware of the time and the network connection speeds and all that stuff. Now everybody's got a gig or two gigs in their house, right, And are those protocols still relevant? Are they still being used?

Speaker 3

Well? But like HTTP one and two still they have pseudo multiplexing from what I've been able to determine, not a real modern multiplexing like built into the protocol. I don't think it was ever built into TCP or even UDP. Yeah, Richard might know because he knows everything.

Speaker 1

So I was confusing multicasting and multiplexing. I think multiplexing is where you can just send a bunch of data out the pipe and it goes to different people because it's all combined in the same wire, right, Yeah, I mean multicasting was part of specification for the longest time. Yeah.

Speaker 2

The problem is that routers did didn't implement it, or often it turned off, right, It had a bunch of limitations, like it's never really gone where it's supposed to do. There are these address blocks for both IVV FORORE and V six for multicasting.

Speaker 1

It's just rare.

Speaker 2

The only place I ever saw of multicast being used is internally internal networks with large volumes of video data.

Speaker 1

Yeah.

Speaker 3

Well, the other interesting thing with that we'll get with with HTTP three and quick is it we won't have drops because of connections. We'll be able to move those connections very freely. Two different ideas, So hopefully that will solve some of the like drop connections that we experience and network programming all the time.

Speaker 1

So do you see any security implications for this new set of protocols?

Speaker 3

Yep. Uh So instead of having a uh separate t OS layer, this has uh, this has integrated t OS one point three encryption into the protocol.

Speaker 1

Do you see t L S or t O S, t L S c L S.

Speaker 3

Okay.

Speaker 1

And because that way it's not optional, like you can't use security.

Speaker 3

Everything is is encrypted?

Speaker 1

Good with quick? And what about crypto and not crypto? What about quantum? Is quantum going to come along and squash it? Is it quantum safe?

Speaker 3

Quantum? And yeah, I don't know. We were talking to uh one of the Europe's MVPs in.

Speaker 1

Quantum, uh Cyprian Hannah, And.

Speaker 3

I think quantum. I think quantum will be good for certain certain needs, but not for like an application like we built today. It's still we'll still be having what we're doing. Now, we'll just have quantum kind of giving information to the application, which then probably will pass it on.

Speaker 1

Yeah.

Speaker 2

But the concern here is someday the biggest quantum computers not the ones that will actually be useful, because that those are simpler, we'll be able to crack prime key based in friptions. Yeah, but TLS has a cipher registry, so you can switch protocol so you don't have to use an RSA. You could be moving to a lattice algorithm or any one of these non prime key algorithms, so you don't have to change TLS, you just have to switch the cipher.

Speaker 1

Okay.

Speaker 3

But so in the end, I I really did the book for me so I could learn all this stuff. Nice, and I think that's what most people write books about. Because I learned more about this stuff than probably anyone that reads it is going to learn. So it's awesome.

Speaker 1

But it was.

Speaker 2

Yeah, you get to drill into each of these things in great detail.

Speaker 3

Yeah, yeah, you do, and you get to uh and then you get to release it and everyone tells you you're wrong about certain things. Yeah, which is awesome because then I can argue, and I love to argue. From a family of lawyers, so I love the debate.

Speaker 1

You always learn, I mean, whether you're right or wrong, you always learn something. Yeah, well you get confirmation or you learn something new. Yeah.

Speaker 3

Yeah, and uh, there's even I even have a page on this that if someone tells me a correction, I actually will correct it and give them credit. So I have a little updates and corrections where I give credit to people that tell me I'm wrong and they and they fix something in the book. So it's all yeah, and it's all on GitHub, it's all on prs. So you know what, I I am not a very smart person. Come on, now, I've just been around. I've been around long enough. Well, I had a I had a.

Speaker 1

Professor, Brandon, you're gonna edit that out right, No, don't edit that out.

Speaker 3

I'm not. I mean, there are so many smart people, and that that's why I love going to conferences and I love being around because I get to learn so much.

Speaker 1

Like it's just.

Speaker 3

No, I'm smart, but in the crowds that we.

Speaker 1

All, you're like, you're smart enough to know what you don't know.

Speaker 3

Well, and that's the thing I mean, I think that's that is being smart. As what you said it's knowing that you don't know everything, right, and I don't know everything.

Speaker 1

So.

Speaker 2

Nobody knows everything close.

Speaker 3

I don't know. Richard's pretty close close.

Speaker 2

I have a very good memory, as you both know. Yes, yeah, I haven't.

Speaker 3

I haven't stumped Richard too much about about anything.

Speaker 1

So, but you know, we also run with a group of people who are inventing the things that we all count on, right, you know, the Mads, targets of the world and the like. Who are I think a you know, different kind of intelligence again that they to be able to to take everything that's going on and envision the next version, envision what's possible. It's extraordinary.

Speaker 3

Yeah, yeah, exactly, and and it's it's amazing. That's why I like computer science and this our industry is because nothing ever is set in like stone. We're always moving. And if you take a look at accounting or any other kind of industry, they're pretty much all set I will for the most part, but we have a we have.

Speaker 2

That being said, I presume your book ends with in The correct answer is gr PC.

Speaker 3

Doesn't end in g r PC GRP.

Speaker 1

It's pretty freakin' awesome though, it is because it is.

Speaker 2

It is built on HDP two, right, Like most of these protocols are are pretty much agnostic. They really we want to just fine on one point one. But g RPC needed to.

Speaker 3

Well, yeah, it needed to.

Speaker 1

James Newton King came around and made gRPC web which runs on HDP one so you can use it in dot net and it's still awesome. Yeah, yeah, I'm sure it uses two if it can.

Speaker 3

Yeah. My last chapter is is quick, Yeah, just to look towards the future. But the one before that is Someone asked me to do a signal R chapter and I said okay, because they convinced me that it it fell in line with all the other kind of networking technologies.

Speaker 2

Because wasn't it just once just a wrapper over web socket. I mean, I know it's involved into the yeah pretty much things like that, but once for time socket.

Speaker 1

But here's here's what I don't like about SIGNALARE. I love signalare and I use it all the time, but you can't use it in replacement for a robust messaging system because there's no queue. Right. If you're not there to receive a message, you missed it, it's lost. You can't come back online and say, hey, what were the messages that I missed, right, So you can't just use it in place of a really robust queuing system.

Speaker 3

Yeah.

Speaker 2

No, that being said, you could use it to call to a queue, absolutely, you could.

Speaker 1

You could, but you can also.

Speaker 3

Yeah, and that's a great thing about like something like Kafta or Azure as your messaging queue.

Speaker 1

There's a million of them. Yeah, see, I see our talk with clements.

Speaker 3

Yeah, yeah, I.

Speaker 1

Think so he's stopped in nine not a million, but yeah, that's a lot.

Speaker 3

If you want, if you want to guarantee one hundred percent or ninety nine point of your messages getting to where they need to go, you need to do message queueing and have that.

Speaker 2

Just recognize that the internet's not five nine, so you know you've got to have a mechanism for recovery.

Speaker 3

Yep, yep, exactly.

Speaker 1

Show enough. What's the next thing that you're going to be working on? Are you done with networking and c Sharp or is there always more?

Speaker 3

I don't know. I'm done with that right now. I'm I have two things I'm kind of doing. I'm in the middle of a forty two day blog post series explaining rust to c sharp developers.

Speaker 1

Wow, I would love to read that.

Speaker 3

Yeah, so I'm I'll send the link to you, but yeah, it's out of my blog. Actually, this year I've got a master plan to have a blog post every day nice and it's a good idea. So for forty two days, I think I'm up to day twenty nine. So today was we were talking about traits in Rust.

Speaker 1

So if you want to know more, you have to go out, and I'm going to start with read chapter one.

Speaker 3

But Rust is Rust is like my new kind of love. So I've got two loves right now, Rust and HTMX, and I'm writing the next quasi online book for HTMX and then trying to learn Rust and share all this stuff I'm learning about Rust.

Speaker 1

All right, So real quick, what is your favorite thing about Rust? What is so great about RUSS that we should one sentence that you can convince the c sharp developer to read your blog posts.

Speaker 3

Yeah, so Rust will not let you compile.

Speaker 1

Bad code, So stuff that c Sharp would would discover at runtime, Rust will discover compile time.

Speaker 3

Yeah, like if you if you write code to divide one by zero rus, RUSS will not let you compile.

Speaker 1

It will stop because you can do that in c Sharp. You can make a variable zero zer with a value of zero and then divide.

Speaker 3

One by it, and that throws an exception.

Speaker 1

Compiler says run time, but now compile time.

Speaker 3

Yeah, yep. The other thing is everything is immutable, which I think is really is really smart because it allows you to do multi threading course much easier.

Speaker 1

It's not functional, though, is it. It's not a functional language.

Speaker 3

It can be functional. It's a very different object oriented language. Like it doesn't have inheritance, so.

Speaker 1

There's no ideas of nulls, right, which is the bugaboo of C shark.

Speaker 3

There is no nulls. You can't have a null because whenever a variable is out of scope, it goes away. And that's the other nice thing is like it doesn't need a garbage collector because it just anything that's out of scope goes away.

Speaker 1

Hmm.

Speaker 3

And there's It's just it makes you think differently. Sure, it's kind of like when I learn React, like React web development was for me very it was very different. But but yeah, my thing is you have to keep learning about new things. Even though I may not use rust on anything, I want to learn it just to just to see some different things that I can then bring back potentially into c sharp and and and maybe do smarter coding, have a smarter outlook on on my code.

But yeah, Rust is really cool. I'm building out some some web APIs. I think I'm going to be pushing some talks around around Rust and doing networking, like maybe taking all of the chapters in the c Sharp networking and doing Rust networking.

Speaker 1

Yeah. Interesting. So these blog posts around woodruf dot dev.

Speaker 3

Yeah, they are. And I'll send you guys the link to I've got a one blog that links to all forty two days as I am going through, So I'll send you that page so people can kind of start from the beginning and work their way down.

Speaker 1

Awesome, I'm really looking forward to that. Cool Chris, what is the what is what is the next bourbon that you're going to pour yourself? Oh?

Speaker 3

So, I love there's a there's a new two new bourbons that I've discovered. RD one is a distillery close to Lexington, Kentucky. They have a uh and I cannot remember Richard will know the name of the wood. It's this Brazilian wood that starts with A, the letter A and I can't remember the name. But they finish their their bourbon and barrels made of that wood and it.

Speaker 2

Makes the not oh huh, that's pretty strange.

Speaker 3

No, No, they start oak and then they finish the last six months or a year in this in this Brazilian wood, and it makes the bourbon tastes like cinnamon, toast, crunch, cereal. It is amazing. So Richard, you're going to dev some.

Speaker 2

I think you're talking about amberanna.

Speaker 3

Yeah, Banna, Okay, that's it.

Speaker 1

See you drink enough of it? Do you see the three little sweetish chef dancing around with the hats on?

Speaker 3

No? Maybe, no, you just pass out.

Speaker 2

So well, it's the only one I can think of. They usually make kosasha with it, which is their rub and varry that it's a it's a sugarcane based alcohol. Yeah, and I know that the high end versions were aged in Mburanna. But that's the only thing I think of that's a wood from Brazil.

Speaker 3

Yeah, I think it is that. Okay, And so that bourbon. And then the other one I've been drinking is one from a Holiday distilleries and they make a sweet red wheat using sweet red wheat to make le makers. And yeah, but there's they have some America. They call it American whiskies because they don't use fifty bourbon has to be at least fifty one corn. Some of this is a majority is wheat. So I'm really getting into They can't

call it bourbon, so they call it American whiskey. So I'm really getting into the weeded American whiskeyes because they're real sweet and uh, they're kind of the opposite of rise.

Speaker 2

Yeah, and it's not like it's not like bourbons weren't sweet. But yeah, I'm with you, so.

Speaker 3

Yeah, yeah, So I'm I'm bringing two bottles over to Stockholm. Def some you're gonna be there.

Speaker 1

I'll be there.

Speaker 3

Yeah, you'll be there, Richard, or you.

Speaker 1

Can be I will.

Speaker 2

I'll be coming straight up from South Africa, not going to any os.

Speaker 3

Okay, well, I've I've got two bottles. I've got a bottle of this RD one that I want to share, and then I need to figure out the other one I'm going to share. I think I'm going to bring one of these weeded whiskeys with me.

Speaker 1

So we are going to see the three sweetish chefs dancing around going see you know, I man?

Speaker 3

Yeah, So but those are those are the new ones. There's there's so many cool, new new bourbons and the price is starting to come down to Because so.

Speaker 1

You're in Lexington, did you say, supply.

Speaker 3

I lived I lived in Lexington for three years. Now I'm in Grand Rapids, Michigan.

Speaker 1

Okay, so yeah, well, being in Kentucky, of course, we're trying to educate people about bourbon a little bit, especially those outside the United States, and we have a significant number of European listeners. Bourbon doesn't have to be made in Kentucky, as Chris was saying, it has to be

made in America. Has to be at least fifty one percent corn, and it also has this weird rule that it has to be aged in virgin white American oak casks that have been charred for a certain amount of time minimum three years, three years, and then after that they can finish in anything like port wine barrels. It used to be only but they yeah, Angels Envy started doing the sherry finishes and.

Speaker 3

Yeah and yep, yeah, yep.

Speaker 1

So anyway, that is one of the one of the things that America has brought to the world is it's American whiskey. Right, You've got Scotch whiskey, got Irish Canadian. We have American whiskey. It's called Bourbon. There you go. Yeah, and if you go listen to the series I've done on Windows Weekly that they've clipped off his YouTube videos, I explain all of them. That's so cool. And we also did a show on Bourbon after we came back

from the road trip or No Code Palooza. Yeah, we did a geek out on Bourbon.

Speaker 3

Oh I remember that. Yeah, that was a good episode.

Speaker 1

Yeah, good stuff. Chris Well, it's great to have you on the show finally after all these years.

Speaker 3

Finally, thank you.

Speaker 1

Yep, and we'll do it again.

Speaker 3

I feel I feel my life is complete now, so mine too. My career, my technical career is complete.

Speaker 1

So mine too. And I really mean that, like I really enjoyed sort of geeking out and going back in time with all of the stuff that I used to think about. And it's good to think about it again. Yeah, especially for the young kids.

Speaker 3

Everything comes around, everything comes around, that goes around.

Speaker 1

So good stuff. So yep, all right, thanks again, and we'll talk to you, dear listener next time on dot net rocks. Dot net Rocks is brought to you by Franklin's Net and produced by Pop Studios, a full service audio, video and post production facility located physically in New London, Connecticut, and of course in the cloud online at pwop dot com.

Visit our website at d O T N E t R O c k S dot com for RSS feeds, downloads, mobile apps, comments, and access to the full archives going back to show number one, recorded in September two thousand and two. And make sure you check out our sponsors. They keep us in business. Now go write some code. See you next time you got Jamtlevans

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android