A year on from this, a bit of an update on this; bandwidth is a great concern, without a doubt. Most of the changes came from a switch to MySQL from the MongoDB land.
One of the questions I've had since January was working with type safety in case of NodeJS. TS/others do provide some solutions.
The major concern though is runtime safety, particularly when working with the database. We moved away from Mongoengine in 2015/6 to Pymongo and experimented* with two type check versions; one each from from my colleague and myself. And experimental for the same reason - runtime safety.
Since January when I started working with PN, had to work with MySQL after ages and the strongly typed nature got covered at one end of the funnel. The other, being NodeJS, was still subject to the same concerns.
While I wanted to rebuild something I worked on circa 2013/4 a la Mongoengine, bandwidth became a major concern. Though I did get to implement some parts of it, the itch did remain. Sometime late last week, got time to sit with this after ages.
Now that I'm not employed (partly a conscious decision considering my mental health, recuperating sort of), got some time to work with this, while starting to build something I worked on while at @ImagineaTech ages back.
Chanced upon a LinkedIn post had an interesting discussion about pushing all data/type validations as much as possible to the database layer. This was something that's now possible thanks to the move from Mongo.
Now, this is still possible in Mongo, but afaik, only since 3.6. Given most of our legacy systems at Crisp run a 2.x monolith, not quite a possibility there.
In this backdrop, sat down sometime last week to build a NodeJS implementation that works on top of schemas and references. Something like an ODM but takes away most of the type information and reference mapping to the database layer, if you will.
Good thing this time around, has been the fact that I've been able to write it to a good level of satisfaction, with documentation and tests (98.3%, much to my own surprise). More than that, got myself to push it to a Github repo and start using it in one of my older projects, to replace all schema level duplication of type information as in the image above.
As it stands, tagged it to a v0.9.1 with rough edges still around, hopefully a something that would get sorted and pushed to a production ready library soon enough.