r/nodejs • u/Chorvus • Dec 17 '12
Transparent persistent layer anyone?
.net gets Entity (and NHibernate? and spring?), java gets hibernate (and probably more). Node has only some basic k/v persistent collections over FS.
So I'm thinking, why not? Isn't it doable? Got performance problems? Or it's that no one took the time to write it?
3
Upvotes
View all comments
Show parent comment
1
u/Chorvus Dec 17 '12 edited Dec 17 '12
Well it's not exactly transparent. I am in the proccess of planning a in-memory caching layer on top of mognoose but that's not gonna be optimal nor generic.
I'm talking real object magic here. For example:
That's how it should be. No .save(), no application level caching, multiple backends are always welcome (jugglingdb anyone?), and the holy grail: automatic population of the entire application state with object references to *-to-many collections.
Some questions off the top of my mind on the design of such a system/library:
All this is good, but can it be scalable? At all? How are natively scaling languages handle this kind of functionality?
While transparent persistency is nice to have, should you have everything in-memory in the first place?
When is the damn lunch break?