Building Tools to Teach an Old Programming Language New Tricks
Through a $556,063 NSF grant, Michael Greenberg is helping programmers leverage long-standing shell programming to support current and emerging technologies
Michael Greenberg, an assistant professor in the Department of Computer Science at Stevens Institute of Technology, has a fascination with shells — not the ones scattered across just about every beach in the world, but the ones scattered throughout just about every computer operating system globally.
Greenberg describes shell script programming as the glue that allows computer programs to talk to each other. Having been used to support efficient computer operations for decades, “the shell,” as it is often called, is now pervasive, playing an integral role in everything from the configuration of servers and their software to testing and building software, data analysis and more.
However, these shell scripts can be difficult to scale to meet the increasing demands of modern cloud and serverless computing. Different cloud providers offer different ways of managing their services using the shell. Shell scripts are often buried in other formats, making it more challenging to work with the scripts. Some file formats lack viable tools for shell work.
“The shell language was designed in a world where central processing units had just one core,” Greenberg noted. “Now my laptop has four cores, and a server may have dozens, if not hundreds, of cores. Most computer programs exhibit poor scaling, which means shell scripts combining those programs won’t scale well, either.”
Thanks to a recent $556,063 grant from the National Science Foundation (NSF) for his collaborative research project titled “Scaling Unix/Linux Shell Programs,” Greenberg will be spending the next four years working to modernize shell programming to better support current and future technology. He is working with a network of interuniversity experts, including Nikos Vasilakis, an assistant professor of computer science at Brown University, and Konstantinos Kallas, a computer science Ph.D. student at The University of Pennsylvania.
The techniques and infrastructure they envision will have the potential to help users in government, industry and open-source projects better leverage modern computing infrastructure while increasing safety, security, maintainability and performance.
Greenberg is the first to admit that his favorite research area is not an easy thing to master — or even to like.
“I’ve always loved the shell,” he said. “It’s the expert’s control hatch, the interface that you use when you are interactively controlling the computer’s low-level behavior. But it’s also a weird, old language. Most people don’t take the time to learn its semantics, and, as a result, they can very easily do the wrong thing, which can be a recipe for disaster — and then they get upset when it doesn’t work the way they think it will.”
Although some open-source projects can help shell programmers find bugs in their programs, not much other support is available for writing fast, reliable shell scripts. Through this NSF project, Greenberg will work to help conventionally written shell programs scale to handle large amounts of data, multiple machines and advanced tasks — with minimal user involvement.
“We want this work to be black box, which means that users won’t have to deeply understand shell programming or our tools to make it work,” he explained. “I expect our tools to help folks avoid mistakes. By automatically speeding up shell scripts in a black box way, allowing more of a practical push-button approach, folks can get good performance on many setups in many environments without trying to be too clever in their shell scripts.”
Greenberg expects to combine existing knowledge of programming language theory, low-level systems details, novel file systems and techniques for modern hardware to develop innovative techniques and frameworks that support that user-friendly black box approach.
“There’s a significant opportunity here to build tools and infrastructure that will address real pain points,” he said. “If it normally takes you an hour to load a scientific dataset, but we can help you do it in 10 minutes, suddenly it’s just like a coffee break that doesn’t interrupt your flow. You’re more likely to load data more often, so you can experiment with it. That significantly changes how you work.”
And while Greenberg loves digging into the technical aspects of his work, he’s just as inspired by that potential to make a real difference for people.
“I love building tools,” he said. “There’s something truly satisfying in addressing a need someone else has. Solving problems like that is one of the highest impact things we do.”