Message-Based MVC Architecture for Distributed and Desktop Applications
Total Page:16
File Type:pdf, Size:1020Kb
Message-based MVC Architecture for Distributed and Desktop Applications By Xiaohong Qiu B.S. Beihang University, 1991 M.S. Syracuse University, 2000 DISSERTATION Submitted in partial fulfillment of the requirements for the degree of Doctoral of Philosophy in Computer Science in the Graduate School of Syracuse University May 2005 Approved __________________________________ Professors Kishan Mehrotra and Geoffrey C. Fox Date ______________________________________ Abstract The goal of this dissertation is to develop a paradigm for the next generation of software applications with a clear architecture that unifies desktop and Internet applications. It is aimed at addressing the issues of leveraging existing software assets and incorporating advanced capabilities including collaboration and universal access. As the overall Web systems design on top of the Internet is extremely complex, we divide the task into two separate layers: message-based distributed application architecture and underlying messaging infrastructure linking services together as part of a distributed operating system. This dissertation presents a new approach to building applications as Web Services in a message-based Model-View-Controller (M-MVC) architecture. The premise of this research is that distributed and Web applications which provide services and interface to end users ought to be centered on message exchange. This encourages good design and is an embodiment of the fundamental communication pattern of human interactions. The research investigates a universal modular design with publish/subscribe messaging linkage service model that converges desktop applications, distributed applications, and Internet collaboration. This approach allows: maximum reusability of existing components; flexible messaging scheme with high scalability; and automatic and effective collaboration with interactivity of rich media Web content for diverse clients over heterogeneous network environments. In addition, the approach suggests a uniform interface for the next generation Web client with ubiquitous accessibility. We apply this architecture to the quite complex example of a Scalable Vector Graphics (SVG) browser and give detailed performance measurements to demonstrate the viability of the approach. © Copyright 2005 Xiaohong Qiu All rights Reserved Acknowledgement My research work of the dissertation started in 2000 and ended in 2005 and built on earlier work while I was studying for my Masters degree. This is an extraordinary experience in my life. I feel great thankfulness to the people who have given me this opportunity to exploit my potential to meet challenges and fulfill my research objectives. Especially, I would like to sincerely thank Dr. Geoffrey C. Fox for his insight and vision that enables me to involve into leading-edge research work. Professor Wei Li at Beihang University first showed me the excitement of quality research. I would like to thank Dr. Kishan Mehrotra, who has been supportive to my work and encourages me for making good progress. I appreciate all the people first at NPAC at Syracuse University and then in the Community Grids Lab at Indiana University who created a great atmosphere for research. Finally, I feel great gratitude to my parents and son. Without their devotion and substantial support, I couldn’t have gone so far. Table of Contents 1 Introduction................................................................................................................... 1 1.1 Motivation............................................................................................................... 5 1.2 Statement of problems and insights ........................................................................ 8 1.3 Why message-based MVC?.................................................................................. 11 1.4 Design features of M-MVC and collaborative paradigms.................................... 21 1.5 Contributions......................................................................................................... 27 1.5.1 Research achievements .............................................................................. 27 1.5.2 Significance of research............................................................................. 28 1.6 Summary of the dissertation ................................................................................. 33 1.6.1 Scope of research ....................................................................................... 33 1.6.2 Research questions..................................................................................... 34 1.6.3 Methodology.............................................................................................. 36 1.6.4 Organization of the dissertation................................................................. 39 2 Survey of Technologies............................................................................................... 42 2.1 Event-based programming.................................................................................... 42 2.1.1 Concept of event-based programming....................................................... 42 2.1.2 Event models and publish/subscribe mechanism....................................... 44 2.1.3 Summary.................................................................................................... 50 2.2 MVC ..................................................................................................................... 51 i 2.2.1 MVC Concept ............................................................................................ 51 2.2.2 Communication mechanism ─ method-based versus message-based approach.................................................................................................... 54 2.2.3 Decomposition strategies........................................................................... 57 2.2.4 Interactive patterns..................................................................................... 56 2.2.5 Summary.................................................................................................... 58 2.3 Messaging ............................................................................................................. 58 2.3.1 Why messaging? ........................................................................................ 58 2.3.2 Messaging middleware .............................................................................. 63 2.3.3 Summary.................................................................................................... 64 2.4 NaradaBrokering................................................................................................... 65 2.5 DOM ..................................................................................................................... 67 2.5.1 DOM, HTML, and XML ........................................................................... 67 2.5.2 DOM structure ........................................................................................... 69 2.5.3 DOM event model...................................................................................... 71 2.5.4 Summary.................................................................................................... 75 3 M-MVC Architecture ................................................................................................. 76 3.1 Characteristics of distributed applications............................................................ 77 3.1.1 Human computer interaction...................................................................... 77 3.1.2 Distributed application and user interaction .............................................. 78 3.1.3 Summary characteristic of events and distributed applications................. 80 3.1.4 Summary.................................................................................................... 83 ii 3.2 Web Service pipeline model ................................................................................. 84 3.3 Message-based MVC (M-MVC) .......................................................................... 86 3.3.1 Comparison of MVC model and Web Service pipeline model ................. 86 3.3.2 Generalization of MVC and Web Service pipeline model ........................ 89 3.3.3 Summary.................................................................................................... 92 3.4 SMMV and MMMV Interactive patterns ............................................................. 92 3.5 Related Work on MVC ......................................................................................... 94 3.6 M-MVC and messaging infrastructure with publish/subscribe scheme ............. 101 3.7 M-MVC and Web Services................................................................................. 103 4 Monolithic SVG experiment .................................................................................... 106 4.1 Summary of SVG................................................................................................ 106 4.2 Summary of Batik SVG browser ........................................................................ 108 4.2.1 User interface of SVG browser................................................................ 108 4.2.2 Architecture and implementation of SVG browser ................................. 111 4.3 Intercepting events in Batik SVG browser ......................................................... 114 4.4 Properties and structure