You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Pierre Goupil <go...@gmail.com> on 2013/07/06 17:43:40 UTC

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

Re: Wicket-Atmosphere : best way to call server

Posted by Pierre Goupil <go...@gmail.com>.
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 <go...@gmail.com>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 <mg...@apache.org>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 <goupilpierre@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")

Re: Wicket-Atmosphere : best way to call server

Posted by Pierre Goupil <go...@gmail.com>.
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 <mg...@apache.org>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 <goupilpierre@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

Posted by Martin Grigorov <mg...@apache.org>.
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 <go...@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
>