coast-team / netflux

JavaScript client and server side transport API based on WebRTC & WebSocket
https://coast-team.github.io/netflux
GNU Affero General Public License v3.0
213 stars 14 forks source link

WASM #148

Closed hybrisCole closed 6 years ago

hybrisCole commented 6 years ago

would it be any advantage in using this along with WASM?

kalitine commented 6 years ago

I do not think so. At least not very big because there is no hard computations here. The complexity is in the architecture and distributed algorithms who manage network topology structure and connection establishment.

I would say that there is only one thing we may think about and is the message protocol. Netflux uses Protocol Buffer (protobuf.js library) as a transport format for all messages. The library's author claims that protobuf.js is faster than JSON stringify/parse (which is native code), but still all message construction/parsing is done in JS. It make sense to think that we may get a performance gain would it be in wasm.