Spark + Websockets

869 views
Skip to first unread message

Michael Soliterman

unread,
May 21, 2014, 12:51:20 PM5/21/14
to spar...@googlegroups.com
Anyone had success using WebSocket connections with Spark? I would love to see a tutorial or a code snippet.

Ross Lawley

unread,
May 25, 2014, 5:34:12 AM5/25/14
to spar...@googlegroups.com
I'd be interested in that as well, I'm looking to do a demo app and any hints would be great!

IVYtony smth

unread,
May 25, 2014, 7:01:40 PM5/25/14
to spar...@googlegroups.com
what can you do with websocket on top of spark? just curious about its application examples, thanks.

Misha Soliterman

unread,
May 25, 2014, 7:49:13 PM5/25/14
to IVYtony smth, spar...@googlegroups.com
The primary benefit is the ability to eliminate polling. A websocket-based connection lets the server push updates to a client. In terms of applications, game clients and collaborative web applications come to mind, but the implications of a two-way connection are much broader than that. 


On Sun, May 25, 2014 at 4:01 PM, IVYtony smth <ivy...@gmail.com> wrote:
what can you do with websocket on top of spark? just curious about its application examples, thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "sparkjava" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sparkjava/P9r23a-dXvc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sparkjava+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Schütte

unread,
Nov 3, 2014, 12:21:34 PM11/3/14
to spar...@googlegroups.com, ivy...@gmail.com
If there any new about this topic? Is it possible to use web socket on top of spark?

David Vollmar

unread,
Nov 6, 2014, 6:16:42 AM11/6/14
to spar...@googlegroups.com, ivy...@gmail.com
Yes, it's possible to use websockets with Spark. Currently it's required to modify Spark itself, as the hook to add your own Jetty handlers is not exposed through the Spark API.
See https://github.com/perwendel/spark/issues/196 for where and how to use it. I have a working prototype using the same concept.
Reply all
Reply to author
Forward
0 new messages