Retrofitting Single Tasking Applications with Parallel Paradigms?
We do pause and wonder when we hear some of the many ad-hoc attempts that software providers are using to take advantage of multicore processors. It's not that we believe that serial processing or single tasking software can't be retrofitted. It's really a matter of whether the architecture and foundation of the original software can handle the retrofit.But to be clear, the term retrofit here is a kinder, gentler way of referring to the paradigm shift we've been talking about. Yes, the question is whether the original architecture of the application can sustain a paradigm shift. Sometimes we talk about whether an architecture is scalable, or whether a module is extensible. But scalability and extensibility are usually understood within the context of a single paradigm. Because of the shift in processor technology we're faced with some pretty dramatic changes in software paradigms. Can our software architectures and foundations withstand these paradigm shifts? Are our architectures flexible enough to support multiparadigm design and programming? How will our application designs handle the introduction of heterogeneous modules (some sequential, some parallel)? How will the documentation of the system change? How will the maintenance of heterogeneous and multiparadigm modules go forward? In the most simplest terms how do we know that after adding multithreading and multiprocessing to an existing application that the application will still work and that it will be maintainable and if necessary extensible?
It's all about the software blueprints. The architecture, models, and paradigms are captured in the software blueprints. Clean architectures that support multiple paradigms, models where sequential tasking is just a special case of parallel tasking are the best case scenario. But if your software blueprints and architecture are suspect, then all bets are off. And if you're forced to retrofit anyway, what recourse do you have? First, there are no shortcuts (there are if reliability is not a concern). Second, the paradigms and models that are inplace in the current application will have to be well understood and brought into formal methods or languages if they are not already there. Once the current system can be accurately described at the model and formal language/method level then the work of determining whether, how, or if the application can sustain the paradigm shift (retrofit) can begin. Warning, this kind of work is not for the faint of heart. Abstraction, formal language specification, logic programming, and model checking are in the crystal ball. Stay tuned.