Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Threading considerations for WebSocket server

Hi guys,

 

This is my first project with Jetty, so please pardon any newb-ness.

 

I’m developing a server that will receive a live data stream from a socket, translate said data into a pretty JSON format and then push the JSON out to a sizable number of clients connected to a WebSocketServlet.

 

I’ll have one or more threads accepting the data from the non-Jetty TCP server, then pushing the data to the WebSocket clients via a call to Jetty’s WebSocketConnection.sendMessage().  I’m guessing I should I consider creating my own thread pool to handle the multiple sendMessage() calls to the clients, as it doesn’t appear that sendMessage() is non-blocking and thus a misbehaving or poorly performing call to sendMessage() could affect QOS of the outgoing streams to the other clients.  Is this correct?  Or does Jetty use a thread pool under the hood when sendMessage() is called?

 

Thanks!

Jeremy

 


Back to the top