Abstract message protocol for nodejs