New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switched to using the uWebSockets library for http. #364
Conversation
Thank you very much. I really like this so far. @hannahbast Could you also comment on what you think about external HTTP libraries in general and this one in particular? |
I also think this is a very good idea, I originally planned to use Beast HTTP that's currently being incubated for the boost project. Used that on another test, but yeah anything decently maintained will be leaps better than what's being used now, so I'm all for it! |
I have also looked a tiny little bit into
|
Ok, when I tried it it was still possible to use beast without the rest of boost and even a modified (i.e. don't spawn a thread per request) classic threaded model. IMHO that still fits QLever well since result generation does need CPU and so one thread per CPU with a shared There should be a version of a wrapper for that still in the AD Gitlab but yeah I think Beast is definitely adopting the whole Boost stuff. So I think uWebSockets makes sense and if I skimmed the code right it would even still use the same threading model, though it's a bit hard to tell what that listen call does. |
ecd5650
to
115f04e
Compare
c8c664e
to
8ea0541
Compare
Switched to using the ExternalProject module for using uWebSockets makefile. Added several listening threads. Server.cpp code style Switched to the FindOpenssl module for linking open ssl. Added openssl libraries to the dockerfile removed one line of whitespace to tests a workflow
Ran clang-format after the rebase.
8f12f1d
to
6c3cc5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1-1 with Johannes, with some notes
Thank your very much for this work. |
We are currently using a custom http implementation on top of native sockets to provide the http server. This pr instead uses
the uWebSockets library to provide the http and routing implementation. The library was chosen for its advertised speed, being maintained and having a small list of dependencies (currently only zlib. We also need openssl for it, if we want ssl support).
I've currently done the bare minimum to get the library working, as it wasn't quite clear yet what library we want to use, and I was mainly curious about the usability of the library. There is a lot of old code that can be removed, and the integration into cmake should probably be changed (e.g. by using
ExternalProject_Add
).@joka921 @hannahbast What do you think about the library? Should I finish this pr, or do we want to use something else?