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.

Wednesday, March 18, 2009

Social Networking: Bandwidth Eater?

Me and a group of my colleagues at University of Moratuwa, conducted a small research to analyze the impact of social networking on bandwidth usage in corporate networks. Under the guidance of Dr. Chandana Gamage, we studied the network resource utilization patterns triggered by browsing social networking sites such as Facebook and YouTube. We then put our observations and findings into a short research paper titled, “Network Resource Utilization and Social Networking”. Our research was rather small and probably not highly analytical but I think anybody who runs a corporate network should have a quick look at it. However if you are a sworn social networking fan, I would say it’s best not to read it since our findings might seriously piss you off ;)

On a finishing note let me just say that bandwidth on corporate networks is a valuable resource that is generally shared among many people. So use it carefully and use it responsibly. Having some fun with social networking is fine. But always know your limits and ethical responsibilities.

Tuesday, March 17, 2009

Pushing to the Limits

Just a couple of days back, me and the rest of the MOINC team conducted a large scale performance testing round for MOINC at the advanced computing lab of the Department of CSE, University of Moratuwa. We used over 20 PCs for our tests and the resulting numbers we obtained were pretty amazing. My friend and colleague Aravinda is already in the process of analyzing the statistics collected and we hope to compile a research paper based on the results. We will be publishing the details regarding the experiments as well as the collected data soon on our website in a more aesthetically pleasing manner. In the meantime I would like to say that we as the developers are very happy regarding the level of scalability the prototype MOINC platform has displayed during the tests.

Following are some of the pictures that were taken during the performance testing round. The sight of the MOINC screen saver coming up in about 20 PCs at the same time was truly a treat to the eye :)

I thank our department head, Mrs. Vishaka Nanayakkara and officer in charge of the advanced computing lab, Mr. Ananda Fransiscu for all the support in carrying out this round of testing.

Monday, March 16, 2009

Get Ready to Get MOINCed

Few weeks back me and my team managed to finalize developing the first prototype of our dream project, MOINC. If you are clueless as to what project MOINC is all about, it is an attempt to combine the Web Services paradigm with grid computing. The goal of the project is to be able to deploy enterprise Web Services for high availability and high scalability using commodity hardware. So far we have done three formal presentations describing each of the major components of the MOINC platform and we have written three research papers which we hope to publish very soon. In addition to the presentations we also conducted a formal demonstration of MOINC at University of Moratuwa, using 6 computers which effectively gave a preview of MOINC in action to a panel headed by our project supervisor Dr. Sanjiva Weerawarana and our senior lecturer Dr. Chathura De Silva. Presentations were attended by Dr. Sanath Jayasena, Dr. Chandana Gamage, Dr. Chathura De Silva and Mr. Shantha Fernando of the department of CSE, University of Moratuwa.

We got pretty good feedback from all those who attended the presentations and the demonstration, clearly indicating that we are on the right track to make MOINC into a useful software solution for business organizations worldwide. Some of the core features of the MOINC platform that we demonstrated are listed below.

  1. Deploy, manage and undeploy service artifacts (Service artifacts are uploaded as Axis archives - *.aar files)
  2. Track down idling computers in the local network and add them to the MOINC grid dynamically
  3. Download service artifacts into idling computers from a centralized registry/repository
  4. Action script based screen saver for client PCs
  5. Load balance the incoming service requests among all the active nodes connected to the MOINC grid (Powered by Apache Synapse)
  6. Monitor the grid via an AJAX based Web interface (Powered by WSO2 WSF/AJAX)
  7. Collect statistics related to computers connected to the MOINC grid and use them in the intelligent load balance mode
  8. MOINC community portal and forums (backed by WSO2 Registry and JForum)

That’s certainly a lot of features for a mere prototype. No wonder we got pretty good feedback. However there is certainly lot more work to be done. We need to improve the overall security of the platform. Currently there is a couple of security loop holes in MOINC SMM that we need to close off. Also Dr. Sanjiva suggested writing a Java security manager for MOINC client agent which ensures the security of PCs connected to the MOINC server. We need to start working on that soon as well. Also we have to finish our Maven2 integration stuff and get the release artifacts for MOINC 0.1-alpha out soon. We still haven’t cut the release artifacts for all the components of MOINC but the full source code of the prototype can be checked out from our SVN. Also checkout the developer resources section on our website for all the slides we used for the above mentioned three presentations.

I will also make arrangements for all of you humble readers to have a sneak peak at our research papers before we actually publish them. I promise. Meanwhile enjoy the presentations and other design documents :)

