Abstract
Actively used software applications must be changed continuously to ensure their utility, correctness, and performance. To perform these changes, programmers spend a considerable amount of time and effort pinpointing the exact locations in the code to modify, a particularly hard task for distributed applications. In distributed applications, server/middleware misconfigurations and network volatility often cause performance and correctness problems. My dissertation research puts forward a novel approach to facilitating the evolutionary modifications of distributed applications that introduces a novel automated refactoring—Client Insourcing. This refactoring transforms a distributed application into its semantically equivalent centralized variant, in which the remote parts are glued together and communicate with each other by means of regular function calls, eliminating any middleware, server, and network-related problems from the list of potential problem causes. Programmers then can use the resulting centralized variant to facilitate debugging, security enhancements, and fault-tolerance adaptations (Some of the preliminary work of this dissertation is described in a paper accepted for presentation in the main technical program of ICWE 2019 [4]).
Advisor: Eli Tilevich.
You have full access to this open access chapter, Download conference paper PDF
Similar content being viewed by others
Keywords
1 Problem Statement
Distributed computing has become a de-facto standard execution model for the majority of application domains. Web-based applications, mobile applications, IoT setups, embedded systems—all make use of remote execution. It is well known that the majority of software engineering effort and costs is spent on software maintenance and evolution [5, 6]. In distributed applications—adaptive, corrective, and perfective modifications are particularly hard, due to the potential presence of server/middleware misconfigurations and network volatility. These mainstay conditions of distributed execution hinder the most important phase of the maintenance process: determining the exact causes of problems to solve and the locations in the code that implement them.
In my dissertation, I explore a new approach that facilitates a large class of evolutionary modifications in distributed applications. This approach puts forward a novel, domain-specific automated refactoring—Client Insourcing—that moves remotely executed functionalities to be executed locally, thereby creating a semantically equivalent centralized version of the distributed application. This centralized version is then used to perform evolutionary modifications.
The cognitive load required to understand, trace, and modify the source code is much lower for centralized applications than for distributed ones. Distributed applications have a complex control flow and suffer from partial failure, being affected by their middleware frameworks, distributed infrastructure configurations, and network environments. The novelty of my research is in reducing the problem of evolving a distributed application by enabling programmers to operate on its equivalent centralized version. Of course, not all software evolution tasks are amenable to this approach. Hence, one of the objectives of my dissertation is to determine this approach’s exact range of applicability.
2 Related Work
The research community has extended a considerable amount of effort to facilitate the comprehension and evolution of distributed applications. In modern enterprise software development, the remote parts of a distributed application are written to interact with each other by means of some middleware framework, based on synchronous or asynchronous communication paradigms. Since the presence of middleware is known to hinder maintenance tasks, several prior approaches have focused on facilitating these tasks. A dynamic analysis platform analyzes full-stack JavaScript applications by abstracting away middleware communication, so it can be emulated in dynamic profiling scenarios [7]. [2] studies implicit relations between asynchronous and event-driven entities, spread over the client and server sides of a distributed execution. Static analysis based on formal reasoning calculus has been applied to understand how asynchronous communication constructs (i.e., callback, promises) are used in distributed event-based JavaScript programs [12, 13]. These prior approaches conquer the complexity introduced by middleware functionality through abstraction and modeling techniques. However, modern middleware frameworks do not lend themselves easily to being abstracted away or modelled faithfully, due to a high variability in their execution behavior as a result of dissimilar configuration options and network volatility. My approach can effectively address many of these scenarios, in which it is advantageous to completely take middleware out of the picture, so the performed maintenance tasks can focus solely on the programmer-written code, adapting and perfecting it for the ever changing requirements.
3 Research Objectives and Progress
My dissertation research explores a radical notion: a centralized equivalent of a distributed application can serve as a faithful surrogate for various maintenance and evolutionary tasks. By taking all distribution and middleware harness out of the picture, my approach makes it possible for maintenance programmers to focus exclusively on the programmer-written code, adapting and perfecting it as required by ever changing requirements. In particular, my approach can be applied to various debugging tasks, security sandboxing [1], and fault-handling adaptations as shown in the Fig. 1.
3.1 Progress So Far
The heterogeneity of the web architecture allows for flexible mixing of dissimilar languages and frameworks, used at the client and server ends of web applications. Nonetheless, using the same programming language for both the client and server parts is increasingly gaining prominence. Cross-platform web applications are written in JavaScript by using various application frameworks. These applications can run their client functionality in a web browser on any platform. The server functionality is typically implemented by means of the Node.js framework. Distributed applications, in which both the client and server parts are implemented in JavaScript are referred to as full-stack JavaScript applications.
Thus far, the focus of my dissertation research has been on the domain of full-stack JavaScript applications. The ability of operate in such a monolingual environment allows for making certain simplifying assumptions, required to create a working proof of concept. However, my long-term vision is to extend my approach to multilingual distributed applications, implemented and maintained in different languages. To that end, I plan to investigate how automatic language translation technologies can be applied to my code analysis and transformation infrastructure (See Fig. 2).
To gain a deeper insight into the issues of automatic language translation, I explored how Java-to-Swift translations rules can be inferred from a set of cross-platform mobile applications, maintained in both languages to support both Android and iOS mobile users [3]. This experience has prepared me to be able to tackle the challenges of multilingual Client Insourcing and all the evolutionary modifications enabled by this refactoring.
Multilingual Virtual Machine (MVM) executes programs written in multiple programming languages within the same interpreter [8,9,10]. For multilingual distributed applications, this approach can be a viable alternative to translating the insourced code segments from the server language to the client one. With MVM, the insourced functionality can be integrated into the client code in the intermediate language-agnostic representation, thus bypassing the need for source-to-source translation.
4 Research Questions
My dissertation research is driven by the following general questions.
-
RQ1. Client Insourcing Value, Correctness, and Applicability: How much programmer effort does Client Insourcing save? What are the preconditions for this refactoring’s successful application? Can one identify those distributed functionalities to which Client Insourcing can be applied to create their centralized equivalent?
-
RQ2. Applicability to Facilitating Evolutionary Modifications: What kind of evolutionary tasks can be facilitated by Client Insourcing? What architectural principles must distributed applications possess to be amenable to our modification approach? If an application cannot benefit from my approach, can it be refactored for my approach to become amenable?
-
RQ3. Maintaining Semantic Equivalence in the Presence of Client Insourcing Enhanced with Language Translation: How feasible is it to maintain the business logic of a distributed multilingual application by transforming it into a centralized monolingual application? To which source/target languages can this transformation be applied? How much does this transformation affect the cognitive load of evolutionary modifications?
5 Remaining Work
The remaining work of this dissertation research will answer the research questions 2 and 3 above. I am currently investigating the applicability of Client Insourcing as a means of facilitating various evolutionary modifications of full-stack JavaScript applications. Centralized applications can be used as input for various automated distribution approaches, a research area that has received a lot of attention from the research community. For example, in our own research, we introduce compiler-based techniques that enable real-time systems to take advantage of trusted execution environments by automatically placing the functionality needing protection into a separate secure partition [11]. Finally, the automatically generated code of Client Insourcing can be used to put in place certain fault-handling strategies that handle various network communication problems. After this research is carried out and published, I then plan to apply my approach to multilingual distributed execution environments, with an initial target JavaScript client & Java server; due to the maturity of Java to JavaScript automatic translation tools, I am confident that it should be feasible to create a working proof of concept in a timely fashion.
6 Conclusions
In this manuscript, I have described my dissertation research, concerned with the challenges of evolving distributed applications to meet the continuously changing functional and non-functional requirements. My research puts forward a radical notion that a centralized equivalent can serve as a faithful proxy of a distributed application for many software maintenance and evolution tasks. We have successfully applied my approach to reduce the complexity of tracing and removing certain types of bugs in full-stack JavaScript applications. The remaining work will apply this approach to security sandboxing and fault-tolerance adaptations as well as extend the approach to distributed multilingual applications.
References
Agten, P., Van Acker, S., Brondsema, Y., Phung, P.H., Desmet, L., Piessens, F.: JSand: complete client-side sandboxing of third-party JavaScript without browser modifications. In: Proceedings of the 28th Annual Computer Security Applications Conference, ACSAC 2012, pp. 1–10. ACM, New York (2012)
Alimadadi, S., Mesbah, A., Pattabiraman, K.: Understanding asynchronous interactions in full-stack JavaScript. In: Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, pp. 1169–1180. ACM (2016)
An, K., Meng, N., Tilevich, E.: Automatic inference of Java-to-Swift translation rules for porting mobile applications. In: 2018 IEEE/ACM 5th International Conference on Mobile Software Engineering and Systems (MOBILESoft 2018), pp. 180–190, May 2018
An, K., Tilevich, E.: Catch & release: an approach to debugging distributed full-stack JavaScript applications. In: In: Bakaev, M., Frasincar, F., Ko, I.-Y. (eds.) ICWE 2019. LNCS, vol. 11496, pp. 459–473. Springer, Cham (2019)
Bennett, K.H., Rajlich, V.T.: Software maintenance and evolution: a roadmap. In: Proceedings of the Conference on the Future of Software Engineering, pp. 73–87. ACM (2000)
Chapin, N., Hale, J.E., Khan, K.M., Ramil, J.F., Tan, W.G.: Types of software evolution and software maintenance. J. Softw. Maint. Evol. Res. Pract. 13(1), 3–30 (2001)
Christophe, L., De Roover, C., Boix, E.G., De Meuter, W.: Orchestrating dynamic analyses of distributed processes for full-stack JavaScript programs. In: Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, GPCE 2018, pp. 107–118. ACM (2018)
Grimmer, M., Schatz, R., Seaton, C., Würthinger, T., Luján, M.: Cross-language interoperability in a multi-language runtime. ACM Trans. Program. Lang. Syst. (TOPLAS) 40(2), 8 (2018)
Hirzel, M., Grimm, R.: Jeannie: granting Java native interface developers their wishes. In: ACM SIGPLAN Notices, vol. 42, pp. 19–38. ACM (2007)
Kell, S., Irwin, C.: Virtual machines should be invisible. In: Proceedings of the Compilation of the Co-located Workshops on DSM 2011, TMC 2011, AGERE! 2011, AOOPES 2011, NEAT 2011, & VMIL 2011, pp. 289–296. ACM (2011)
Liu, Y., An, K., Tilevich, E.: RT-trust: automated refactoring for trusted execution under real-time constraints. In: Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, GPCE 2018, pp. 175–187. ACM (2018)
Madsen, M., Lhoták, O., Tip, F.: A model for reasoning about JavaScript promises. In: Proceedings of the ACM on Programming Languages (OOPSLA) (2017)
Madsen, M., Tip, F., Lhoták, O.: Static analysis of event-driven Node.js JavaScript applications. In: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, pp. 505–519. ACM (2015)
Acknowlegements
This research is supported by the NSF through the grants # 1650540 and 1717065.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
An, K. (2019). Facilitating the Evolutionary Modifications in Distributed Apps via Automated Refactoring. In: Bakaev, M., Frasincar, F., Ko, IY. (eds) Web Engineering. ICWE 2019. Lecture Notes in Computer Science(), vol 11496. Springer, Cham. https://doi.org/10.1007/978-3-030-19274-7_43
Download citation
DOI: https://doi.org/10.1007/978-3-030-19274-7_43
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-19273-0
Online ISBN: 978-3-030-19274-7
eBook Packages: Computer ScienceComputer Science (R0)