Optimizing the Software Architecture for Extensibility in Hard Real-time Distributed Systems