lwan icon indicating copy to clipboard operation
lwan copied to clipboard

Implement HTTP/2

Open lpereira opened this issue 11 years ago • 20 comments

lpereira avatar Jan 08 '14 11:01 lpereira

And possibly websockets

On Jan 8, 2014, at 6:20 AM, "Leandro A. F. Pereira" [email protected] wrote:

— Reply to this email directly or view it on GitHub.

fiorix avatar Jan 08 '14 12:01 fiorix

Hi,

I guess not too much progress on this one? Will some existing C libs be of any help(https://github.com/warmcat/libwebsockets https://github.com/tatsuhiro-t/nghttp2 and https://github.com/devsisters/libquic)? Or integrating a new protocol in lwan will require a separate implementation?

I'm not sure I'll have the time to contribute myself, but will try to find some.

6D65 avatar Apr 01 '15 13:04 6D65

Not sure you can really rely on an external library for such an important part of the web server?

ValtsS avatar Apr 01 '15 13:04 ValtsS

One of the advantages of lwan is that it's pretty small, and one could be looking at those implementations for inspiration, while reimplementing/integrating it in lwan, but the bad thing is that quic and http2 are a moving target(http2 it's almost there now), so the contributor would have to maintain and update the lwan implementation, i'm not ready for such a commitment.

I'm wondering what @lpereira has to say about it. Lwan seems to make wonders with http1.1, it would be interesting to see what can be done with quic/http2.

Update:

Had a chance to look into the libquic implementation, and it's quite big with quite a few dependencies, and as far as I've seen it's mostly c++. It definitely won't fit the lwan's approach of parsing the requests. Probably one of the hardest parts in the http2/quic implementation are the binary request headers(fast and without allocations), and that quic works over udp and has it's own congestion mechanisms, basically reimplementing tcp over udp. Probably it would have been possible to reuse some parts of the http2 implementation(like header parsing) in the quic implementation. This all seems like a lot of work, and refactoring.

6D65 avatar Apr 01 '15 14:04 6D65

For WebSockets, this blog post seems quite nice: https://blog.pusher.com/websockets-from-scratch/

lpereira avatar May 22 '15 11:05 lpereira

For HTTP/2 I'd write everything myself, like I did with HTTP/1. This video is a nice one as well, although from the client side.

lpereira avatar May 22 '15 11:05 lpereira

I was looking for a web server that I can easily extend with C/C++ code but I really need websockets. Is there any change of getting websockets in lwan ? Anything I can do to help ?

mcirsta avatar Nov 30 '15 20:11 mcirsta

@mcirsta There's a chance, yes, but since I don't need it at the moment and I've been pretty busy with other personal projects, it's quite unlikely I'll implement it soon. I'm not against having it, though, so if you'd like to give the implementation a try I'll gladly help you.

lpereira avatar Dec 01 '15 10:12 lpereira

Thanks, the problem is that I'm looking for something that will just work. Implementing this for lwan would take me too much time and I need to develop an IoT gateway too ( for wich I need websockets ). I've found some solutions out there that have websockets working so I'll try those.

mcirsta avatar Dec 01 '15 13:12 mcirsta

@lpereira HTTP/2 seems to be finalized now, how about getting HTTP/2 support for the next LWAN milestone ?

GuacheSuede avatar Feb 27 '17 22:02 GuacheSuede

There are many reasons I haven't implemented this yet, and the major one is that I'd like to work on other less demanding projects.

If I were to implement this, I'd write everything myself instead of using libraries. And this is going to take a lot of time I don't have any more.

On Mon, Feb 27, 2017, 14:44 Justin Yeap [email protected] wrote:

@lpereira https://github.com/lpereira HTTP/2 seems to be finalized now, how about HTTP/2 support for the next milestone ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/17#issuecomment-282881534, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6mbBeJEuJlNBtNQILW4bYG1AgIICrks5rg1HbgaJpZM4BYLqA .

lpereira avatar Feb 28 '17 00:02 lpereira

Just a curious question @lpereira , do you consider lwan a very demanding project ? Also if you guide me, I might want to help implement.

GuacheSuede avatar Feb 28 '17 09:02 GuacheSuede

Right now, no, Lwan isn't very demanding -- it's in a maintenance state. However, before that, yeah, I'd work on it almost every free waking hour. I don't think you're ready to implement HTTP2 yet, but keep fooling around and eventually you will.

lpereira avatar Feb 28 '17 14:02 lpereira

Alright sure Thanks.

GuacheSuede avatar Feb 28 '17 15:02 GuacheSuede

@lpereira Do you happen to know where is your http implementation in lwan ? which file persay

GuacheSuede avatar Feb 28 '17 15:02 GuacheSuede

Read this blog post here. It won't say which files implement what, but there are some code excerpts. Then you can use git grep to look around.

lpereira avatar Feb 28 '17 15:02 lpereira

Websockets is now being tracked on #230. An experimental version has been pushed.

lpereira avatar Sep 17 '18 02:09 lpereira

Are there any updates on http2 ?

GuacheSuede avatar Oct 22 '18 15:10 GuacheSuede

any updates on http2? http3?

superdolt avatar Sep 06 '21 13:09 superdolt

I'm taking a break from Lwan, so it's unlikely this will be implemented anytime soon. Please remember that this is an open source project, so if you'd like to have this implemented, you can step up. I'm willing to work with people that's implementing this feature.

lpereira avatar Sep 07 '21 01:09 lpereira