Re: Wicket-Atmosphere : best way to call server
Hi, I've tried to provide the same URL than with Wicket.Ajax.get to my request objet but it miserably fails with a client-side exception that Firebug is unable to copy / paste. I'm a bit disappointed. Is there anything I should be aware of? Regards, Pierre On Mon, Jul 8, 2013 at 10:12 AM, Pierre Goupil wrote: > Thanks, Martin! So it definitely worth giving it a try: I'll do that ASAP. > > Regards, > > Pierre > > > On Mon, Jul 8, 2013 at 8:13 AM, Martin Grigorov wrote: > >> Hi, >> >> I think you should use the Atmosphere APIs. >> >> Wicket.Ajax.get() knows nothing about WebSocket technology so it won't >> work. >> >> Wicket NativeWebSocket exposes Wicket.WebSocket.** APIs but afaik there is >> no such thing in WIcket-Atmosphere. >> >> >> On Sat, Jul 6, 2013 at 6:43 PM, Pierre Goupil > >wrote: >> >> > Good afternoon, >> > >> > When using Wicket-Atmosphere (0.11), which is the recommended way to >> send a >> > message to the server in order to receive a WebSocket (or fallback >> > transport) response? >> > >> > I mean, I am supposed to do: >> > >> > var socket = $.atmosphere;var request = new >> > $.atmosphere.AtmosphereRequest();var subSocket = >> > socket.subscribe(request); >> > subSocket.push(JSON.stringify({ 'blah' })); >> > >> > Or: >> > >> > Wicket.Ajax.get() >> > >> > ? >> > >> > I doubt that there is a sensible performance difference, but I prefer to >> > ask. >> > >> > Sorry if this is a silly question. >> > >> > Regards, >> > >> > Pierre >> > >> > > > -- "Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas mal. Alors frappez-moi de musique ! Frappez-moi de musique, maintenant !" (Bob Marley : "Trenchtown Rock")
Re: Wicket-Atmosphere : best way to call server
Thanks, Martin! So it definitely worth giving it a try: I'll do that ASAP. Regards, Pierre On Mon, Jul 8, 2013 at 8:13 AM, Martin Grigorov wrote: > Hi, > > I think you should use the Atmosphere APIs. > > Wicket.Ajax.get() knows nothing about WebSocket technology so it won't > work. > > Wicket NativeWebSocket exposes Wicket.WebSocket.** APIs but afaik there is > no such thing in WIcket-Atmosphere. > > > On Sat, Jul 6, 2013 at 6:43 PM, Pierre Goupil >wrote: > > > Good afternoon, > > > > When using Wicket-Atmosphere (0.11), which is the recommended way to > send a > > message to the server in order to receive a WebSocket (or fallback > > transport) response? > > > > I mean, I am supposed to do: > > > > var socket = $.atmosphere;var request = new > > $.atmosphere.AtmosphereRequest();var subSocket = > > socket.subscribe(request); > > subSocket.push(JSON.stringify({ 'blah' })); > > > > Or: > > > > Wicket.Ajax.get() > > > > ? > > > > I doubt that there is a sensible performance difference, but I prefer to > > ask. > > > > Sorry if this is a silly question. > > > > Regards, > > > > Pierre > > >
Re: Wicket-Atmosphere : best way to call server
Hi, I think you should use the Atmosphere APIs. Wicket.Ajax.get() knows nothing about WebSocket technology so it won't work. Wicket NativeWebSocket exposes Wicket.WebSocket.** APIs but afaik there is no such thing in WIcket-Atmosphere. On Sat, Jul 6, 2013 at 6:43 PM, Pierre Goupil wrote: > Good afternoon, > > When using Wicket-Atmosphere (0.11), which is the recommended way to send a > message to the server in order to receive a WebSocket (or fallback > transport) response? > > I mean, I am supposed to do: > > var socket = $.atmosphere;var request = new > $.atmosphere.AtmosphereRequest();var subSocket = > socket.subscribe(request); > subSocket.push(JSON.stringify({ 'blah' })); > > Or: > > Wicket.Ajax.get() > > ? > > I doubt that there is a sensible performance difference, but I prefer to > ask. > > Sorry if this is a silly question. > > Regards, > > Pierre >
Wicket-Atmosphere : best way to call server
Good afternoon, When using Wicket-Atmosphere (0.11), which is the recommended way to send a message to the server in order to receive a WebSocket (or fallback transport) response? I mean, I am supposed to do: var socket = $.atmosphere;var request = new $.atmosphere.AtmosphereRequest();var subSocket = socket.subscribe(request); subSocket.push(JSON.stringify({ 'blah' })); Or: Wicket.Ajax.get() ? I doubt that there is a sensible performance difference, but I prefer to ask. Sorry if this is a silly question. Regards, Pierre