|
Real-Time ObsessionGreg Bollella Has a Passion for Precision and Predictability Story by Al Riske. Photography by Howard Friedenberg. 29.Mar.07-Here's the kind of challenge Greg Bollella loves. "One bank we talked to has this machine that's plugged into five or six currency exchanges and it buys and sells all day. It's like a moneymaking machine. The algorithms they have are pretty sophisticated -- they trade in the fourth decimal place. So they can trade a huge number of items with a small gain to make significant money," says the Distinguished Engineer. Simply put, the computer is programmed to buy low, sell high. So far, so good. The danger comes when a currency drops below the preset "buy" level and keeps heading south. Clearly the bank doesn't want to keep buying and be left holding a lot of money that has little value. "They want to be able to pull the buy order out of there fast, and they think they have about one millisecond to do that," Bollella says. "That's their target." They have an algorithm in the system for such situations, but Bollella describes it as inefficient and believes they could do better with real-time Java technology.
Bollella, the Father of Real-Time Java, has been talking to a lot of customers lately. Customers in finance and telecommunication as well as the military, aerospace, and other industrial-control applications -- all of them interested in using real-time Java.
"Our 2.0 release is in beta, and when we started we said we're going to limit ourselves to 25 beta customers because they can be intense. You have to work very closely with these kinds of customers," Bollella says. "But I think we're close to 40 now because we keep getting, 'Me too. Me, too, please.'" This wasn't always the case. In the beginning, in fact, it was almost impossible to get people to consider using Java for real-time applications. "The biggest obstacle," Bollella recalls, "was the common wisdom in both camps. Common wisdom in the Java camp. Common wisdom in the real-time programming camp. Both of those said you can't use Java for real time."
Now, if you're remembering the bank with one millisecond to act, you may think the issue here is speed. It's not. In fact, Bollella says his biggest fear is that people will confuse real time with real fast. Real-time programming is about precision. It's not being able to respond in one millisecond that counts. It's being able to respond at the exact millisecond required. Every time. Guaranteed. "In regular programming we talk about the functional attributes of the language -- addition, subtraction, control-flow method invocation, those kinds of things. With real-time systems you have to add the element of time," Bollella says. That complicates things that were already complicated.
"Say you're writing a control for a robot. You have to know control theory. You have to know differential equations and how to implement them. But that's just part of your job. The other part is how do you make sure this chunk gets executed when it's supposed to? For that you have to dive down into the bowels of the operating system, sometimes down to the chip level. You have to understand device drivers and take device drivers out if they're misbehaving. Things like that," he explains. With Java, one of the key hang ups was a background process known as garbage collection (essentially automated memory management) and making sure it didn't happen at just the wrong millisecond. Until Bollella and his team came along, no one was giving programmers any help.
"One of the problems with real-time java is that everyone says it's really hard to use. We're saying it's now very easy to get started," Bollella says. A case in point: Coders who came to the JavaOne conference last year not knowing what real-time programming was soon found themselves doing it. They used real-time Java to race slots cars around a tortuous track with real precision. This year the track will be back, but with traffic lights installed, further complicating the challenge. "What this does is show them that they're writing hard real-time control code in Java, in NetBeans, with the kind of precision you need to write the reentry code for the space shuttle. With no special stuff other than real-time Java. It's not like falling off a log, but it's a lot easier than it was before real-time Java," Bollella says. "The feeling we want them to get is when real-time Java says you're going to execute once a millisecond, it does, and it does so very precisely." Bollella says a more serious demo involving the world's fastest industrial robot, the IRB 340 from ABB of Sweden, is also in the works for JavaOne this year. "The slot cars are fun, but they're toys," he says. "Here both the software and the physical system will be extremely precise."
One of his main goals, even before Java came on the scene, has been making it possible for real-time developers to stop thinking about time. It started with his doctoral dissertation. "When I was looking around for a topic," he says, "I wanted something that no one else had done." A colleague advised him not to go where the waters are deep and still. There's a lot there but a lot has been done. So Bollella took stock of his interests: Real-time operating systems? Deep, still water. Real-time scheduling? Deep, still water.
"But," he concluded, "where they meet was an area that was unexplored." "What my advisor liked about my work was I did this very methodical, kind of compulsive look at everything that affects predictability in the operating system, and asked how can you get rid of this while still maintaining the general-purpose quality of the whole system?" Another advisor told him this: "If you have new technology that fundamentally changes how things happen, it will take 15 years from the time you have the idea until customers start to use it in their shops.'" Prophetic words. "It's been 15 years for me now," Bollella says, "and we're just starting to see this move into customer shops. People are getting excited." Sun CTO Greg Papadopoulos is excited, too, calling Bollella a one-man revolution. "What I would have given for this back in my days as a controls engineer," he says. |
|
|||||||||||||||