27
May 14

Django’s Master/Slave terminology row

For those who’ve missed the original thread (oh, how much you’ve missed, not), it’s here.

For those wondering how you should think about this, it goes like this:

Can you stop using those terms please, they’re not nice.
What, seriously?
Yeah, seriously.
Oh. Okay, well we have these other terms that have been around for decades and are actually slightly better at describing the kind of systems we’re building these days. Cool?
Cool, thanks.
No worries.

For those wondering how it actually went and don’t want to waste your life reading the nonsense in the original thread:

Can you stop using those terms please, they’re not nice.
OH GOD THE WORLD IS ENDING YOU’RE SO STUPID THEY’RE JUST WORDS YOU’RE DELUSIONAL THIS IS RACIST THIS IS PC GONE MAD

Hmmm. Here’s a hint folks, there are hard things in distributed database design. Handling (and even detecting) split-brain scenarios to ensure data consistency even in the presence of partition failure. Dealing with latency issues and the performance penalties they cause. The whole CAP balance problem in fact and the the entire related debate around SQL/noSQL. And a wealth of other problems both big and small, related both to design and implementation. An entire industry of people spend their professional lives working on those hard problems and there still aren’t enough people to handle all the problems.

Whether to call a specific replication design “master/slave” or “active/passive” is just not on the list of hard problems. Honestly, it’s not. Someone has a genuine problem with the “master/slave” terminology, and many others have had the same problem with the same terminology for years? Quit whining, be a better person, use another terminology and get back to work.


03
Apr 14

gdb’ing through a function pointer into a template

Take this (badly mangled to save the names of the guilty) chunk of “code” and run it through the Intel C++ compiler with any -g option you want:


class C {
private:
int (functionA*)(args);

C(){
functionA = functionB;
}

functionC(args) {
rc = (this->*functionA)(args);
}

template int functionB(args) const {
/* some code */
}
};

Now try debugging functionB when it’s called via functionC using gdb. In particular, try looking at the args fed to function B.

Now weep for your soul. And TotalView won’t help you now either buddy. You’re down to objdump -t library.a | c++filt | grep functionC and setting some stupid-looking C++ mangled name out of the mess you get back as the breakpoint in gdb.

There has to be a better way…


22
Jan 14

Erlang Token Ring Simulator, updated

ErlangThere’s a directory on my machine called ~/Archives. It’s not exactly… organised. 🙂 It contains bits and pieces from the last 20 or more years – and along with the usual documents, notes and datasheets on the 74 series TTL chipset (computer engineer and computer scientist had rather different flavours in TCD back then), there’s a fair amount of code. Some of that code I can remember, other bits I look at now and think “I wrote that? Eeek…” — but there’s a small amount of code that I look at and think “Hey, I wasn’t all bad back then”. Over the new year’s holiday, I was digging around in there and came across some bits and pieces from the latter category that I thought I’d put up here for kicks, seeing as how I’d put up stuff from the PhD work and other bits and bobs already. I’ll start with this one, it’s a token ring network simulator written in Erlang somewhere in the first half of my final year in college (so late 1996 to early 1997). Continue reading →