Search
Engineering
 
Henry Samueli School of Engineering and Applied Science
 
UCLA Engineer: Spring 2005
 
 
 
 
 
 
 
 
 

 

Improved Server, Sensor Software
Researchers Simplify, Enhance Event Driven Systems



(Standing, from left) Shane Markstrum, Todd Millstein, Brian Chin, Ben Titzer, Jens Palsberg, Rupak Majumdar, Jeff Fischer, Alex Warth, Manav Mital and Krishna Nandivada. (Sitting, from left) Eddie Kohler, Mike Emmi and Lih Chen

Event driven programming can lead to faster responses from web servers, databases, small embedded devices, and any other software that has to respond to multiple concurrent requests.

Unlike threaded systems that deal with first one request then another, however, event driven systems can be difficult to conceptualize and program, limiting their use.

A team of UCLA computer scientists are working to improve the quality of event driven software systems by developing a number of tools that will make event driven systems easy to understand, program and use.

“It’s a great collaboration,” notes computer science professor Todd Millstein, an expert in programming languages and tools, “because the project brings together a wide spectrum of expertise. We’re all interested in making event driven software more natural and easier to maintain.”

Also bringing their systems expertise to the project are computer science faculty members Jens Palsberg, the primary investigator and a specialist in compiler technologies; Eddie Kohler, a systems software expert; and Rupak Majumdar, whose specialty is computer-aided software verification.

The four researchers arrived at the UCLA Henry Samueli School of Engineering and Applied Science within six months of one another and knew that they shared overlapping research interests. The UCLA software systems group – now one of the most dynamic in the country – made it a priority to identify areas they held in common for future collaborative research.

One such area of research is the Event Driven Software Quality project, which will receive nearly $1 million in funding from the National Science Foundation over a three-year period.

“Because our expertise is in specialized areas, we’re able to approach the problem with a broader perspective,” explains Palsberg. “Event driven software is frequently understudied, and we’re particularly interested in the issue of quality. Our research is to various degrees theoretical or experimental, and we're creating tools and systems that will have practical applications.”

With any centralized database or system, including web servers, there are multiple requests competing for processing power. Traditional threaded systems, which respond to one request at a time, require more systems support to function and can also slow response time.

Event driven programming, which stresses flexibility and non-synchronized reactions, can lead to faster, more efficient and effective servers. Generally, software that is event driven consists of a number of smaller programs known as event handlers or callbacks, which respond to external input under the direction of a dispatcher. The software breaks up incoming requests into smaller chunks, and then moves back and forth between the tasks to process them. Unlike traditional programs that follow their own control flow pattern, the control flow of event driven software is dictated primarily by user requests.

Event driven software flow
"It can be difficult to read the overall ‘recipe’ of an event driven system from the code because it has been divided into little events called callbacks,” says Kohler. “If you’re looking at the code, you don’t know where you are or what’s going to happen next. This makes the system hard to maintain, debug and validate.

Another issue in event driven systems is the allocation of resources. Majumdar is working to automate response allocation; making sure elements in the system are freed up as tasks are completed. He is also pursuing language features that will make event driven code easier to write, such as more structure and improved verification methods.

“In event driven systems, programming is much more complicated and the control flow is not explicit,” notes Majumdar. “Instead, there are pointers into sub-tables and the flow is not immediately clear to the verifier. We are creating a structure for writing control handlers that will enable the system to track events one at a time, as well as tracking it as a whole for verification.”

Millstein is focused on tools for programming support, and extending event driven systems to be more broadly responsive to programmers’ intentions and users’ needs.

For instance, in a central repository such as a database, clients may want to display the information on screen or send it to another, external database for storage. One challenge is to make sure that software will update all system elements when changes are made to one piece.

“Often, the problem is not described in a unified way,” says Millstein. “It’s fragmented across the handlers, and you can only see one small piece of the puzzle. But the handlers are not independent entities, they’re interacting to solve the problem and need to be updated when changes to the database occur.”

Kohler, who is interested in “systems that are elegant and easy to understand,” is working to get more from the available programming space. In distributed sensor networks, the amount of code that a sensor can contain is limited.

In addition to his work on compiler technologies, Palsberg is leading efforts at UCLA to develop a sensor network simulator that will allow researchers to estimate the lifetime of a network.

“We have built a sensor network simulator that offers precise timing estimates,” says Palsberg, “and it has been extended by a researcher in Germany to provide energy estimates, as well. This allows us to estimate the power needs and, ultimately, the lifetime of sensor networks. We are able to run simulations of up to 10,000 sensor nodes, which is more than is needed for most deployments, and will allow researchers in the Center for Embedded Networked Sensing to determine the reliability of their networks.”

The NSF-funded Event Driven Software Quality project also serves as an umbrella to attract and retain students who are interested in software systems. The group is able to offer students the opportunity to work with faculty who have interlocking areas of expertise on a wider range of related projects, providing them with both breadth and depth in the field.

New classes in various aspects of systems software and programming also are drawing interested students into the field. In addition, engineering students have become involved through a reading group that offers them the opportunity to learn together.

Ryan Cunningham, a graduate student in computer science, is generating an event library, working with Majumdar and Kohler, that will make certain actions in the code explicit, creating the tools to generate control flow. By extracting high level charts from the code automatically, it will make it easier to read and understand.

“The opportunity for new collaborations has worked out beyond every expectation,” says Palsberg. “It is much better to work together than to work separately.”

For additional information on the project, please visit http://compilers.cs.ucla.edu.

- Marlys Amundson
HOME
SITE MAP
 
COPYRIGHT 2004 UCLA