We’ve been talking about high performance datagram scenarios but have so far used a contrived sample of sending mostly fixed size strings — not so realistic. That will change today, as we turn to one of the more famous datagram…
Building an adventure game: part 4
Welcome to the fourth and final installment of my adventure game saga. We made it up to Day 15 last time. Let’s finish this up now. Day 16 I don’t like that the method to add an item to a…
Building an adventure game: part 3
I last left off on Day 8 of my adventure game project. We continue from Day 9 today. Day 9 After warming up with a simple rename, I decide I don’t like how TextConsole and InputLoop interact. If I want…
Building an adventure game: part 2
Previously, I recounted day 1 of my adventure game project. Let’s continue. Day 2 This was a short day. First I observe that it isn’t really necessary for the caller of Game to pass the MessageBus, so I change that.…
Building an adventure game: part 1
I have written before about my early experiences with text adventure games and about how I built a GW-BASIC translator to convert one such example game to C#. It was a fun challenge but was admittedly more of a compiler…
A simple message bus: Java edition
In the previous post, we looked at competing message bus implementations in C# and C++. How about we give Java a try now? Converting to Java syntax and style conventions, the SendOneSubscriber test should look like this: Alas, there is…
A simple message bus
The message bus is a typical pattern to allow loosely coupled software components to communicate, usually in an event-driven manner. Don’t let the enterprise-y description deter you — a simple message bus for a single process scenario can be quite…
Operation throttle: part 2
Last time, I introduced the topic of fixed operation rates and how one might implement this functionality with ad-hoc code. Today, I will generalize the concept with a simple Throttle library. As I mentioned before, we have to keep track…
Operation throttle: part 1
A while back I discussed some design points relating to fixed concurrency, such as when attempting to ensure a constant number of simultaneous active requests throughout a load test. Today I will jump back to the single-threaded world and discuss…
Find the issue: tainted strings
In a previous post, we introduced a wrapper object for some method parameters: In terms of encapsulation and validation, this was a marked improvement. But there is one critical issue here. Let’s zoom in on the auditMessage parameter. In context,…