2 ms·
I think stored procedures are just strong typed "serverless lambdas" which runs really, really close do your data storage.
by est 13d ago
I think stored procedures are just strong typed "serverless lambdas" which runs really, really close do your data storage.
- degamad 13d agoYes, this! The ancient wisdom which advocated for stored procedures, which modern developers find distasteful, were really advocating for microservices close to your data, which encapsulated security, business logic, and data persistence so that multiple consumers could share the same data without repeating the logic and code. The fact that some people write those microservices in PL/SQL and some in JavaScript doesn't change the relevance of the encapsulation.
- jeremyjh 13d agoBut PL/SQL is a horrifying language. You have barely any facilities for modularity, encapsulation or composition. Every procedure is just one name in a huge flat name space. Development tools are primitive. The language is absurdly verbose - it was state of the art in the 1970s when COBOL reigned supreme.
- est 13d agoThis is an implementation problem, you can introduce a JIT'd language plus some "container" with "versioned deployments" in modern DB clusters.
- laughing_man 13d agoThat's the theory. I never ran across a project that used stored procedures which didn't have a code base split between stored procedures and whatever server language, with no rhyme or reason for what goes where. It's just a maintenance headache.