Multi-Tier Programming
Matthias Neubauer · FreiDok plus (Universitätsbibliothek Freiburg) · 2007
Multi-tier applications are traditionally designed in the style of a client-server architecture, forcing different parts of the system to be split up into separate modules that are targeted for different platforms. Even though the advantages of a modular design are apparent, it is questionable whether choosing a multi-tier architecture for the physical design of an application should also dictate its logical design. Not to forget that the increase in complexity as the result of manually developing a distributed application can raise the occurrence rate of bugs considerably. In this thesis, we provide the basic building blocks for a sequential multi-tier programming language. Such a language would allow programmers to write multi-tier applications in sequential style instead of having to write distributed code manually. Henceforth, the process of modularizing the program code into components targeted for the specific tiers could be handed over to a (semi-)automatic tool. To realize the process mentioned above, this dissertation proposes an approach based on two pillars: firstly, on an algorithm for computing an optimal modularization, and secondly, on a transformation scheme that generates a distributed program with the same semantics as the original sequential program. The first pillar focuses on the theoretical background of a placement inference system. This system automatically assigns a correct placement to a sequential program, characterizing a potential distribution of code. Such a placement is needed as input for the succeeding steps of transformation. Elements of the first pillar are an intermediate language expressing the timing behavior of distributed programs, a constraint-based placement analysis, and a constraint solver determining all valid placements for a program. Through devising a cost model for distributed programs, it is possible to estimate the worst-case runtime behavior of a program with a given placement. Optimal placements are computable by determining placements with minimal worst-case behavior. The second pillar presents a program transformation scheme which, by going through a series of intermediate languages, transforms a sequential program with the support of a placement into a distributed counterpart that uses explicit communication primitives. The intermediate languages are formally defined by operational semantics and static type systems with annotated types. The transformation steps of the scheme are formally specified by either equational rules or translations between two calculi. For onemajor step of the transformation scheme, namely the shift from a message-based to a bidirectional stream-based communication paradigm, the thesis provides a formal correctness result using the bisimulation proof method.