Friday 9 June 2017

How to generate and pass transaction-ids automatically in NodeJs (strict mode)?

I am building a framework in nodejs that does RPC calls (using thrift/proto).

I want the clients to automatically send transaction-ids to the server. So that means that if I am doing nested calls, I need to be able to pass the same transaction-id to all the client calls. Now, since the client is a different framework function, one way is to rely on the context / dynamic scope.

However, strict mode makes it impossible.

Want to understand whats the best way for us to implement a framework that automatically deals with passing on transaction-ids?



via user3014859

No comments:

Post a Comment