5 ms·
What's stopping you from storing Postgres database (or particular tables) in memory if it fits? I believe that should be possible. Also, I may not be getting w
by elmigranto 9y ago
What's stopping you from storing Postgres database (or particular tables) in memory if it fits? I believe that should be possible.
Also, I may not be getting what Datomic is, but why modify original function, you can just join results with users table.
- jtmarmon 9y agoThe machinenry for keeping peers up to date, for one. Datomic distributes all writes in real time to peers. You could probably recreate this with notify and listen in Postgres although I'm not familiar enough with the details to know if it would fully work.
- jtmarmon 9y agoAlso to answer your second question, first off there's no user table in the example so it's a bit confusing. But say we're just comparing a traditional table-per-record-type approach and why this approach still retains the coupling problem. In that scenario you could join the user table. You'd be overfetching in many scenarios but that's not a huge concern for most people, this is what active record does. However, say you want to get more than just the columns on the user table, then you run into the same issue. Suddenly the query caller needs to inform the query method to include results about some unrelated table. Because datomic is an in memory graph structure, the caller can handle grabbing that extra information without modifying the method or its call signature, obviating the need for this coupling.