PhotonLibOS icon indicating copy to clipboard operation
PhotonLibOS copied to clipboard

Integration with Web Sockets

Open misner5 opened this issue 1 year ago • 9 comments

Hello,

I saw your post on websocketpp where you proposed using PhotonLibOS to make a faster web socket server.

I wanted to encourage you - this would be awesome and very useful. For sure faster web socket tool in C++ that makes use of io_uring would be amazing and likely break records.

If you integrated websockets into your library or integrated into websocketpp, myself and other C++ coders I know would be very interested. Please let me know if you hear of any developments in this area.

Cheers and thanks for this research & hard work, Michael

misner5 avatar Aug 27 '22 22:08 misner5

Yes, we are definitely open to cooperations. But unfortunately, this project's orientation is toward the base library, and thus not likely to integrate many high level applications or frameworks. For now we just want to keep this lib small and clean, and squeeze the performance as much as the coroutines would potentially give.

But it doesn't mean we are reluctant to embrace them. As you may not know, Photon 0.3 is just about to release. It introduced a new photon::std namespace that includes a lot of equivalents from the std. Developers can easily do the search and replace in their own projects, and quickly transform a traditional thread-based programs to coroutine-based ones. We assume it will attract more high level applications to Photon.

Back to the cooperation with websocketcpp, I think some efforts are being done or not started.

  1. We are building an independent website for developers to view the documents. Now most of the docs hide in header files. Not so friendly to read and search.
  2. Maybe we need to build a live chat channel (Slack?), so we can answer developers' questions in time, and in short reply.

Any way, we are willing to provide any essential helps if you guys want to integrate Photon into your project.

Last but not least, Photon still doesn't support Windows yet. Is Windows essential to you?

beef9999 avatar Aug 28 '22 02:08 beef9999

Ok awesome, thanks for the response.

Windows is not a factor for what we're doing. Our team does some Window coding on the desktop but on the server side we're Linux focused.

With websocketpp when I started I did a few tests on Windows with CMakeLists but when we got serious all the testing was on Linux. I had watch some YouTube videos on io_uring before coming across your github so obviously that's a Linux Kernel opportunity and pretty exciting.

I'll put a note on the websocketpp area. C++ people need to support each other, I think lots of people take it for granted and don't speak out on what is ground breaking and could move things forward.

misner5 avatar Aug 28 '22 03:08 misner5

If you integrated websockets into your library or integrated into websocketpp, myself and other C++ coders I know would be very interested. Please let me know if you hear of any developments in this area.

It's wonderful if you are interested in writing a web socket binding / implementation for Photon. We are also planning support for HTTP/2 and /3.

And websocketpp looks great. Are you (one of) the author(s)?

lihuiba avatar Aug 29 '22 04:08 lihuiba

Actually I'm user of websocketspp, but not an author... I'm currently doing lots of work in this space but haven't yet looked at writing a full web socket system. But I can see you guys are onto something really exciting so was just chatting about the topic / area...

misner5 avatar Aug 29 '22 20:08 misner5

Actually I'm user of websocketspp, but not an author... I'm currently doing lots of work in this space but haven't yet looked at writing a full web socket system. But I can see you guys are onto something really exciting so was just chatting about the topic / area...

Yes. In fact, one of our goals is trying to prove that a full-featured web server can be simpler and more performant than others. You are welcome to help it come true.

lihuiba avatar Aug 30 '22 03:08 lihuiba

It's wonderful if you are interested in writing a web socket binding / implementation for Photon. We are also planning support for HTTP/2 and /3.

Sorry for the off topic question, but any estimate for when HTTP/3 or 2 support is coming? We have a few APIs that are currently using the abandonware nghttp2-asio wrapper. Would be great to migrate to HTTP/3 :smile:

sptrakesh avatar Dec 15 '23 11:12 sptrakesh

HTTP/2 and /3 can be achieved via the libcurl binding.

@Coldwings have you tried this?

lihuiba avatar Dec 18 '23 04:12 lihuiba

HTTP/2 and /3 can be achieved via the libcurl binding.

@Coldwings have you tried this?

Oh, you were talking about HTTP client support, not server. I asked since I was looking for a replacement HTTP/2 (or 3) server implementation.

sptrakesh avatar Dec 18 '23 16:12 sptrakesh

We have planned for native support for HTTP/2/3, but we have currently have no resource to realize it.

lihuiba avatar Dec 19 '23 02:12 lihuiba