Thursday, March 12, 2009

Carbonizing SOA

It's probably bit late to blog regarding this subject, but what the heck? After all, late is better than never.

WSO2 folks released their flagship product, the mother of all open source SOA solutions, WSO2 Carbon – Middleware a la carte. It is a componentized, customizable SOA platform built on Equinox and OSGi. The platform can be configured and tailored to suit the enterprise architecture of any business organization. Among the major components of the Carbon platform are;

1.WSO2 Web Services Application Server 3.0
2.WSO2 ESB 2.0
3.WSO2 Registry 2.0
4.WSO2 Business Process Server 1.0

All these high level components share the same set of core Carbon modules. It is really exciting to see how those high level middleware solutions combine with the core Carbon framework to deliver the results. Sounds interesting? Feel like learning more? Here you can find an introductory presentation on WSO2 Carbon. It gives a good insight into this revolutionary product and its architecture. Also don't forget to checkout other related articles and presentations on WSO2 Oxygen Tank.

Tuesday, December 9, 2008

Going Undercover....

I recently completed the video game 'Need for Speed Undercover', the latest member of the popular NFS series by EA Games. The game was so exciting and thrilling that I had to blog about it.

I have been a big fan of the NFS series since NFS 2. I really liked NFS Underground, NFS Underground 2 and NFS Most Wanted. NFS Underground was the first game in the NFS series to have a base storyline. Underground 2 and Most Wanted took the NFS series to a whole new level by making the storyline even more exciting and adding more features to the game. However I was a bit disappointed when NFS Carbon came out. It certainly did not live up to the hype and I found the game rather short and less challenging compared to its predecessors. Things got even worse when they released NFS Pro Street. To me Pro Street is the most unsuccessful game in the whole series. The whole point of playing a racing game on your PC or PS3 is to drive extremely fast and crash into things (which is something you cannot do in the real world without hurting someone or getting brain damage). But Pro Street does not allow the player to do that since going fast and crashing into objects would cause your car to get totaled and immobilized. Also fixing damaged cars will consume large sums of money the player has earned in the career mode of the game. And the biggest problem I had with NFS Pro Street was that it took the game back to the world of professional racing on closed racing circuits. For somebody who liked the virtual street racing experience offered by NFS Underground and NFS Most Wanted getting used to racing on closed tracks is almost like getting tortured.

However it seems the folks at EA have learned their lesson from the feedback they got from the fans for the NFS Pro Street. With NFS Undercover they have taken the action back into the open streets. Player gets to ride in a virtual city in some of the finest auto mobiles of the world. Couple of cars worth mentioning are Bugatti Veryon and the McLaren F1 which was last available in NFS 6. Cars are categorized into three, namely Japanese, European and American (see complete car list). However NFS Carbon fans will realize that these three categories effectively map to the three car categories in NFS Carbon (tuners, exotics, and muscles). The city has plenty of wide open roads where the player can really push the cars into their limits. Most of the tracks enable the player to accelerate the car to its top speed and hold that velocity.

Another aspect of the game I liked most was the soundtracks. Predecessors of NFS Undercover had mostly hard rock and technical death metal oriented sound tracks. But Undercover brings you a little bit of pop, a little bit of Latin and even a little bit of Spanish in addition to the rock stuff.

The underlying story of the game is perhaps the most interesting feature. In the previous versions of NFS the storyline was simple and very much predictable. In those games there is some kind of a bad ass, champion racer who bosses the other racers in the town (for example Razor in Most Wanted and Darius in Carbon). The player enters the world of racing as an amateur and starts to work his way up to become the new racing king of the town. In the process the player will have to confront many other racers, companions of the existing champion and sometimes even the police. But NFS Undercover brings you a totally different storyline. The story is full of action, suspense and even a bit of romance. The storyline clearly has some traces of 'Gone in 60 Seconds', 'Fast and the Furious' and 'CSI Miami'. Also the game enables the player to play the roles of the street racer, gang member, car thief as well as the federal agent.

The game is pretty fast paced and action packed. Graphics and the related effects are so natural and realistic. It's everything the racing gamers ever dreamed of. If you are like me and if you haven't played Undercover yet then go for it. It's totally worth it. Well done EA. You guys rock!

Also don't forget to check out NFS Planet for some cool Undercover wallpapers and movies.

You are not good
and you are not bad.
You blend and you listen
and you don't trust anyone.
Once you go undercover
you are on your own.