W-JAX 2009: EJB in the Large, Part I

dukeDisclaimer: This entry has been written while listening to the talk. Please forgive me any typographical or grammatical errors resulting from this approach.

Fabiane Bizinella Nardon is going to give an overview about one of the largest – maybe the largest – EJB application ever created. Knowing very few actually working EJB systems I am very interested in this.

Fabiane started with some interesting facts about Brazil: Besides being the largest latin american country and its portugese language, it was the first country in the world with electronic elections. Income tax reports can as well be sent via Internet and Orkut is one of the big social site successes. Overall brazilians seem to be very open-minded about technology (twice as many internet users than Canada has inhabitants).

The brazilian healthcare system has impressive statistics:

  • 6441 hospitals using it
  • 65.000 primary care units
  • 19 million consultations per month
  • 100 million medical procedures per month

Fabiana was offered a dream – a clear task (build a health care management “just” for Sao Paolo, make it possible to roll it out to the country) and free choice of technology and team. The nightmare began with the 9 month time limit. The resulting system cost about 4.6 million EUR, was done in 10 months and contained 2.5 million lines of code. The team assembled in the first two months contained about 70 people, 50 of them Java developers. For hardware the Sao Paolo data center was running the applications and  connected via Internet to diskless Linux-based clients in the clinics and standards PCs in city management. The Linux systems allowed to only connect to the healthcare system – the one machine stolen in a favela was returned because the thieves were unable to do anything with it. EJB was chosen in 2004 because it was a standard and there were many experiences and human resources available for it. JBoss was used as the application server. Struts was chosen for similar reasons, additionally her team was very experienced with Struts.

To prevent performance problems no queries were implemented via Entity Beans. One (usually rather fat) session facade was used per use case to avoid remote calls. Queries were developed using CrossDB, EJBs were only used for saving operations. In total the application contains more than 610 EJBs (session, entity and message driven beans). The EJB inventors were surprised that this setting actually worked 🙂

Large parts of the code actually were generated using XDoclet to get a homogenous result between the different teams, “only” 500.000 lines were written by hand.

Overall the success of the project seems to be born from high level of standardization of development procedures, lots of previous experience and using code generation to equalize the skill level of developers. The resulting system doubled the amount of applications that could be processed without hiring new doctors, etc. An impressive success.

Funny side note: This pure Java application developed by Microsoft hating persons was considered to be one of the best healthcare solutions in the world – thusly evaluated by the Bill and Melinda Gates foundation 😉

Congrats to Fabiane on an “extreme project” (on a different level) and a proof that huge EJB systems actually can be build when rationally architectured. And also congratulations to a very good presentation!

Comments are closed.