Most apps use a single database?
Hi,
I'm working through Johnson & Hoeller's "J2EE Development without EJB", but there is no forum for that and I think I saw the same statement in the book for this forum. The statement, appearing a couple times, is something like this: Most apps only access a single database, thus distributed transactions are not required and are unnecessary overhead. This is probably a dumb question, I mean you put it in the book, but are you sure about that? I do not have a lot of experience compared to many others, but in 6 years of consulting I have yet to work on an app that only accesses a single database. Apps for Barnes & Noble, Kinkos, Ingram Micro and a few others I have done all had to access at least 2 DB's within a single transaction. As a simple example, a website may be able to take orders and store order information in an "application database", yet inventory in the inventory DB has to be modified in realtime - these often have to be in the same transaction. Or something similar with updates to an accounts receivable system. I have not seen any cases where an app got away with calls to only one DB, perhaps they were very small apps, with no legacy systems in place? Anyway, I am just curious whether that statement is something you researched or discussed with a bunch of colleagues etc., since it surprised me. Great book of course, I really like how your points are layed out.
|