From lambda to fault-tolerant transactions: create microservices that can simulate applications

Students

Engineering and Applied Sciences

Faculty

Assistant Professor of Computer and Information Science

Project Summary

Microservices are self-contained units of computation that can be started up on cloud servers rapidly, whenever there is a demand. AWS lambda provides a platform for developers to build such microservices and has been widely used due to automatic scaling, high availability, and the absence of server-side maintenance. However, in order to ensure outstanding availability, lambda is rendered stateless, meaning results computed during the current execution cannot be reused in later executions. Moreover, when a lambda fails amid an ongoing application, developers have to detect failures and design recovery mechanisms themselves, which can consume many hours, even more than the time taken to actually write the application.

In this research, we aim to address the aforementioned problems of statelessness and non-fault tolerance. Statefulness can be achieved by introducing cloud storage devices, such as AWS DynamoDB, where lambda can write to and retrieve data from. To ensure fault tolerance, we adapt a technique known as locks with intent to the context of lambda. The resulting system guarantees that failures can be detected and addressed automatically. With the provision of locks with intent library, developers can set up the environment easily, thereby being able to concentrate on the application.

During the course of this research, we have also created a new functionality of composing multiple standalone lambdas into an atomic transaction that acts as if it was a single microservice. We applied this composability of lambdas/ microservices to simulate ride-sharing applications such as Uber.

During the 2-month research, I would definitely regard the rich technical knowledge I learned the most important aspect contributing to my educational experience. Not only did I come to understand the various techniques used to solve issues in a distributed system, but I have also picked up a new programming language. This research also offers me an invaluable chance to be both a programmer and an architect. In addition to the normal programming tasks, I also have to design the distributed system that connects the standalone parts and the backend databases on my own. 

Having said that, I have never seen the concept of distributed system before this research begins. The cloud computing platform (Amazon Web Services) this research is centered on is also something new to me. In order to conquer these challenges, I read a lot of documentation and descriptions from official websites, while discussing frequently with professors. As a result, besides the technical knowledge, the next thing I learned is the ability to quickly adapt into a new environment and absorb new knowledge. All in all, this research is undoubtedly a great experience for me.