Both cases originated in the mid 2000s - one was a large warehousing/distribution company that relied heavily on Oracle, the other was a mid-sized tech company with a weird culture split between LAMP stack customer-facing work and .net for business apps.
For the warehousing business, they set out developing their own apps to run alongside (and eventually replace) the work of Oracle consultants from the late 90s, and I suspect the stored proc addiction came about because the pattern had already been established in that earlier work.
For the tech company, it was confined to the Microsoft side of the house and was driven by a senior manager who came from a DBA background clashing with another who had a Unix background and didn't really understand the MS world.
By the time I arrived, people had begun to recognise that it wasn't an ideal situation and it had been isolated behind an Enterprise Service Bus (which brought a whole host of other problems...) with the intention of slowly being replaced. The business was bought by Private Equity and dismembered before that could happen, though.
I get the impression it was a fairly widespread Enterprise pattern in the 90s, but fell out of use as source control, CI systems, unit tests, and better development methodologies made application code the clearly better choice.
It's common and I've observed it in three different industries. The reason it begins is reasonable: the proc is the only stage at which a change can be deployed without going through a release cycle, so all the hotfixes end up there, and after ten years the hotfixes make up the entire system. The circular calls arise for the same reason. Since no one dares to modify proc A, they write proc B which calls proc A and alters its output, and then someone does the same thing to proc B. The deadlocks appear once each of the proc's authors has a different view on where the transaction should start.
I've seen it a couple of times.
Both cases originated in the mid 2000s - one was a large warehousing/distribution company that relied heavily on Oracle, the other was a mid-sized tech company with a weird culture split between LAMP stack customer-facing work and .net for business apps.
For the warehousing business, they set out developing their own apps to run alongside (and eventually replace) the work of Oracle consultants from the late 90s, and I suspect the stored proc addiction came about because the pattern had already been established in that earlier work.
For the tech company, it was confined to the Microsoft side of the house and was driven by a senior manager who came from a DBA background clashing with another who had a Unix background and didn't really understand the MS world.
By the time I arrived, people had begun to recognise that it wasn't an ideal situation and it had been isolated behind an Enterprise Service Bus (which brought a whole host of other problems...) with the intention of slowly being replaced. The business was bought by Private Equity and dismembered before that could happen, though.
I get the impression it was a fairly widespread Enterprise pattern in the 90s, but fell out of use as source control, CI systems, unit tests, and better development methodologies made application code the clearly better choice.
The SAP architecture stores transactions (basically programs or business logic) in the database.
It's common and I've observed it in three different industries. The reason it begins is reasonable: the proc is the only stage at which a change can be deployed without going through a release cycle, so all the hotfixes end up there, and after ten years the hotfixes make up the entire system. The circular calls arise for the same reason. Since no one dares to modify proc A, they write proc B which calls proc A and alters its output, and then someone does the same thing to proc B. The deadlocks appear once each of the proc's authors has a different view on where the transaction should start.