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
Sample application combining Websocketpp and Proxygen #170
base: main
Are you sure you want to change the base?
Conversation
…ation on top of Proxygen on the server side only. This adapter is naive and incurs unnecessary overhead. It is meant as a proof of concept.
|
Hi @Dalzhim thank you for taking the initiative to provide websocket support for open-sourced proxygen! It is towards our upcoming goal to extend the open-sourcing of proxygen modules and we should certainly consider the websocket part. On the other hand if we want to create this support feature available for users right now, can we consider moving it to external? Thanks, |
|
Hi @lanxi ! I'm glad to hear there are still plans to extend the open-sourcing of proxygen modules such as WebSocket. That would completely deprecate the Websocketpp bridge I have implemented in this PR which isn't as efficient as it should be. For the time being, moving this feature to external seems very appropriate! Thank you! |
|
I'd like to verify, were you asking me if you can move the new sample app I created to the external directory, or were you asking me to do it? Also I'm guessing it would be preferable if this sample application wasn't part of the binaries that are built when using the instructions out of the box. I think it should be built only when people explicitly want to experiment with it as it requires a third party library (websocketpp). |
|
@afrind has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
Hi @Dalzhim, really happy to find your pull request for websocket. We are currently using proxygen for our server, and going to support websocket, this really help us a lot! The WebSocketHandler is very simple to use, but I have a question, how can I support HTTP and websocket at the same time for the same port? Since we need to keep the compatibility for the original users. Thanks. |
|
Hi @kapcino, I'm very happy this pull request was useful to you! Please be aware that there are at least 2 things that should really be improved about it before it is production ready:
Otherwise, the solution I have used to support both HTTP and WebSocket requests on the same port is to instantiate a different I wish you good luck. Unfortunately, I have given up on this Proxygen+Websocketpp solution and migrated towards https://github.com/boostorg/beast so I don't plan any further contributions here. |
|
Thank you @Dalzhim I will check the items you mentioned. I am also curious about the reason you abandoned Proxygen solution, could you please share some of the considerations? We checked Boost beast before, and found the interface was low level and not as clean and simple as Proxygen. |
|
@kapcino: I moved away from proxygen for various reasons :
|
The quote above comes from the original blog post announcing Proxygen (emphasis mine), and it confused me when I started using it as I believed WebSocket support was builtin. It is only much later that I realized that it has never been made public.
I have worked on a proof of concept to bring together Websocketpp's support for WebSockets on top of Proxygen in order to try and drive forward real WebSocket support within Proxygen.
Here are a few highlights describing this contribution :
std::stringand getting it to usefolly::IOBufwas not trivialEven though this first draft is limited, I'm hoping it may drive forward full WebSocket support with proxygen eventually.