Initial version of nodejs integration

refactor to createNextTupleId()