GeePaw Hill Profile picture
Aug 22, 2019 20 tweets 3 min read Read on X
UDispatch #2: The Second Layer

The first layer is the handy UI-capable bulk reverse-proxy, and the next thing we layer on to it is generic traffic inspection.
(I should so not be writing this up right now. I got other fish to fry. But there are some blockers I'm waiting on, and I have a little time, and I just feel like mapping it out further.)
Once we have that first layer running, we've got on our local box 1) our downstream app development environment, 2) UDispatch. All the traffic from our downstream goes *through* UDispatch, and this fact exposes the second layer of functionality: render it well.
Remember, this is all related to the upstream-centric architecture stuff we've been talking about lately. What we're after is killing off some very common waste in the *making* of such apps.
A huge source of that waste: "what happened?" Your code calls this service, and that service, and the other, and renders a really nice fat NPE direct to your user. WHY!?!?
Generally speaking, what happened is one of two things: 1) you're cute but somewhat dim and you wrote bad code to combine the responses for your own downstream. 2) one of your upstreams said some random crap it shouldn't have, and you haven't accounted for that yet in your code.
Well, let's go figure out what you said to the upstreams and what the upstreams said back to you. If all that looks good, we *know* it's "cute-but-dim". If all that looks borked, we're a lot closer to finding our problem.
There are several ways one could go about it. You could go read their logs. You could go read your own log. You could add println's. You could get a generic packet-sniffer. You could copy/paste your query into postman. You could run it again and see if it goes away.
You could fire up the debugger. You could ask your next-door-neighbor if the fritzengorple service is down again. You could double-check that you typed your endpoints right. You could run it a third time and see if it goes away.

You get the drift.
Or. UDispatch is sitting right there. Open it and see *all* of the traffic, request & response, to *all* of the upstreams, in the order in which it was sent/received, with generic rendering of the results in an easy-to-view form.
You could filter it. You could drill to any aspect of the HTTP protocol. You could spot that 500, that security fail, that springboot html endpoint-not-found.
And this is the second layer of value that UDispatch brings to the table. Because all your downstream's traffic runs through UDispatch, it can remember and render any of it. It can render request/response as pairs or as separate sequences.
HTTP traffic is often quite recognizable, regardless of source. HTML, JSON, XML, and SOAP-over-HTTP are all pretty easy for a computer to detect. UDispatch gives you tabs for each item it recognizes.
It *always* recognizes HTTP, so there's always a tab for that. When it recognizes JSON or XML or HTML, there's tabs for that, too. And they don't just show you the ASCII. ASCII is technically human-readable, but in these formats it's usually perfectly human-incomprehensible.
All three of those protocols are tree-shaped. If we had one good way to show a tree, we could use that same way for all of them. (If it's HTML we could also show a browser-render.) You getting a feel for this?
So. If the first level of function is just a fancy bulk reverse-proxy thing, the second level is just a fancy traffic-sniffer-visualizer.
Notice: Both of these tools exist in the wild. You can try to COTS-ify it all together. But the thing that's so handy about UDispatch is that it's already fit specifically to *your* task: developing *your* downstream that has a bunch of upstreams that are themselves changing.
It knows *your* upstreams. It knows *your* sets. It knows *your* downstream. A standard reverse-proxy just knows endpoints. A standard sniffer sniffs *all* traffic, and the best ones sniff IP not HTTP.
So now you see the first two layers unfolding. It gives us a little more than a little. If UDispatch stops right there, it's still handy. But it doesn't. There are more layers that can be built on those first two. Descriptions coming soon to a muse near you.
Okay, dayjob calleth. It's still just "warm" here, with scorching right around the bend.

Have a scorchin'-hot day of geekery!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with GeePaw Hill

GeePaw Hill Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @GeePawHill

Nov 19, 2022
In today's episode of Stupid Geek Tricks, I just basically invented Smalltalk using Kotlin.

Before you get angry, please know that I don't approve of this. I don't approve of a lotta shit I do.
120 lines of code. A marker interface for messages, a one-API interface for objects. Any class can handle any message it chooses to. Didn't bother with doesNotUnderstand, but it'd be an easy add.

gist.github.com/GeePawHill/2d7…
Conceptually, it's straightforward: the Interactor wraps a Thing to give it a jump table that switches on the message subclass. It calls the Thing's register() to fill out that jump table. Any given Thing class can register any given Message+Handler pair.
Read 31 tweets
Nov 18, 2022
What is my favorite 20th c song from Broadway?

Oh my gosh, I'm so glad you asked.

[Editor's note: Nobody asxked this. No one. Not one. Nobody asked this.]
Well, of course, it's "At The Ballet" from _A Chorus Line_.

I grew up on stage, community and then semi-pro theatre. I worked 4-8 production a year from the time I was 7 until about 20 years old.

In *Kansas*, yo, in Kansas.
Read 13 tweets
Nov 18, 2022
Anyway, all and sundry, "geepawhill" is not a common moniker. Find me that way. I'm on mastodon, but I also have a whole website, geepawhill.org.
Backstory: "geepaw" means "grandfather", and now, to look at me, it seems obvious. Of *course* this bitter old fucker is a grandfather, just look at him. But "GeePaw" is actually a name I've had for over 30 years.
See, my wife is a little older than me, and when we first got to the bouncy-bouncy, her kids were already almost grown. I was present in the hospital room when my grandson was born. (It was gross.) And I became a grandfather at the ripe old age of 31.
Read 9 tweets
Nov 16, 2022
Please, I'm sorry, please, remember through all this Elon-is-evil-and-stupid shit, remember, please, I'm sorry, please.

This ass-clown *bought* this place where you made community, he didn't steal it. And he *bought* it from the people who sold it to him.
Baby, you were so sure you were the customer, all along, and so mad to discover you were product, all along.
*Fucking* mastodon. There's servers. There's CW's, and bitchy people on your server telling you to CW your random rage-tweets. There's no funded algo stuffing your timeline, just your server's locals and your follows and their follows.
Read 6 tweets
Nov 16, 2022
Jussi Bjorling, "Nessun Dorma".

I once did a bake-off. It was in the early days with spotify, and spotify is the king-hell site for bake-offs. Type in "nessun dorma" and get 500 takes.

So I listened to maybe 200 or so, and I put together a CD of about 20 of them.
And one night -- yes there were substances involved -- I played it for my wife, and we listened to all 20 takes, and we chose our top 3. No commentary. We just listened, and chose our favorites.
Read 6 tweets
Nov 16, 2022
Bob Marley & The Wailers, "Redemption Song". vimeo.com/390484832
Late at night, when no one's around, or they're all abed, or I'm drunk and I don't care, I sing this to the trees outside my house.
My range is very narrow, and it straddles right there, alto and tenor, and I'm old, a practioner of many vices, across many decades. But I sing it, and it fits in my range, and singing it makes me feel good.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(