On 3/7/07, Peter Neubauer <[EMAIL PROTECTED]> wrote:

Hi,
I decided to go with pushlets, mainly because Cometd requires Servlet
API 2.5, thus Jetty 6.x which is not available as an OSGi bundle yet.

However, as it works now, I am opening a new topic for every web
client in order to be able to provide personalized content to it,
something like

function join() {
                token = document.getElementById('token').value;
                p_join_listen('/gmarkers/' + token);
        }

putting the token into the page with e.g. UserId, and then

// Data Event Callback
                function onData(event) {
                        id = event.get('id');
                        lat = event.get('latitude');
                        longi = event.get('longitude');
                        point = new GLatLng(lat, longi);
                        type = event.get('type');
                        img = event.get('img');
                        if ( getMarkerById(id) == null) {
                                createMarker(point, type, id, img);
                        }
                        else {
                                var marker = getMarkerById(id);
                                marker.setPoint(point);
                        }
                }
to update just this users buddies in the GMap.

Then, on the server I am creating Events targeted for this channel and
dispatching them. Seems lik e Cometd is using much the same semantics.


Yes, it seems to be very similar indeed. An advantage I see with cometd is
that you can use jetty continuations to bypass the one thread per request
limitation and thus improve scalability. But as you say the requirements for
cometd are not suitable in all cases, and not in yours.

I think this should be supported in a Wicket way, but I think this use
case would be nice to do from within Wicket.


I agree. And I think that having a single interface to do push, implemented
either with simple polling, pushlets or cometd would be even more
interesting. Then you could easily switch between implementations.

- Xavier

WDYT?

/peter

On 3/6/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> class NewChatMsgEvent implements ComentEvent {
> ...
> }
>
> final WebMarkupContainer chatwindow=new
> WebMarkupContainer("chatwindow");
> chatwindow.add(new CometBehavior(NewChatMsgEvent.class) {
>                protected void onEvent(CometEvent e, ComentTarget t) {
>                     t.addComponent(chatwindow);
>                 }
> }
>
> form.add(new SendChatButton() {
>       public void onsubmit() {
>
> getApplication().getCometBroadcaster().publish(new
> NewChatMsgEvent());
>        }
> }
>
> something like that should do quiet nicely i think
>
> the broadcaster then has to find all active pages that have a behavior
that
> subscribed to this event and trigger them.
>
> -igor
>
>
>
> On 3/6/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > i am planning to build an abstraction for cometd support (jetty and
tomcat
> now)
> > inside wicket. So that it really works like a ajax behavior that has a
> constant open connection
> > where that you can get and then write the components you need.
> > I first need to build that we can release and get the page again (set
the
> pagemap barrier and release it when in idle mode)
> >
> >
> > If somebody has nice idea's/api for this please speak!
> >
> > johan
> >
> >
> >
> > On 3/6/07, Peter Neubauer < [EMAIL PROTECTED]> wrote:
> >
> > > Hi there,
> > > I am trying to push out events that contain the moving locations of
a
> > > users buddies, so I can update the GMap on the page using plain JS
and
> > > the GMarkerManager.
> > >
> > > Right now I am using Pushlet for this, but that has the disadvantage
> > > that it is not integrated into Wicket, and it uses a generic
broadcast
> > > mechanism, much like JMS subscribing to topics from JS.
> > >
> > > Is there any way to get this functionality working using Wicket, e.g
.
> > > the GMap not being reloaded, just moving the markers on a pull/push
> > > interval?
> > >
> > > Thanks for any hints!
> > >
> > > /peter
> > >
> > >
>
-------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
share
> your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
>
-------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to