Software System Design

When designing a system for long-term, uninterrupted usage, a few things need to be taken into account:

Nothing pisses me off more than a system that needs to be restarted simply because it's been running too long. Or that dies because you use it's supplied tools to kill off users. Microsoft SQL server has a facility whereby you can kill processes/users. This implementation is fairly good. Other software, which shall not be named, has this nasty tendency to lock up whenever you kill a user. So how do we solve this problem?

Object oriented programming languages give us this ability. I'm going to use C++ as my baseline, because it's the language I'm most skilled in, although Java also offers great flexibility with regards to this. First and foremost, we have to deal with resource allocation. In most client-server applications a certain amount of data is kept about session state regarding connected clients. In some cases, clients will need to be forcibly disconnected; all resources belonging to that client, including mutexes, events and sockets, will need to be freed as well. In C++, allocators grant you a bit of flexibility here: