An Industrial Experience Report on Performance-Aware Refactoring on a Database-Centric Web Application

An Industrial Experience Report on Performance-Aware Refactoring on a Database-Centric Web Application
复制标题

关于以数据库为中心的 Web 应用程序上的性能感知重构的行业经验报告

DOI:
--
复制
发表时间:
2019
期刊:
International Conference on Automated Software Engineering
影响因子:
--
通讯作者:
Michael Lacaria
Michael Lacaria
中科院分区:
--
文献类型:
--
作者:
Boyuan Chen;Z. Jiang;Paul Matos;Michael Lacaria

文献摘要

被引文献

相似文献

现代Web应用程序在很大程度上依赖数据库来查询和更新信息。为了简化开发工作,对象关系映射(ORM)框架为开发人员提供了一个抽象,以通过以相同的面向对象的编程语言编写来管理数据库。先前的研究表明,通过不同的ORM框架(例如Hibernate和Activerecord)对数据库的效率低下引起的各种类型的性能问题。但是,尚不清楚报告的绩效反图案(常见绩效问题)是否可以在各种框架中推广。特别是,没有研究重点是检测PHP编写的应用程序的性能问题,这是大多数Web应用程序(79%)的编程语言的选择。在这篇体验论文中,我们详细介绍了对用PHP中最受欢迎的Web框架编写的工业网络应用程序进行性能感知的重构的过程。根据先前的研究和我们的实验,我们得出了17个绩效反图案的完整目录。我们发现,一些报道的反故事和重构技术是特定于框架或编程语言的,而另一些是一般的。反图案实例的性能影响高度取决于实际用法上下文(工作量和数据库设置)。在交流重构前后的性能差异时,复杂的统计分析的结果有时可能会造成混淆。相反,开发人员通常更喜欢更直观的措施,例如改进百分比。实验表明,在各种情况下,对于工业和开源应用,我们的重构技术可以将响应时间降低到93.0%和93.4%。
Modern web applications rely heavily on databases to query and update information. To ease the development efforts, Object Relational Mapping (ORM) frameworks provide an abstraction for developers to manage databases by writing in the same Object-Oriented programming languages. Prior studies have shown that there are various types of performance issues caused by inefficient accesses to databases via different ORM frameworks (e.g., Hibernate and ActiveRecord). However, it is not clear whether the reported performance anti-patterns (common performance issues) can be generalizable across various frameworks. In particular, there is no study focusing on detecting performance issues for applications written in PHP, which is the choice of programming languages for the majority (79%) of web applications. In this experience paper, we detail our process on conducting performance-aware refactoring of an industrial web application written in Laravel, the most popular web framework in PHP. We have derived a complete catalog of 17 performance anti-patterns based on prior research and our experimentation. We have found that some of the reported anti-patterns and refactoring techniques are framework or programming language specific, whereas others are general. The performance impact of the anti-pattern instances are highly dependent on the actual usage context (workload and database settings). When communicating the performance differences before and after refactoring, the results of the complex statistical analysis may be sometimes confusing. Instead, developers usually prefer more intuitive measures like percentage improvement. Experiments show that our refactoring techniques can reduce the response time up to 93.0% and 93.4% for the industrial and the open source application under various scenarios.