Re: Wicket-Atmosphere : best way to call server

2013-07-08 Thread Martin Grigorov
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 goupilpie...@gmail.comwrote:

 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

2013-07-08 Thread Pierre Goupil
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 mgrigo...@apache.orgwrote:

 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 goupilpie...@gmail.com
 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

2013-07-08 Thread Pierre Goupil
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 goupilpie...@gmail.comwrote:

 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 mgrigo...@apache.orgwrote:

 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 goupilpie...@gmail.com
 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)


Wicket-Atmosphere : best way to call server

2013-07-06 Thread Pierre Goupil
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