I’m coding a simple websocket server on netty. Before a client connection has been accepted, the server must authenticate client(via another http server). The authentication request may take a several seconds. So, I do the auth request in a separate thread. When client has connected to the server, I submit a new auth task to the thread pool. The webscoket handshake operation will completed in the same thread just after the authetication.
Is it correct applying of thread pools from netty server design?
I read about ExecutionHandler, but I haven’t any more blocking tasks after successful authentication has been completed in my server.
I think I would just use an ExecutionHandler and remove it from the ChannelPipeline once you not need it anymore. This should keep things simple ..