InstantWebP2P / nodejs-httpp

Run HTTP over UDP with Node.js
Other
145 stars 25 forks source link

make node-httpp as module instead of fork of node.js #3

Closed InstantWebP2P closed 4 years ago

InstantWebP2P commented 11 years ago

make node-httpp as addon or module is prefer, than fork of node.js.

legege commented 11 years ago

This is much needed, and would drive adoption.

No9 commented 10 years ago

Started a UDT module myself then rediscovered this so I thought I would get in touch. Would like to help on this but not sure where to start....

sequoiar commented 10 years ago

@No9

three choices to make UDT as node.js module:

  1. make UDT library as libuv addon
  2. rewrite UDT protocol with libuv API
  3. rewrite UDT protocol with Node.js udp API

for item 1, I did write one, but not fully tested. you can start from https://github.com/InstantWebP2P/libuvpp/tree/v0.8-uvudt/uvudt

for item 2, I prefer, but I have no bandwidth on it so far.

for item 3, someone did it, like https://github.com/bigeasy/udt. but, UDT needs the exact timer and dedicated thread/worker to maintain it's state machine. I did doubt on this approach against Node.js single thread model.

No9 commented 10 years ago

@sequoiar

  1. I think this would make the work more complex than it needs to be. We would not be able to utilse the default loop in node.js
  2. I think this is the option Are we not just taking this https://github.com/InstantWebP2P/udt4/blob/master/udt4/app/appserver.cpp getting rid of the pthread for libuv and then putting a node.js API infront ot it?
  3. Yes I made the same mistake too :) https://gitlab.com/venshare/udpdt There is an interesting none UDT spec approach that could be event driven but that is research after this is I suppose.
sequoiar commented 10 years ago

@No9

that's ok, you can put node.js API on UDT library directly.
But, if you are going implement TCP-compatible API over UDT and integrate these API to Node.js default loop, the work should be still complex compare to make UDT as libuv addon. :)

No9 commented 10 years ago

@sequoiar

:) Very good point!

I have made some progress on this and have a UDT server that the sample app https://github.com/InstantWebP2P/udt4/blob/master/udt4/app/appclient.cpp talks too.

Do you have a https://gitlab.com/ account btw? You can use you github login.

sequoiar commented 10 years ago

@No9 this one https://gitlab.com/s/iwebpp

No9 commented 10 years ago

Added you there :)

bog commented 10 years ago

Very interested in progress here. Any word?

No9 commented 10 years ago

@bog There is a lot of work in making this a node_module. I am currently building a wrapper around UDT and then going to see what the next steps would be.

No9 commented 9 years ago

It still has the multi-threading issue raised by @sequoiar and a lot of other things wrong but this sample now goes end to end https://gitlab.com/no9/udt4

sequoiar commented 9 years ago

@No9 great work.