Thursday, March 19, 2009

Web Services for Mission Critical Apps

While reading the “Beautiful Code” from O'Reilly Media I came across a chapter compiled by Ronald Mak. He was a senior scientist at the Research Institute for Advanced Computer Science and he has been contracted twice by the NASA to develop their enterprise applications to manage space missions. In the chapter 20 of “Beautiful Code” Ronald describes the internals of the Collaborative Information Portal (CIP) which he and his team developed for the NASA for the Mars Exploration Rover (MER) mission which commenced in year 2003. The development of the project has taken nearly two years and needless to say being a highly mission critical ERP solution the requirements of the system have been very demanding. Among the most fundamental features of the system were,
  • Time management (Managing all time zones on Earth and two time zones on Mars)
  • Personnel management (Managing all mission personnel) and,
  • Data management (Managing all the data sent from the two automated Rovers on Mars)
So how did Ronald and his team tackled this mammoth task? They used a 3-tiered service oriented architecture (SOA). Most of the code has been written in Java and they have followed J2EE standards. Also the developers of the CIP have used commercial off-the-shelf (COTS) software as much as possible to avoid re-inventing the wheel thus saving loads of time and effort. The client tier of the system consists mainly of standalone GUI applications developed mostly with Swing. These client applications communicate with a set of Web Services hosted on a J2EE compliant application server. This forms the middleware tier of the CIP. Finally there is a data tier which consists of mission file servers, databases and other metadata repositories. Ronald explains that using an SOA based on J2EE, was one of the main driving forces behind their success with the CIP.

The Web Services in the middleware tier are perhaps the most important components of the system. These services have been implemented using Enterprise Java Beans (EJB). They have developed two types of beans, namely stateless session beans and stateful session beans. Stateless session beans act as the service providers by receiving all the client requests and routing them to relevant stateful session beans which implement the business logic of the system. Ronald further elaborates that use of Web Services made CIP modular, language independent and loosely coupled.

All-in-all Ronald and his team have manged to deliver the solution on schedule. The end system has recorded a 99.9% uptime, indicating how reliable the system was. In addition to using Web Services and SOA to make the system highly maintainable and scalable, they have employed a number of other techniques to shape up the CIP into a highly reliable ERP solution. According to Roland, logging was one such technique. They have used a system wide logging mechanism based on Apache Log4j to log all the important (and even not so important) activities that take place within the system. They have also developed services to specifically support the monitoring function of the system which means that they have considered monitoring as a fundamental requirement of the system. In addition, Ronald and the team made the CIP dynamically configurable and hot swappable to minimize the down time maximize the robustness.

I believe that CIP of NASA is one of many examples which effectively demonstrates the power of Web Services and SOA. These technologies can help even huge government agencies like NASA to develop large complex enterprise software systems on time while meeting all the strict reliability, availability and scalability requirements as desired. As the time goes on these state of the art technologies will prove to be even more powerful and useful. I'm just glad that I'm into further exercising SOA as a Software Engineer.

No comments: