Skip to main content
eScholarship
Open Access Publications from the University of California

UC San Diego

UC San Diego Electronic Theses and Dissertations bannerUC San Diego

Improving the Dependability of Python-Based Database-Backed Web Applications

Abstract

Python-based database-backed web frameworks have gained wide adoption in developing online web applications in many commercial companies and open-source projects. They are used in e-commerce, banking, social networking, and many aspects of our daily life. These web applications have critical requirements on high dependability: any data corruption or service downtime could lead to significant business loss. Unfortunately, such incidents caused by application bugs or operator errors remain increasingly pervasive.

This dissertation explores the potential of building and maintaining more dependable Python-based web applications by providing tooling support for developers. To achieve this, we observe the two unique characteristics of these web applications: (1) They are backed by a database management system (DBMS), which enforces data integrity constraint checks. (2) The main application logic is developed in Python, an interpreted language with unique language features.

The first piece of this dissertation tackles the data integrity issues caused by application bugs or operator errors. Our study observes that application developers often do not take full advantage of the database-level integrity validations and miss specifying many database constraints, resulting in many severe consequences. We then build a tool called CFinder, to automatically infer the missing database constraints from application source code by leveraging the observation that many source code patterns imply certain data constraints.

Second, the dissertation tackles the demand of applying code changes for online diagnosing and fixing while keeping the service available. We observe the unique language features of Python, i.e. meta-object protocol and dynamic typing, which makes dynamic code change much easier for Python than for C or Java. We then propose a new framework called PyLive, to support dynamic logging, profiling, and bug-fixing without restarting. It can be easily adopted with no modification to the runtime system.

Main Content
For improved accessibility of PDF content, download the file to your device.
Current View