Through my work with https://github.com/dashhive/DashJoin.js and https://github.com/dashhive/DashGov.js I believe I've discovered the minimal layer of abstraction that maximizes practical use of the P2P network without a strong dependency on a particular type of network proxy or protocol.
Since the general node and EventEmitter approach doesn't work well with async/await, I believe I'll be using a pattern of let message = await session.accept(); to more closely model the familiar pattern found in Go and other languages.
This will probably become a hard dependency of DashJoin.js, and future P2P development I DashGov.js (if any). It's almost as lightweight as https://github.com/dashhive/DashTx.js/pull/79/files#diff-dcba0694ad59e9893af33895826b399745c8e3ace322c260c2e9ab5244bb0427, but just not quite lightweight enough to justify inclusion.
Through my work with https://github.com/dashhive/DashJoin.js and https://github.com/dashhive/DashGov.js I believe I've discovered the minimal layer of abstraction that maximizes practical use of the P2P network without a strong dependency on a particular type of network proxy or protocol.
invmessagesSince the general node and EventEmitter approach doesn't work well with async/await, I believe I'll be using a pattern of
let message = await session.accept();to more closely model the familiar pattern found in Go and other languages.This will probably become a hard dependency of DashJoin.js, and future P2P development I DashGov.js (if any). It's almost as lightweight as https://github.com/dashhive/DashTx.js/pull/79/files#diff-dcba0694ad59e9893af33895826b399745c8e3ace322c260c2e9ab5244bb0427, but just not quite lightweight enough to justify inclusion.