mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bf_...@brainlounge.de>
Subject Re: [vysper][pubsub] Realworld demo with realworld client
Date Sat, 04 Jul 2009 21:33:44 GMT
Michael Jakl wrote:
> Hi!
> I've been trying to implement a demo application for my publish/subscribe
> extension. My experience so far is all but rosy, in fact I'm tearing my hair
> out.
> Let me explain what I did so far:
> I've tried basic usage of the server with Pidgin and Gajim, both cannot connect
> to the server due to XML parse errors or programming errors? Pidgin is
> widely used
> and Gajim includes support for the pubsub extension.
> Smack to the rescue! Using smack I could connect to the server and send a few
> messages back and forth. As soon as I switch to the pubsub extension for
> smack[1] the whole thing breaks down again.
> Let me show a small part of the code I wanted to write (c1 and c2 are
> XMPPConnections, one for user1 and one for user2):
>  PubSubManager psm1 = new PubSubManager(c1);
>  PubSubManager psm2 = new PubSubManager(c2);
>  // create test node by user1
>  Node test1 = psm1.getNode("test");
>  test1.subscribe("user1@vysper.org");
>  // subscribe user2 to test node
>  Node test2 = psm2.getNode("test");
>  test2.subscribe("user2@vysper.org");
>  // user1 publishes some item
>  Item<PublishItem> item = new Item<PublishItem>("something");
>  test1.send(item);
> In plaintext:
>  - user1: create a node "test"
>  - user1: subscribe to "test"
>  - user2: lookup "test"
>  - user2: subscribe to "test"
>  - user1: send a message to "test"
>  - user1: receive notification (not shown)
>  - user2: receive notification (not shown)

Seems all good to me.
To avoid making this a smack pubsub extension debugging project you
could send plain stanzas using the barebone smack API.

> The problem starts with the subscribe request. It seems that Vysper
> does not add the "from" address
> of the sender (see RFC3920, 9.1.2) to the stanzas.

Maybe you could write a simple unit test for that?
This should be an easy thing to fix.
Could you open a JIRA for that, please?

> So, for today I've got to stop. I'll continue tomorrow. After writing this mail
> I've a better picture where to start tomorrow (Rubber-duck method: [2]). If
> anyone has a hint or an suggestion I'd still be very grateful!

Now you know why I insisted to start early on this 'demo'... and it was
not to see you bold at the end of the summer ;-)

>  1: http://github.com/squaremo/smackx-pubsub/tree/master
>  2: http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html
> Thanks for listening,
> Michael

View raw message