# gRPC Update with Irina Scurtu

An episode of [.NET Rocks!](https://invisiblenetwork.ai/podcast/130068596), 8 Feb 2024, 49 min.

Audio: https://dts.podtrac.com/redirect.mp3/api.spreaker.com/download/episode/58606820/dotnetrocks_1884_grpc_update.mp3

What's the latest with gRPC? Carl and Richard chat with Irina Scurtu about her latest work with gRPC. Irina talks about the improved tooling with gRPC, including tools like Postman to help you see what's happening in a gRPC interaction, even decoding the binary data! The conversation also digs into the complexity of metadata with headers and trailers and the challenges of supporting multiple platforms and multiple type systems - but it works if you take the time to learn the details. And the results are fast and flexible communications!

## Transcript

[0:01] How'd you like to listen to dot net rocks with no ads? Easy?
[0:05] Become a patron for just five dollars a month. You get access to a
[0:09] private RSS feed where all the shows have no ads. Twenty dollars a month.
[0:14] We'll get you that and a special dot net Rocks patron mug. Sign
[0:18] up now at Patreon dot dot NetRocks dot com. Welcome back to dot net
[0:36] rocks. This is Carl Franklin and this is Richard Campbell. We're here in
[0:39] our respective studios. I saw you on Windows Weekly yesterday. Oh yeah,
[0:45] you watched the live stream of that. I did, So tell me what
[0:48] you're doing on Windows Weekly besides you know, stirring up hat and discontent and
[0:52] whiskey. Yet I mean, in the end, I've come to appreciate that
[0:56] Window. This all happened because Mary Joe Foley left zd net. She went
[1:00] to work for Directions on Microsoft, which is an analyst group mostly ex microsofties,
[1:07] and she's really their sort of lead writer organizer, does the blogs and
[1:14] things like that. She super loves the new roles like super Happy, but
[1:17] Windows Weekly was intmpatible with that, and so Paul and Leo were doing it
[1:21] on their own for a few weeks, and Paul was so sad. You
[1:25] guys are buddies from way. We've been buzzy for a long time. And
[1:27] so I came in and guested a couple of times, and actually it was
[1:30] Leo. He said, like, what are we going to do to make
[1:33] it permanent? That's kind of how it worked with you and me and Dot
[1:36] Rocks. Isn't it that you were Richard the toy boy? And then it's
[1:40] like, you know, how about Yeah, that's very cool. I really
[1:47] enjoyed a conversation. It was great. Yeah, you know, Paul is
[1:49] a prolific writer, like a dozen articles a week. It's insane, and
[1:53] in a lot of ways, the show is basically going over what Paul's written
[1:57] that week, which is fine. You know, I'm familiar with most of
[2:00] the subjects. I have opinions, and it's easy to make fun of Paul.
[2:05] And then they added the you know, MJ used to do this closing
[2:08] bit on her malt liquor of the week, her beer of the week.
[2:12] She has, like her craft beer. So they asked if I could put
[2:15] something there, and it's like, how about brown liquor? And of course
[2:16] he's never forgotten you and I And he refers to this day as the Bourbon
[2:22] Brothers going up there after a build and they cracked that abler abunda the cask
[2:30] string. Oh my gosh, yeah, that stuff. He was gooned by
[2:35] the time we were done. Yeah, they ran a couple of clips of
[2:37] that day right where I think Paul said something along the lines of I feel
[2:40] like I've been shot in the tongue. Anyway, So every week now I
[2:49] do a different thing on whiskey, and they'd been clipping them and picking him
[2:53] into a playlist on YouTube as well, including over eight parts I described Scottish
[2:59] whiskey creation in detail, and if you can buy those eight bits together two
[3:02] and a half hours. So basically, there's a two and a half hour
[3:06] geek out on making Scottish whiskey out there if you want it. So you
[3:08] sent me a link to the live recording. Yeah, but you guys don't
[3:14] publish a lot a live recording. You publish an edited recording, right,
[3:17] Yeah, Yeah, they publish a podcast essentially. Yeah, but yeah,
[3:21] it's still it's just that they also stream it in some respects, and like
[3:24] every podcast, they're struggling financially Yeah. So they where they used to literally
[3:29] have a twenty four hour stream with inter socials and stuff. They've cut that
[3:30] back to we just stream their recordings. Well, it's really fun, and
[3:35] I encourage all the dot ne Rocks listeners to go check out Windows Weekly,
[3:38] just google it. It's at twit dot tv and you can get more Richard
[3:43] Cammell that way, let's let's get into better no framework. Awesome, All
[3:57] right, man, what do you got? So a friend of mine said,
[4:00] have you seen this? It's a YouTube channel YouTube dot com slash at
[4:04] Jim Browning. Jim Browning is a is a faux name, a nom de
[4:11] plume. This is an anonymous guy who finds scammers. Oh yeah, and
[4:17] and confronts them and in some cases gets them convicted. Yeah, so tracking
[4:25] and identifying scammers who knock on my front door, call me or shove pop
[4:29] ups onto my computer screen. Yeah. And there's a series of amazing videos
[4:33] here where he does just that. Yeah, I know. And he's been
[4:38] like literally unraveled a huge scam group in India. Like it's amazing, it's
[4:43] remarkable the work, But there is a certain amount of just the shoden froud
[4:46] of the scammer being scam Absolutely, I love it. You know, schadenfreud
[4:51] is the perfect word here. Yeah, so anyway, I really do appreciate
[4:58] that. And I have also noticed, and you may have noticed this,
[5:00] and I'm going to bring it up on security this week later today that if
[5:05] you have any kind of Facebook page, not a personal page, but a
[5:10] Facebook page, a business page. Irene is already nodding her head. She
[5:15] knows exactly what I'm talking about. There's this scam that is going on where
[5:19] people send you, you know, instant messages, Facebook messages saying they're representing
[5:26] Facebook and your page is about to be shut down for some copyright infringements or
[5:30] whatever unless you respond to this, and blah blah blah. And at first
[5:33] it really confused me because it was very you know, official looking, and
[5:38] then I noticed I was getting the same message from like Bob and you know,
[5:43] Ahmed and all these other people, and I'm like, okay, this
[5:47] isn't real. Well, and the accounts get deleted pretty quickly too, right,
[5:53] Like, yeah they do, but I mean, talk about shadenfreud.
[5:55] I just have a strange urge to reply bite me. Yeah, you know,
[6:00] don't, don't. But don't. Don't do it. Yeah, don't
[6:04] you don't roll around with pigs. Not only will you not get anywhere,
[6:08] but the pig enjoys it. Well. Dottna Rocks has gotten just a spate
[6:11] of these messages. So if you're any of the people who sent them to
[6:15] me, bite me. And Franklin Brothers Band, another page that I have
[6:20] has gotten slews of them, Like I'm talking maybe thirty forty of them.
[6:27] Bite me, bite me, bite me. Well, and you imagine,
[6:30] when you're not a technical person, just how freaky this must be. Like
[6:32] it must be effective. But it speaks to the state of spacebook, isn't
[6:36] it. It's just a cesspool. Now. I like Spacebook better than Facebook.
[6:41] Actually that's a really much better word for it. Yeah, because it's
[6:45] out and outer space sometimes you would hope. Eh. Anyway, that's what
[6:48] I got. Richard who's talking to us today, grabbed a comment off for
[6:50] show seventeen ninety seven, which we did back in June of twenty two with
[6:55] one erneus you Tube. Maybe you've heard her, never heard of her?
[6:58] Yeah, And oddly enough we were talking about gRPC, who would have funken
[7:05] anyway. This comment comes from codepouter otherwise known as Richard Rukima, who's also
[7:11] been a guest on the show back in March twenty two and was also a
[7:14] student at Codena Castle in Tuscany. Oh, I didn't know that. That's
[7:18] awesome. Yeah, he came to Tuscany. It took me a while to
[7:21] figure out who he was because I've never seen him in person. Yeah,
[7:25] yeah, he could get him, get him out of character, right,
[7:27] What a great guy though, And he's in your neck of the witz.
[7:29] I think, yes, somewhere nearby, not too close. I have deble
[7:33] check, but it might be in said Alberta. Anyway. His comment is
[7:39] in reference to gRPC, where he says you might want to review proto buffers.
[7:44] Yeah, for tro RPC and developers, and specifically the dot net library
[7:47] for proto buffers. I never understood why I should create a proto buff file
[7:51] to describe a message in all the languages from a dot apps which uses my
[7:56] ap API for my application. So it's just one of those utilities. And
[8:01] I'll include a link on the show to dealing with idiomatic dot Net with the
[8:05] protocol buffer's library. So yeah, we went over at gRPC and Blazer in
[8:09] the masterclass thing, right, and so uh yeah, protobuff is just part
[8:13] of the thing. That's the protocol that gRPC uses. Yes, it's the
[8:16] way to go. So, Richard, thanks so much for your comment.
[8:20] I'm pretty sure you get a copy of music Code by but ping me anyway,
[8:24] and we'll hook you up. And if you'd like a copy of music
[8:26] Code buy, write a comment on the website at dot NetRocks dot com or
[8:30] on the facebooks you publish every show there, and if you comment there and
[8:31] everybody on the show, we'll send you a copy of music Go buy.
[8:33] And you could also send us a tweet or an x or whatever the hell
[8:37] they call him these days. I'm at Carl Franklin, He's at Rich Campbell,
[8:41] or you could be like all the other cool kids and go to mastonon
[8:45] I'm at Carl Franklin at tech hub dot social, and I'm Rich Campbell at
[8:48] Mastodon dot social. Send us a toot or tweet or an ex or whatever
[8:52] the bleep you call those things now. Yeah, it'll always be Twitter to
[8:56] me. I'm sorry, Elin, Yeah, I'm okay with that. You
[8:58] You're evil. Plan is not worth really that story? Yeah, no,
[9:03] okay, I'm not sorry. I'll say it like my wife, my wife
[9:07] Kelly, she has a habit of apologizing for no parent reason, you know,
[9:11] anything. And so she's realized this and now she says sorry, not
[9:16] sorry, fuck you constantly. It's the cutest thing. That's pretty good.
[9:26] She can't stop the reflex, but she can follow it up. She's right,
[9:30] exactly. It's like a napid thought. And now it's just becoming one
[9:33] of those family things. All right, let's bring on Arena back for more.
[9:37] Arena Skirt two is a Microsoft MVP for Developer Technologies, the Software architect,
[9:43] an independent consultant, and Microsoft certified trainer, always in a quest for
[9:48] the latest trends and best practices in architecture, dot net and the world around
[9:52] it. Also having more than two thousand hours of delivered trainings, classings,
[9:58] workshops and presentations, she loves to help others grow. Twice a year for
[10:01] five months, she teaches dot net and c sharp to people that either want
[10:05] to switch careers and get into software development or simply learn new things very very
[10:11] cool. She tries to lead by example and believes in the importance of growing
[10:16] tech communities. She is the co founder of dot net Yash user group that's
[10:20] I a SI Yash of course, and dot Netdays dot ro conference where she
[10:30] tries to gather people that are willing to share their knowledge with others or gather
[10:33] around in the community, and from time to time she publishes articles on her
[10:37] blog Irena dot codes awesome domain there codes. I got to look into that,
[10:46] Carl Frank, Oh, yeah, welcome back. Thank you for having
[10:50] me. You're welcome. Great heard of this dot Net Days dot ro.
[10:56] I wonder why, all right, tell everybody come on, I'm coming to
[11:01] Yash. I'm gonna come. Yeah, I'm going to Yash. I've never
[11:05] been. I've been, you know, I've been to Cluge, I've been
[11:07] around Romania, but I've never been. I've done any Yeah, I haven't
[11:11] done gone to Yash. I'm like, I got to go to Yash.
[11:13] I don't know that I'll go to Moldova while I'm there, because it's very
[11:16] close to Moldova. But it's kind of a sketchy time to go to Moldova.
[11:20] Right now, I have a yash on my wrist and you put a
[11:24] little ointment on it and it's going away. So we're talking gRPC here.
[11:28] It's been a spell more than a year last time we checked in, and
[11:35] and you've been writing new course words, stuff like there's more to no,
[11:37] right, yeah, there's more to know and the technology is well well established.
[11:43] No, no, so it's in the last year. There's been some
[11:48] innovations in gRPC, more stabilizations, if that's a word, now I get
[11:54] that. Yeah, so gRPC is here to stay if you ask me.
[11:58] And we're really talking gRPC web, right, because that's what most developers use.
[12:03] Is that true? No, No, we're talking gRPC like back end
[12:07] technology, okay, for server for the server bit server server, yeah,
[12:13] micro services, yeah, okay, so gRPC web obviously for browsers. So
[12:20] it started at Google. But they claim that gRPC is a recursive acronym called
[12:26] gRPC Remote Procedure Calls and so if you go there, gRPC io, that's
[12:31] what they say. But they built it for, as you say, micro
[12:35] services, you know, service to service kind of interaction which doesn't require HTTP.
[12:43] Where they built it to fool people that a distributed system is the monolith.
[12:48] Like the way they are behaving. The g doesn't stand for Google.
[12:56] It used to, they claim it doesn't now because they opened it up.
[13:00] I think you know, it's just kind of a wink wink, you know.
[13:03] Yeah, it's just active re you know, re acronym, yeah,
[13:09] reassigning. Yeah, that's pretty funny. So what's new? So the tooling
[13:13] is new and stable, which makes me, uh, very glad that well
[13:20] Visual Studio caught up with everything that happens in RPC, so now you don't
[13:28] have like problems with types not being recognized and stuff like that. Okay,
[13:33] awesome. Uh. And also you have like an option in Visual Studio right
[13:39] click at reference and you'll search and find the proto file and it will automatically
[13:45] install some packages for you. And that's awesome because we want straightforward things.
[13:50] We do not want to remember what packages we need to install. And there's
[13:54] a bunch of them in for the different places too. Yeah, you talked
[14:00] about types when you when you generate a client or a service, you have
[14:05] to define these types in a in a protofile, as Richard Rukumo was saying.
[14:11] And those types don't you know, if the the actual types like string
[14:16] in whatever. Some of them map, but a lot of them don't.
[14:20] And I always find it difficult if I'm doing anything complex to well, nowadays
[14:26] I ask chat GPT, but usually I would go browsing for it. Uh.
[14:31] You know what is the proto type that matches, you know, a
[14:35] double array or something like that. Well, basically they they try to help
[14:39] us with something that is called Google well Known types, which is the common
[14:46] ground between all languages out there. But if you need something specific only for
[14:52] a specific language, you'll have to mimic and code it yourself. In broad
[14:56] above. Yeah, you create your own message type that has whatever. Yeah,
[15:00] I mean the doc liarly says protocol buffers well known types. Yeah.
[15:05] Yeah, I presume as soon as you go off this list, now you've
[15:07] got to figure it out. Yeah, but this is what proto buff's all
[15:11] about, right, Yeah, it's not a language, it's a code generation
[15:16] template really yep. So basically the fact that we're writing and defining the services
[15:22] and the types in proto buffs and it makes us understand the new syntax and
[15:28] new types and all. It's overhead for us. But you can also have
[15:33] the option of starting with your own existing types and feels like code first gRPC
[15:39] due to a nice library written by Mark Gravelle, which allows you to reuse
[15:46] if you have WCS for example and you have types that are adnotating with data
[15:50] contracts and stuff like that, you can get rid of proto buffs. That
[15:56] was one of the first things that I wrote as well, and I showed
[15:58] it on Blazer Train. Back when I first learned gRPC. It was like,
[16:02] well, what if I've already got, like, say, an API
[16:03] layer, I've already got my types and I have to redo them and now
[16:08] I've got duplicate code and all that stuff. So, yeah, it's a
[16:12] smart idea, just you make a code generator generator kind of. I'm sorry
[16:21] when you say it that way. It doesn't feel like a smart idea anymore.
[16:25] I know, it's weird. It's a lot of weirdness. Yeah,
[16:29] but there's a problem. There's problems there because you have to you know,
[16:33] every time that you get a call or a bunch of variables, you have
[16:38] to convert them in the service, right, so there has to be stuff
[16:42] in there that runs at run time, and you know, you have to
[16:48] take into account all the types. It's a lot. Yeah, but basically,
[16:52] let's be honest, we all kind of use basic types with our other
[17:00] types custom ones. So as long as those are like interoperable where they can
[17:08] work with NOGS or something else. Sure, Yeah, back to why do
[17:15] we build types? Why do we do this? How does this really save
[17:18] us pain? It is just because it's easier to pass in APIs. Basically,
[17:22] once you start with gRPC, you have one source of truth, or
[17:26] you should have, like this protocol buffers file. And the point of gRPC,
[17:32] beyond the fact that it uses a binary serialization, is that now you
[17:36] can have a c sharp consumer that talks with an OGS server and the only
[17:44] thing that these two have in common is that protocol buffers file. That You're
[17:48] right, right, And that's kind of the magical part about it is.
[17:52] Yeah, this is cross platform without WS starring a whole lot of XML.
[17:56] Oh yeah, and performance is amazing. I mean I did some comparisons using
[18:00] gRPC web in Blazer to download five thousand records from an API and then from
[18:07] gRPC, and it was like the second and a half compared to like two
[18:12] hundred and fifty milliseconds. It's that different. Yeah, and that's on the
[18:18] same sheme. But still, I mean, that kind of ratio is what
[18:22] you can expect. And yet how is the adoption arena, Like I still
[18:26] don't see the huge amount of tractions For gRPC, there isn't a huge amount
[18:32] of traction. What I'm seeing in my workshops and at the conferences, I'm
[18:37] hearing people talking about transitioning from WCF to gRPC. Right, this is the
[18:41] most common scenario, and simply because they want to get to Core. Yeah,
[18:48] and WCF is not going indeed, and nobody's waiting for the open source
[18:52] version WCF exactly, and why would you Anyway, there's a whole lot of
[18:59] pain. I don't know if you guys remember, but uh yeah, configuration
[19:03] nightmare, that's what I remember. That's why you guys, guys like the
[19:08] Germans, you know, Angle Grammar and all those guys who were into WCF,
[19:15] they made the fortune on helping people configure their WCF services well. And
[19:19] it also appeals to the mind with that kind of precision, like as long
[19:23] as you do it right, it works great. The moment you do it
[19:26] wrong, it's essentially undiagnosable. Yeah, I get that. Where gRPC seems
[19:32] way more stripped down. It seems like the best part of dot net remoting,
[19:34] which I loved, like dot remoting between two dot net services back in
[19:40] the day just worked like it was nothing and it was fast form work with
[19:47] anybody else. No, So then they say, hey, you know what
[19:49] you like more soap? They were wrong, they were wrong. That was
[19:55] a lie. Soap did not clean anything what they were thinking. Yeah,
[20:02] it wasn't simple, it didn't have any objects, it didn't provide access,
[20:07] it wasn't a protocol. The name was perfect. Oh man, I could
[20:18] do this all day. So I know that you're, you know, peer
[20:23] to peer in the micro services world, so you're not really using the HDP
[20:27] web version of it. But I was following the the way that what is
[20:36] to your what's the deal with HDDB two and why didn't something work? And
[20:42] does it work? Now? I'm sorry for being vague, but I just
[20:47] remember that there was a problem with maybe Azure not supporting HDP two or and
[20:53] that's why gRPC web came around. I don't know, something like that.
[20:59] I mean, they added grbc into like dotnut world in twenty nineteen, but
[21:06] Asia wasn't supporting that until I don't know last year or something. So it
[21:11] has been Oh yeah, it has been a gap around it. Yeah,
[21:15] that's what I remember. And it's not like HGB two is new. We
[21:18] were using it it's strangely, for crying out loud, now they're talking HGDP
[21:22] three. Yeah, so it's not even new anymore. HGB two is implemented
[21:27] in twenty eighteen in the Azure App Service. Yeah, so it's been a
[21:33] few years. But still they didn't get to it soon. No, I
[21:37] don't know why. Yeah, it's we don't We don't know the cloud problems,
[21:44] and we don't want to know the cloud problems. Oh yeah, cloud,
[21:45] those are hard problems. I don't envy those guys and our browsers using
[21:49] HDTP two now, yes, they are since when for a long time,
[21:55] for a long time, because it was easy, relatively speaking. Work on
[22:00] the server was the hard part, right, and it was. Yeah,
[22:03] twenty fifteen was when it was ratified for twenty eight for browser side. Okay,
[22:07] So the fact that it took three years for Azure to get it going
[22:10] just on app service, like they still got to do a fund more and
[22:11] all those other pieces like that makes sense to me. But you know,
[22:15] we were battling that ressulcilationship with twenty thirteen, and one of the one of
[22:18] the reasons you used, strangely it was that it did terminate HTP two for
[22:22] you. So these are little bits of information that have fallen out of my
[22:26] ears, and you know, you don't want to know this stuff like that's
[22:30] just it. It's it's not a story worthy, you know. Yeah,
[22:36] this is the plumbing that makes the Internet go around. Like once upon a
[22:40] time the web was just not that robust and having two connections to a web
[22:44] server was a lot. So has the performance or scalability of gRPC improved over
[22:52] the last year. I don't know about it being improved, but I just
[22:57] recently wrote a blog about hosting in Asia and it was so simple. I
[23:03] was like, okay, no, no wonder that it took like three years
[23:07] for you to get app service and gRPC workable with each other. So it's
[23:15] very nice right now. Oh good, So again you're talking too ling as
[23:19] your support. All of those things have. It's come into its own.
[23:23] I don't know why gRPC isn't more popular because it's certainly it's certainly so usable
[23:30] in just about every scenario where you have communication. I think it's hard.
[23:36] I mean, once you have if you have a green field app where you
[23:38] have services that need to talk with other downstream services and you need some kind
[23:42] of I don't know request response scenario, then it's fine. But if you
[23:48] have a huge application that it's already well established, it's hard in terms of
[23:53] time to retrofit, so it will be a while. Yeah. No,
[23:57] no. And if you're used to living in a land and then you just
[24:00] poorted that up to app service, like you haven't really embraced a different view
[24:06] of the web. You still kind of an iis person, yeap, And
[24:08] you havn't grasped these ideas of reverse proxying and all of the other mindsets that
[24:15] other web approaches, you know, not coming from dot Netland, not coming
[24:19] from Microsoft Land, embraced years ago. So you know, I still feel
[24:23] like we're playing catch up in a lot of respect. You know, the
[24:26] day I shut off Internet Information Server was the happiest day of my life.
[24:30] Dude, dude. You know, I sent both of my old servers to
[24:36] the e cyclers to be torn, you know, taken apart. And that
[24:40] was a good day. That was a good I am now purging all racks
[24:44] out of my life. I want to see it getting shredded. I'm not
[24:48] leaving until I see it shredded. Well, I shredded the drives and then
[24:52] shut the chassis off. But the motherboards were for twenty thirteen. I didn't
[24:55] owe anybody anything. I was on my third set of fans in those things.
[24:59] But now I'm with you. You know, it's a cloud world like
[25:03] less less is more at home absolutely, Plus you know, never mind that
[25:08] the security implications of Internet information. Everything's on by default and yeah, yeah,
[25:15] it's the it's the Swiss army knife with all the blades out right.
[25:21] So what have you been doing in your day to day life with gRPC?
[25:26] That's interesting arena basically helping teams that want to transition from w CF to gRPC.
[25:34] That's the most common center that I've found. I currently try to keep
[25:40] an eye on it just because they have some bits that really interest me.
[25:45] And when those bits will be established and mature enough, I think it will
[25:52] generate a lot of traction in the industry around gRPC. And I'm talking about
[25:56] gRPC transcoding, especially Oh you said the T word, Oh yeah, all
[26:03] right, tell us transcoding. So transcoding is a package that you can install
[26:10] and allows you to also call your gRPC service from the browser as you would
[26:17] do with any other HTTP API. But and it does the translation from Jason
[26:23] that you send in the browser to your gRPC service. Now is this different
[26:30] from gRPC web kind of? I mean the thing, yeah, accomplished is
[26:37] the same thing, indeed, But it allows you from the browser to also
[26:42] specify endpoints and to define like routes can bind variables from the routes. You
[26:49] can have body that are bound to different models that you have as a parameter
[26:56] in your gRPC service. So I don't power it's yep, indeed, But
[27:02] now there's a lot of manual work that you need to do in order for
[27:04] that to work in a basic scenario. And what it happens currently is that
[27:11] if you have like an integration project or a unit testing project for your gRPC
[27:18] service, and you also want to add transcoding, bad luck. So nothing
[27:23] will work anymore, no gRPC for you. Yeah, so take your mind
[27:30] off of it, don't go that way. Yeah, things will be hard,
[27:34] and we should take a brief break. Yeah, let's do that.
[27:38] We're gonna pause here for these very important messages and won't be right back,
[27:45] and we're back. It's dot net rock some Carl Franklin, that's Richard Campbell,
[27:48] Yes, sir, and we're talking to Arena skirt you about gRPC.
[27:52] What's new in the last year so far, it's tooling and Azure support and
[27:59] training. I don't know if trans coding is new. It's not necessarily new.
[28:03] Now it's like way better, way better, right, improved, yeah,
[28:08] improved yes? And uh and the WCF problem that's uh, well,
[28:15] this really comes to that core issue, like you're doing all these migrations.
[28:18] What are the typical problems that a dot net dev coming from WCF have trying
[28:23] to understand g RPC? Like where what do you find? You're explaining over
[28:27] and over again. So I think the general the I think the concept of
[28:33] gRPC itself, the fact that it resides and lives under the HTP two protocol
[28:41] and you have these small requests that travel on one single connection. That's the
[28:47] hard beat that developers don't understand at first. And then the fact that you
[28:53] have like different set of heathers poor gRPC requests. You have that concept that
[29:02] is named trailers that comes sent as a response from the server at the end.
[29:11] So there are a lot of new concepts. Yeah. I mean you
[29:15] literally call it headers and then call it trailers. Yeah, and you work
[29:19] with one type for both of them. So a dictionary, right, same?
[29:26] Yeah, So I mean and the point being there called trailers because they
[29:29] come after the data. It's the head of the data. But the type
[29:33] that we you were you use in order to actually add key value pairs to
[29:37] those trailers. It's a metadata type that you can also use to add headers
[29:45] that goes before in your RPC requests. So yeah, it's just a naming
[29:52] problem like the seam streets forward. And yet the words are complicated. It's
[29:56] not the first industry to you confuse headers and trailers. Think of movies,
[30:03] right, right, you see a movie trailer is your introduction to the movie?
[30:07] Why is it called a trailer? It should be called a header or
[30:10] an announcement. But it turns out there's a reason for that because they used
[30:15] to show these double features and days in the theater, and the trailers for
[30:19] the next movie or whatever would come after the first one, right, And
[30:23] they just never changed the name. They just never changed it because it's a
[30:26] word and everybody knows what it is. Right. So but the point I
[30:32] think this is your point arena is like if you work in gRPC metadata,
[30:36] it's going to generate the headers and the trailers as needed. No, it's
[30:40] basically you add some extra concepts to the concept that you already know. Like
[30:45] the h protocol protocol it has headers, right, so you can add key
[30:51] value pairs in there. But underneath these you also add key value pairs that
[30:57] are specific to a gRPC request. And depending on the part where you're adding
[31:03] those with the gRPC request or with the gRPC response, they're called differently,
[31:08] right, So so the header of a response is called the trailer. Yeah,
[31:18] no problem, it's fine. I take off my parachute and okay,
[31:30] I get it, and it is all metadata. So it is good to
[31:33] think in the context of metadata. Let me tell you about the package I
[31:36] want to send, and yeah, some stuff's going to go up front,
[31:38] some stuffs going to go back. It doesn't They don't get too sweaty about
[31:42] that. And even though it's weird due to the fact that this is implemented,
[31:48] it's very helpful because you might have things that don't fit in the message
[31:52] body basically and the request itself, so you have to have a place where
[31:56] to shove those so well, and I appreciate that you don't have a separate
[32:01] set of calls for the header and the trailer and so forth. You just
[32:05] speak to metadata and you can do all the things. So in a lot
[32:07] of ways it's simple. It's just describing it well. It feels challenging,
[32:13] right, But there's also a nuance here if we're talking about different gRPC modes,
[32:17] like when we have the server streaming the server streaming modes or types what
[32:23] sends several GPS responses back to the client, But only after all those messages
[32:31] are finished are sent, you'll get those trailers, right, So this is
[32:37] the way you'll you'll know that, Okay, I'm I'm done, I received
[32:42] all the responses. Here's the trailers. Yeah. Again, it's like the
[32:46] issue here with gRPC is that it can be a lot of different things.
[32:50] It can be you know, a synchronous streamer or just a messaging and so
[32:54] the rules are different. So yeah, you gotta be careful about using trailers
[32:58] and streaming mode because you don't know when you're going to get them. It
[33:00] could be a while. Yeah. Yeah, I like to use gRPC in
[33:04] place of you know, rest API calls to controllers in a regular application,
[33:10] you know, in a Blazer app for example. That's I really love it
[33:15] and of course, it wasn't meant to do that, but it works.
[33:17] It works great fast, and yeah, I mean it's interesting you say that
[33:21] called that it wasn't meant to do that. Yeah, it wasn't built for
[33:23] that. What is gRPC meant to do? Like, it's not just about
[33:27] streaming either. Well, I mean, and we'll take that. I mean
[33:30] it was built for micro service communication, service to service. Yeah. I
[33:35] mean we can start like with a short history. How many of us heard
[33:40] the term micro services, like I'm developing micro services, the team develops micro
[33:45] services, when in fact those are not are just services that respond with Jason.
[33:52] Yeah, and they passed that data to each other with Jason. Yeah.
[33:58] So people defaulted to something that is so called REST, like to describe
[34:04] an API that responds with Jason as a data foremant, right, which made
[34:08] all the rest people angry. What I remember about REST is mostly hearing I
[34:12] was doing it wrong. I have so many beefs, and when we were
[34:15] talking to Grant Barrett about this, I have so many beefs with people who
[34:20] use the wrong word for things, and I just got to learn to let
[34:22] it go and let them play on my lawn. It's going to be okay.
[34:24] You know it's going to be okay, but I still have some Here's
[34:29] one when people describe the Browning Milliard reaction that they get on meat, they
[34:35] say it's caramelizing. No it's not. It's not caramelizing. There's no sugar
[34:39] in me. Little things like that. But people get a word for something,
[34:44] and you know, it's popular, and so then they overuse it and
[34:46] they put it on everything, and it's rest and the RESTful, which is
[34:51] a nuance. I'm happier with rest dish. I'm not going for perfection your
[35:00] voice. I'm just trying to get my wrap to work. Rested, well
[35:05] rested, it's well rested. Best to keep it simple. Yeah, we
[35:08] should just start making up things and asking people on the show. So how
[35:13] long do you let that proof? Well? I use the oiling library oiler
[35:25] and then I wrap it, oh man, and then it's only proofed when
[35:34] doubled, and then you go, you bacon, let it icd to bake
[35:39] a bit ye down the pipeline to the bank. Yeah, we're making work
[35:45] way way too an extreme that I really enjoying. This all started with the
[35:49] metadata conversation in this naming problem, and now we've promptly painted a worse one.
[35:53] You know, I'm presuming that the folks who wrote this, we're trying
[35:57] to do a good job. And it's still you know, there's some challenges
[36:00] here. Yeah, it's a technology that needs to mature, and it will
[36:07] mature enough when people will use it, because otherwise it's just a tool out
[36:12] there that nobody uses and no one will invest in developing it. Yeah,
[36:16] and can you make it simpler? Like it does feel like gRPC is mature
[36:20] enough that we are looking at some simplicity down to the tool links better.
[36:23] Yeah. Yeah, I think we're we're getting there. It is taken a
[36:30] while. Oh yeah, I mean there is a reason for it took for
[36:35] it to took that amount of time. I mean there was no support in
[36:39] Asia. I don't know about a WS, but the only moment where you
[36:45] could use RPC in a real production environment was if you had a virtual machine
[36:52] where you can't run the service. Yeah. I don't really know how many
[36:55] people are doing that anymore. Yeah, that's not a reason to run a
[37:00] VM. Reason running VM is you're trying to get you know, you're on
[37:02] your way off of it. Not that I'm building new things. I need
[37:06] a VM for it. I fairly enjoyed a moment where I had to run
[37:12] APIs as Linux services right machines start though, see what's happening. I was
[37:20] very excited to do that. That's a good way to slow people down from
[37:22] running a VM. You can run a VM, but only if it's Linux.
[37:27] I had to learn if your commands linux pseudo, make me a sandwich,
[37:37] Pseudo, make me a pseudo? What are what is server reflection and
[37:42] how does that play into all of this? So server reflection will allow you
[37:47] to discover what Jersey services you have available inside an endpoint services operations in fact
[37:58] and the tooling. I'm going to talk about tooling, especially about Postman in
[38:02] here, because now it allows you to have like an ur L of the
[38:07] service and your server reflection, and if you have reflection enable on the server
[38:12] side, it will discover what can't you with that swagger for GRPs kind of
[38:17] kind of yeah yeah, And you can also execute those because Postman will generate
[38:23] messages for you domulance, but you can use those in order to call those
[38:29] operations. Nice. Would you use discovery in production or is this really just
[38:34] a tool when you're developing to make it easier to get hooked up. I
[38:37] think it's meant to be used with an API gateway or something like that,
[38:44] right, so sort of a self service discovery. Otherwise I don't see the
[38:47] point too like, I mean, I think it kind of should know your
[38:52] end points right right, and never if you have with this whole we don't
[38:55] know where end points are. Yeah, No, because it's g RPC is
[39:00] meant for point point communication, and that assumes that you know where you will
[39:05] make requests and what should look like. Yeah, because you have the protocol
[39:10] buffers, files and types that describe basically what you have available. Now you're
[39:16] twisting my brain. It was like, am I going to generate the proto
[39:20] buffs on the fly because I've used discovery to making right now just because you
[39:30] could do it? Yep? Yeah, all right, I mean, but
[39:35] I appreciate you want something discoverable, you know, nothing else, just to
[39:38] spit out an error message, right you have a I don't know. This
[39:43] has been a thing for me lately. I kept trying to write a better
[39:45] error message because object not found pisses everybody off. Like I kind of got
[39:50] this reflexed. If we made a call and it failed, then I'd like
[39:52] to invoke the discovery and include it in the log. So it's like,
[39:57] hey, you know, I failed to make this call, but I did
[40:00] the discovery on it, and this is what it's actually expecting. Like you've
[40:05] just shortened everybody's pain up a whole bunch, right, you know, I
[40:07] have to go back and look. It's like at the moment when I made
[40:09] this call, this is what it was expecting, and this is what we
[40:13] SENTENCEDEAD. Yeah, but to be here reflections So far, for me,
[40:17] it has been useful just to play around to discover like what's available on the
[40:22] path that I know, and with Postman because it allows you to like load
[40:29] the live RL and to see what's there and to invoke it for testing purposes
[40:34] of course. Nice. Yeah, and you like those tools, so it
[40:37] just gives you confidence of what's going on. Oh yeah, I mean I
[40:39] always prefer a tool where I can click three buttons to make sure the thing
[40:45] that I want it to work works. Then I'll manually create a client try
[40:51] to debugget see what's the error if any, so it's easier. Yeah,
[40:55] I like that. I have a question for you, a particular question about
[41:00] streaming in gRPC which I've been doing for a while, but I'm not really
[41:04] sure what's going on under the hood. So in your protofile, if you
[41:07] have an RPC that returns a stream of you know, some message type that
[41:15] instead of you know, a repeated message type, then when you implement that,
[41:22] you would think that there would be an I sink enumerable in there somewhere.
[41:29] But instead what you get is the request and an I serve stream writer
[41:35] of your type, you know, and then a server call context and then
[41:40] you basically can just await you know, response streamed dot write a sink whatever
[41:45] your object is in a loop and it you know, I would I was
[41:51] expecting an I sink numerable in C sharp. Is that's what's actually happening under
[41:55] the hood, To be fair, I don't know for sure, but to
[41:59] be fair, I don't think that is what happening under the food And I
[42:04] think they allowed us to have that stream reader writer because you have the both
[42:12] just to make it as low level as they can. Yeah. So you
[42:15] have this stream, your job to do whatever you want with it. Yeah.
[42:20] I realized this is an answer I could easily find by going and looking
[42:22] at the source code and get hub. But I just wondered if you knew.
[42:28] I'm sorry, I'm going to air quote easily. Yeah, easily.
[42:34] You're right. I can. I can answer this question myself because I can
[42:37] go and look at the source code, cut and paste it into get Up
[42:39] Go. Pilots say what the hell does this mean? I can't ask chat
[42:43] jipity. I was just gonna say, or you could ask chat jipity.
[42:45] Yeah, we all went to the same thing. Give me a large language
[42:49] model is going to answer this question for me? Yeah? Not? Do
[42:52] I trust it? That's yeah, Now it wasn't correct. How would you
[42:54] know? It's like it's a great summarizer. If it wasn't a great summarizer,
[42:59] how would you you know? Yeah, sounds good, but always search
[43:04] and research of the fact that chad jipt gives you. Yeah. Yeah,
[43:07] you can say where what what's the get up page where you found this answer,
[43:12] and they'll say, I have no idea where on Google? I'm sorry,
[43:15] this was derived from a from a mirror site on four chance, so
[43:20] it must be correct. Oh my goodness. Okay, we were talking about
[43:24] gRPC. I mean because it's good. It's really good. As much as
[43:30] I think we've been hard on it today. Yeah, I know, it
[43:31] really is amazing. Yeah, but I appreciate tools like Postman, like,
[43:36] oh okay, yeah, if I was learning my way around gr PC starting
[43:39] to play with requests through Postman, so you can watch the interaction, that's
[43:45] awesome. That's awesome. Yeah, that's good stuff and get started. And
[43:49] it also makes the binary human readable, which is awesome for Postman because at
[43:57] first that was a show stopper, like how can I a thing that is
[44:00] binary? I don't know how to decipher binary? So this will makes it
[44:06] way easier. So training is a big part of what you do. Are
[44:09] there any regular classes that you teach online where we could learn this stuff?
[44:14] Not? Up until now, I'm basically working on business to business contracts.
[44:21] So there are companies if they called me, hey, we need to learn
[44:24] about this or that, I can provide them some trainings around it. So
[44:29] if somebody who's interested in how many what's the minimum number of people that you'd
[44:32] want to teach too? Minimum? I did it for five people because the
[44:37] company wanted one, right, But to be honest, I always prefer like
[44:46] having a bigger group of people. Sure, so the questions are way easier
[44:52] to answer because from thirty people or fifteen people, you'll always find some questions
[44:59] that are into and they will start debates. And I always love the interaction
[45:02] with you put your hands back, sit back. Now the classes it's called
[45:07] by itself. See what I started. Yeah, but it's everybody working on
[45:12] one project and you can get into a discussion about the project like that's that's
[45:15] good to do, yeah, without a doubt. But you also had some
[45:21] online training stuff too, some videos maybe oh yeah yeah, yeah, uh,
[45:28] forget about those. No I'm joking, No, I'm joking. Oh
[45:35] it was so hard to record record those. It's a whole new type,
[45:38] so different. Oh yeah, a different life. Yeah. So uh oh
[45:46] yeah it's hard. So uh big thumbs up for people that are doing this
[45:52] for a living or full time their content creators. And to put your cell
[45:57] phone camera and to speak like coherently. Yeah, it's it's a thing.
[46:04] Yeah, So coherently coherence comes with editing though, you know that's the good.
[46:08] Yeah, if you know how to like take breaks or have stop words.
[46:15] And I learned that the hard way. I do that. I subscribe
[46:19] to the max Headroom style of editing, where everything I just jump cut all
[46:22] the time. Yeah. As long as you can hear me and understand me,
[46:27] you can put up with a twitch or two. Yeah I think that
[46:30] and the hard hair. Yeah yeah, exactly my mom up. So if
[46:38] anyone wants to to learn more about gRPC, I have a class around four
[46:45] hours around g RPC from zero to Hero. You can find the link on
[46:51] my blog. It's there with a small discount. Excellent. Yeah cool.
[46:55] So what's next? What's on your what's in your inbox? To be here?
[46:59] In need or want to start a YouTube channel, I have a gazillion
[47:04] plans. Man. Oh yeah, meteor, because I said I did this,
[47:08] I did the course. It's hard. It might be some learning curve
[47:14] for me with YouTube tool, but it might also prove useful. Well.
[47:19] Feel free to reach out to me because I've been doing it for a long
[47:21] time and if I can help in any way, I will. For sure.
[47:24] I'm gonna book a slot in your calendar. You got And of course,
[47:30] by the time this show comes out, we'll have already been to NDYC
[47:32] London and back again. But I will you and I will see each other
[47:35] in the NDC London. Yep. Very good. Anything else that we forgot
[47:38] to talk about arena. Nothing that crosses my mind. All right. Well,
[47:44] on that note, let's call it a show. Thanks very much for
[47:46] spending this time with us. It's always great to talk to you same,
[47:50] Thank you. All right, We'll talk to you next time on dot net
[47:52] rocks. Dot net Rocks is brought to you by Franklin's Net and produced by
[48:19] Pop Studios, a full service audio, video and post production facility located physically
[48:24] in New London, Connecticut, and of course in the cloud online at pwop
[48:30] dot com. Visit our website at d O T N E t R O
[48:34] c k S dot com for RSS feeds, downloads, mobile apps, comments,
[48:38] and access to the full archives going back to show number one, recorded
[48:43] in September two thousand and two. And make sure you check out our sponsors.
[48:47] They keep us in business. Now go write some code. See you
[48:51] next time you got javans My is home, then my Texes in a line. Credit ballh

Shows are listed from Apple Podcasts' charts and directory, and Podcast Index where it is used. Every show and episode belongs to its publisher and plays from the publisher's own feed; this site hosts none of them.
