Quantcast
Channel: xxcoder
Viewing all articles
Browse latest Browse all 10

Where am I? I’m repairing my shared event-dispatching system….

$
0
0

So, it turns out that the whole shared event bus concept is totally old-hat. And I don’t mean Java 1.0 old-hat, I mean some time between the primordial slime and the first organisms that had cells that weren’t all identical.

Disclaimer: the following is an analogy and my biology knowledge is sketchy.

Most interesting creatures, including humans, use hormones to allow decoupled systems (organs and stuff) to respond to changes in each others’ state. The shared event bus is your blood stream, and the hormones are the events. Some parts of the body monitor state – hydration, blood sugar, sodium levels, infection markers … – and when they detect that the system is going out of whack they release those little event hormones in appropriate quantities. Other organs listen for those hormone events and then react accordingly.

In some cases the listener is even double-decoupled (a phrase I have liked for a long time). For example the hypothalmus releases one hormone event, the pituitary picks up that event, considers it in the presence of a few others and releases another hormone event, and then the kidneys, adrenal glands and many other organs get busy in response. And sometimes they even release another hormone event that – say – the pancreas is totally interested in.

At least that’s the idea.

Unfortunately my shared event dispatching system is borked.

My key event dispatcher has stopped dispatching some important events, and some of the organs got so bored of never hearing anything of interest to them that they’ve tuned out (or actually decayed).

This means that all those automagic processes that the body takes care of without us even noticing – balancing fluids, electrolytes, blood sugar, immune response, wakefulness and so much more – aren’t automagic anymore. In a nutshell I have a kind of “diabetes of all the things”, known as Addison’s.

The joy of the reproducible bug

The good thing about the diagnosis is that after several months – or maybe even several years – of bizarre and seemingly random errors (crazy stuff like stopping breathing in response to a cold drink), we’ve finally tracked down the problem to a core bug, and it’s reproducible! Of course the borked-build is already installed, but it can still be patched. Phew!

The patch consists of me, a set of drugs, a handful of gadgets that measure stuff and the willingness to manually monitor and control systems that we normally expect to be automatic. Basically, I have to dispatch my own events. Mostly just by swallowing pills but sometimes by injecting myself deep into muscle or direct into a vein (which some teenage version of me thinks is kind of fun).

The patch also requires enormous amounts of support from my GP, diabetes nurse, endocrinologist, endo nurses, pharmacist and the NHS in general, who collectively saved my life in March when I was much closer to blue-screening than any of us had realised. The fact that I get all of this care without ever being asked whether I’d like to pay by cash or card, is amazing.

I’m not quite at beta version of Stray 2.0 yet, but I’m getting there, agile style, one new use-case at a time.

So – there you have it, my quietness – and indeed my exit from the Robotlegs team, though I didn’t know it at the time, I just knew that I didn’t have the energy for everything on my plate – is all down to my need to master this manual event-dispatching business. As most of team try{harder} said – “shoulda used Signals!”

 

 

 


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images