users@grizzly.java.net

Re: best strategy for streaming stock quotes?

From: Marc Arens <marc.arens_at_open-xchange.com>
Date: Thu, 20 Mar 2014 18:24:15 +0100 (CET)

Sadly it's not that easy:

- Not all clients support websockets http://caniuse.com/#search=websocket
- Not even every piece of infrastructure support websockets, apache as balancing
proxy doesn't for example
- For frequent updates from the server side comet doesn't seem to be the best
solution
either because of frequent reconnects but not all clients support sse
http://caniuse.com/#search=server-sent, yet it isn't as bad as frequent polling.

> On 20 March 2014 at 17:54 Riyad Kalla <rkalla_at_gmail.com> wrote:
>
>
> I believe this is one of those quintessential use-cases for web sockets,
> maybe this will be of some help?
> https://www.websocket.org/quantum.html
>
>
> On Thu, Mar 20, 2014 at 9:45 AM, Andrew Munn <andrew_at_nmedia.net> wrote:
>
> > What would be the best strategy for streaming realtime stock prices to a
> > number of client web pages over the internet(not just a LAN)? messages
> > will be small (under 16 bytes) but numerous and minimal latency would be
> > ideal.
> >
> > The idea is a browser opens a web page from Server #1, on that page is an
> > area where prices are displayed. Server #2 feeds those prices into that
> > page and they're displayed. Should Server #2 be using:
> >
> > WebSockets?
> >
> > Comet? (HTTP Streaming? Long Polling?)
> >
> >
> > Thanks!
> >

Best regards,
Marc