@sebmck@wesleytodd EventEmitter is a decent thing to use if you want to compose requirements as you build it. π
It's a node process, so your async lock is probably already any variable in scope of the emitter. And the var could be a map for your cache! Anyway. Good luck! These are fun choices.
@MagicznySzymek@matteocollina DI is just fancy arg passing haha. And the more automated the container the more you either depend on a build step or instantiation complexity. That complexity is harder and harder to test by nature and scales up. You need to track all the edges, the less magic it is the better.
@MagicznySzymek@matteocollina It doesn't. just make your state instantiatable. :shrug: this is about how you feel like passing arguments to the functions in your program. You pass state in as an arg, you make objects with a factory that injects state, or you put it in the vm somewhere where you can get it.
@matteocollina Export the state. Make your state mockable. Solve it in one spot.
Making local changes in code bases like this is usually way easier than any other form of advanced di or additional positional arguments. Nike code ;)
@JPMajor @quephird My dad worked on this. I saw it take off at the cape, and was there in viewing at cal tech when they burned it up. Always makes me smile seeing through it's lens. Ty!
@jfhbrook Seems like the only way is to make a sh wrapper for the node binary. Once something is a process it only really knows it's path env and args. Can snoop around in /proc/pid and see. Or just use "node" if it's resolved by which