[jetty-users] Streaming data TO Jetty?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-users] Streaming data TO Jetty?

Otis Gospodnetic
Hello,

I'd like to be able to push data (more or less a continuous stream) from clients (e.g. using Apache HttpClient library) TO Jetty.
I currently have a system where clients make use of KeepAlives, which is nice, but they still issue an explicit HTTP POST request to Jetty every N seconds.

Is there a way to avoid making explicit HTTP requests like that and would streaming the data (somehow) actually be more scalable than issuing explicit POSTs?
Is this doable and how exactly does one stream data to Jetty?

Thank you,
Otis 
----
Performance Monitoring for Solr / ElasticSearch / HBase - http://sematext.com/spm


_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Streaming data TO Jetty?

Simone Bordet-2
Hi,

On Mon, May 14, 2012 at 7:20 AM, Otis Gospodnetic
<[hidden email]> wrote:

> Hello,
>
> I'd like to be able to push data (more or less a continuous stream) from
> clients (e.g. using Apache HttpClient library) TO Jetty.
> I currently have a system where clients make use of KeepAlives, which is
> nice, but they still issue an explicit HTTP POST request to Jetty every N
> seconds.
>
> Is there a way to avoid making explicit HTTP requests like that and would
> streaming the data (somehow) actually be more scalable than issuing explicit
> POSTs?

Depends on the loads we're talking about. I have seen Jetty serving
40k and more POSTS per second, so "more scalable" depends on your
mileage.

> Is this doable and how exactly does one stream data to Jetty?

A good viable alternative is to use WebSocket.
Jetty has a WebSocket client that you can use to stream data to the
server, and that is way more efficient than HTTP.
For a comparison, see
http://webtide.intalio.com/2011/09/cometd-2-4-0-websocket-benchmarks/.

A full fledged solution would be to use CometD (http://cometd.org),
that gives you authentication, network failure detection and automatic
reconnection, an extensible framework (with already available
extensions, for example for message acknowledgement, etc.), transport
fallback, etc., etc.

Simon
--
http://cometd.org
http://intalio.com
http://bordet.blogspot.com
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz
_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users