Ultra-Stable Software Design in C++? 690
null_functor asks: "I need to create an ultra-stable, crash-free application in C++. Sadly, the programming language cannot be changed due to reasons of efficiency and availability of core libraries. The application can be naturally divided into several modules, such as GUI, core data structures, a persistent object storage mechanism, a distributed communication module and several core algorithms. Basically, it allows users to crunch a god-awful amount of data over several computing nodes. The application is meant to primarily run on Linux, but should be portable to Windows without much difficulty." While there's more to this, what strategies should a developer take to insure that the resulting program is as crash-free as possible?
"I'm thinking of decoupling the modules physically so that, even if one crashes/becomes unstable (say, the distributed communication module encounters a segmentation fault, has a memory leak or a deadlock), the others remain alive, detect the error, and silently re-start the offending 'module'. Sure, there is no guarantee that the bug won't resurface in the module's new incarnation, but (I'm guessing!) it at least reduces the number of absolute system failures.
How can I actually implement such a decoupling? What tools (System V IPC/custom socket-based message-queue system/DCE/CORBA? my knowledge of options is embarrassingly trivial :-( ) would you suggest should be used? Ideally, I'd want the function call abstraction to be available just like in, say, Java RMI.
And while we are at it, are there any software _design patterns_ that specifically tackle the stability issue?"
I'm gonna take a guess, but.. (Score:5, Funny)
Re:Get another programmer (Score:5, Funny)
It's simple, really (Score:4, Funny)
Use TPS reports [wikipedia.org]. You'll thank me later.
+5 Funny (Score:2, Funny)
Re:I'm gonna take a guess, but.. (Score:0, Funny)
BRB
Forget it. (Score:5, Funny)
Those are low-level programming-jock languages disguised as high-level languages. As long as the punks who program them will have pissing contests in code obfuscation, you can count on having buffer overflows and memory leaks.
Congratulations! Nice Work! (Score:5, Funny)
From zero to flame war in under 20 words. Well done!
Re:You're not the first one.... (Score:5, Funny)
Re:Yeah, c++ hasn't been successfully used before. (Score:2, Funny)
Obvious ! (Score:5, Funny)
Thomas-
Ultra-stable? (Score:1, Funny)
Requirements like that make me glad I gave up programming to fish for salmon in Alaska.
TSP is the answer. All Hail TSP. (Score:2, Funny)
Re:You're not the first one.... (Score:5, Funny)
Referential transparency. [google.com]
That comp.lang.functional thread is interesting because there are guys from Ericsson elaborating on some real-world aspects of referential transparency. As you know, Ericsson uses the funtional programming language Erlang for their switches. See more in: Welcome to a Smarter Way of Programming [erlang.se]. Of course, you can't take their use of Erlang seriously, because they're from Sweden, and Sweden, being a fucked-up third-world country with no tech at all, is not an example for America. The mighty AT&T pushed C++, and now the world is better, safer place, where software errors are a thing of the past.