3 ms·
Every architecture? I don't think so. You're conflating a whole bunch of topics here. Document-stores have their uses but they are not the best for everything.
by manigandham 8y ago
Every architecture? I don't think so. You're conflating a whole bunch of topics here.
Document-stores have their uses but they are not the best for everything. Thinking about structure isn't hard and all modern RDBMS have JSON fields now if you need that flexibility, while still giving you ACID, transactions and the power of SQL.
SOA has nothing to do with ESB/distributed logs/event sourcing, and none of that has to do with MongoDB or document-stores. Event-sourcing is unnecessary for most, MongoDB is not a good event-sourcing system, and the point of materialized views on a stream is that they can be modeled in whatever database works best, not to just accept what the stream gives you.
The last part about treating a database as a cache is also strange. Use a cache if you need one, but that's a much more complex topic then just having a few collections that are caches. And again, it has nothing to do with MongoDB or document-stores being the correct architecture for everything.
- lkrubner 8y agoI am not sure how you were confused by this: "In large Enterprises, you will inevitably be trying to get multiple services and databases to work together. The old style for dealing with this was the ESB (Enterprise Service Bus) or SOA (Service Oriented Architecture)" You write "SOA has nothing to do with ESB" yet both are attempts at "you will inevitably be trying to get multiple services and databases to work together" which was literally the sentence before the one you are reacting to. As to this: "SOA has nothing to do with ESB/distributed logs/event sourcing, and none of that has to do with MongoDB or document-stores" The point of my comment is that MongoDB is so flexible it can replace other approaches to the problem of "get multiple services and databases to work together" including ESB and SOA. At this point, I can not think of any reason to ever use an SQL database. Either your canonical data will be in Kafka, or it can go in MongoDB. There is no need for SQL databases, ever. About this: "MongoDB is not a good event-sourcing system" Obviously, which is why I included a link to the Jay Kreps essay. Kafka is better for an event-sourcing system. I'm not sure how you misread that part. About this: "The last part about treating a database as a cache has nothing to do with databases" It feels like you are almost deliberately trying to misread what I wrote. My whole point was that MongoDB is so flexible, it can work as a cache, and also as a store for canonical data (in those circumstances when you are not storing your canonical data in something like Kafka). Is that more clear?
- manigandham 8y agoA database is not comparable to SOA or ESB. They are 3 entirely separate concepts. They're not used to solve the same problems and they are not interchangeable. The only confusion is in thinking they are. > There is no need for SQL databases, ever. What? This is nonsensical and ideological. > MongoDB is so flexible, it can work as a cache That's meaningless because any database can be used as a cache, but caching is not as simple as storing some records in a collection. You seem to be caught up in some hype around Kafka, event-sourcing and MongoDB when this is a rather poor architecture choice for most applications. If you're going to say that relational databases are useless, you need some solid arguments instead of mixing up a bunch of buzzwords.
- lkrubner 8y agoAbout this: "A database is not comparable to SOA or ESB." It feels like you are deliberately misreading what I wrote. SOA and ESB and the unified log architecture that Jay Kreps wrote about are 3 different approaches to deal with the problem of "In large Enterprises, you will inevitably be trying to get multiple services and databases to work together." That may not be the only reason for SOA and ESB and unified logs, but multiple services with multiple databases is clearly a very large reason for the rise of these 3 different architectures. It is trivial to find articles in which "multiple services and databases" are mentioned as the impetus giving rise to each of these 3 architectures. Is that more clear?
- manigandham 8y agoYou're repeating the same thing. SOA is an architectural style where the entire business domain functions as independent components talking to each other. ESB is one type of communication between those components. A unified log is a way to persist those communications. A database is a data persistence system. None of these things replace anything else, they are all separate layers of solving a problem. They are not "3 different architectures" and can all be used at the same time even. Talking about a unified log and SOA to say that MongoDB is the best database for everything only shows a poor understanding of the underlying technical concepts.