2 ms·
Yes, well, you summarize most of my points but one: the importance of callbacks is not just in the database triggering application actions (as would be done wit
by pron 14y ago
Yes, well, you summarize most of my points but one: the importance of callbacks is not just in the database triggering application actions (as would be done with asynchronous queries or the message bus you mention), but by scheduling application code to run on appropriate CPU cores.
Our ultimate goal isn't to make a new programming model for its own aesthetic (or non-aesthetic) sake, but in order to take advantage of multiple cores -- namely, for the sake of performance. So the database does not "control" the application -- it actually parallelizes it.
And as for SQL server, yes, I guess it's a similar concept but a different kind of database. I advocate that the database should be part of the application; they should be sharing the same heap in the same process, and only then should the applications let the database "drive". That is why I also don't quite agree with your wording of "centralizing logic in the DB" because the DB and the application are one; certainly the DB is not more (or less) centralized than the app. Once you get that, there is no point in being ashamed of it. Just like you let your web-app container parallelize your presentation layer, you let the database parallelize your business logic. In both cases the middleware shares the same process as the app, and the leap of faith required isn't big at all.
- threepipeproblm 14y agoThanks for your response! I think it addressed my comments well. It does make me think about the fact that almost every major DB today runs out of process and that the market seems to have selected this pretty definitively. It seems like only recently some products are running in-process for performance reasons. But if I understand the trade offs here, only a single application can run in-process with the db. Also the db is not protected from crashing when the app crashes. But this is the 1990's explanation... any thoughts on how that applies to your situation?
- pron 14y ago> almost every major DB today runs out of process and that the market seems to have selected this pretty definitively. True. That's why I've tried to show the performance to be gained by letting the DB become integrated with the app. This is a result of the DB having just the right kind of knowledge about the relationships among domain objects to allow it to parallelize business logic. > But if I understand the trade offs here, only a single application can run in-process with the db. Also the db is not protected from crashing when the app crashes. Well, if the application and DB are one, so what? Note that we're only talking about OLTP DBs here. I don't see much of a reason for analytics DBs to be unified with the app. How often do you need more than one app working with the same OLTP data? However, if you absolutely must, there is no reason why the in-process DB shouldn't store its data in shared memory, thus allowing other DB instances to access the information. There are ways to ensure that if one app crashes the memory is left in a consistent state.
- threepipeproblm 14y ago>> How often do you need more than one app working with the same OLTP data? If you are running a modern web startup, it's probably not an issue. But in a typical business... often IMO. And it was one of the original use cases that drove the adoption of databases in the first place. Would be interested in seeing you blog about the last sentence of your last reply. Thanks for engaging my comments.