InstantWebP2P / nodejs-httpp

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

Discussion on HTTP over UDP techs with UDT or QUIC or KCP #22

Open sequoiar opened 4 years ago

sequoiar commented 4 years ago

HTTP over UDT over UDP was implemented. And, welcome discussion on HTTP over UDP tech with UDT, QUIC and KCP.

amiiigh commented 3 years ago

Hey there,

Could you help me find the implementation for UDT in this repo?

amiiigh commented 3 years ago

Or like which part of the code do I need to use only UDT in my nodejs code?

sequoiar commented 3 years ago

UDT api is like Net module api, while UDTS api is like TLS api. check below link for detail https://github.com/InstantWebP2P/nodejs-httpp/wiki/An-introduction-to-run-http-over-udp-with-node.js The HTTPP to HTTP modules mapping is like below: net -> udt, http -> httpp, tls -> udts, https -> httpps.

amiiigh commented 3 years ago

@sequoiar the first line var udt = require('udt'); imports udt. my question is where is the implementation of this library?

sequoiar commented 3 years ago

@amiiigh check https://github.com/instantwebp2p/uvudt/tree/8d4f021d8042a82988472a9db43382fa28190d9d UDT is an extension to libuv as uvudt

NooshinEghbal commented 2 years ago

Does HTTPP use the packet/stream mode of UDT or message mode? Where can I find the parts of the code when HTTPP uses sending/receiving calls of UDT? Thanks

sequoiar commented 2 years ago

@NooshinEghbal HTTPP(http) is run UDT stream mode. if you want message mode, you can implement nodejs/diagram over UDT message mode.

NooshinEghbal commented 2 years ago

I looked into the wiki page and the HTTPP server/client example. So, if I have a group of resources (e.g. font, image, css and JavaScript files) for a web page, how can I use HTTPP to measure the page load time? And also how can I change the underlying protocol from UDT to KCP for HTTPP?

sequoiar commented 2 years ago

@NooshinEghbal there is no httpp enabled web-browser so far. not sure httpp.client can help on it.

NooshinEghbal commented 2 years ago

What if I just want to send a group of files from httpp server to the client?

sequoiar commented 2 years ago

@NooshinEghbal you can try httpp.get a file from httpp.server . you need assemble some basic HTTP message.

refer to https://github.com/InstantWebP2P/nodejs-httpp/blob/v12.x-httpp/test/httpp/httpp-cln.js