Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] asynchronous flush?

Hi Simone,

On July 28, 2016 at 17:07:51, Simone Bordet (sbordet@xxxxxxxxxxx) wrote:

> If Jetty also does not expose any calls to do this, I suppose setting 
> a low buffer size on the ServletResponse then padding the writes would work. 
> But it’s not very elegant :) 

I don't think we have async flush, but it's a nice feature to have. 
Can you file an issue about this ? 

filed: https://github.com/eclipse/jetty.project/issues/787



> Btw, to show you specifically what we’re talking about, this servlet feeds 
> the traffic visualization shown on the map here: 
> http://www.scarabresearch.com/. For this use case, SSE seems quite adequate. 

Pegs the CPU at 100%. 

There may be too many pixels on your Retina screen ;) 


Are you using Jetty's SSE Servlet ? 
https://github.com/eclipse/jetty.project/blob/jetty-9.3.x/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/EventSourceServlet.java 

Thanks for pointing it out, I was not aware of this, so rolled my own :) Looks like this implementation would also suffer from the problem of blocking writes/flushes, if you want to broadcast the same message to many clients.


Regards,

  Viktor


Back to the top