Re: [vysper][pubsub] Demo + Cheers!
Hi! On Tue, Aug 18, 2009 at 07:46, Bernd Fondermannbf_...@brainlounge.de wrote: At first: Congratulations for successfully completing your GSoC09 project on time! It's been a pleasure for me to see you working on PubSub. Thank you, it was a pleasure for me too! I hope we see you working on Vysper in future. Of course! Then I found that subscribers are receiving every published message two times (at least it is displayed two times). Can you reproduce? Maybe you get that fixed one way or the other. I've fixed it. Ironically that line had already something like // TODO maybe we add one listener more than one times? as a comment which was the case. So, thank you all again for bearing with me, and helping me out the last few months. Pubsub has still a long way to go. Cheers, Michael
Re: [vysper][pubsub] Demo + Cheers!
Hi Michael, At first: Congratulations for successfully completing your GSoC09 project on time! It's been a pleasure for me to see you working on PubSub. I hope we see you working on Vysper in future. Now the demo. Yesterday I got it working. I removed the call to JTable.setFillsViewportHeight(boolean) because it is JDK 6 only. Then I found that subscribers are receiving every published message two times (at least it is displayed two times). Can you reproduce? Maybe you get that fixed one way or the other. Thanks for giving us PubSub, Bernd Michael Jakl wrote: Hi! The demo application has finally reached its feature complete state. You can - Login (the server accepts user1, user2, user3 all with password password1) - Discover all nodes on the server - See whether the user is the owner - See if the user is subscribed - Subscribe and unsubscribe - Create new nodes - Delete nodes (if the user is the owner) - Open a detail view for a node * See messages received - if subscribed (and only while online) * Publish messages to a node (if the user is the owner) These are most features that are currently implemented in the module (not shown is the persistent-item feature). To try it, you have to start Vysper with the PubSub module loaded (put everything in the classpath and start with java org.apache.vysper.xmpp.server.ServerMain -Dvysper.add.module=org.apache.vysper.xmpp.modules.extension.xep0060_pubsub.PublishSubscribeModule for example). Sidenote: You have to use a version prior to rev802821 of vysper-core, and HEAD of the extension and the client (see my previous mail). The client is a simple Java Swing application and is run with the three smack libs on the classpath. For example on a *nix with ~/.m2 as Maven directory: java -classpath ~/.m2/repository/jivesoftware/smack/3.1.0/smack-3.1.0.jar:~/.m2/repository/jivesoftware/smackx/3.1.0/smackx-3.1.0.jar:~/.m2/repository/jivesoftware/smackx-pubsub/1.0-20090813101732-vysper/smackx-pubsub-1.0-20090813101732-vysper.jar org.apache.vysper.demo.pubsub.client.PubsubClientGUI As soon as the server closes, all data (nodes, items) will be lost. To see something interesting, you could open two or three clients with different users (don't forget to change the JID *and* the username), create a few nodes, subscribe to them and post messages back and forth. Currently only the owner is allowed to publish (and there is no possibility to grant permissions to other users ATM). I hope you enjoy it :) Cheers, Michael
[vysper][pubsub] Demo
Hi! The demo application has finally reached its feature complete state. You can - Login (the server accepts user1, user2, user3 all with password password1) - Discover all nodes on the server - See whether the user is the owner - See if the user is subscribed - Subscribe and unsubscribe - Create new nodes - Delete nodes (if the user is the owner) - Open a detail view for a node * See messages received - if subscribed (and only while online) * Publish messages to a node (if the user is the owner) These are most features that are currently implemented in the module (not shown is the persistent-item feature). To try it, you have to start Vysper with the PubSub module loaded (put everything in the classpath and start with java org.apache.vysper.xmpp.server.ServerMain -Dvysper.add.module=org.apache.vysper.xmpp.modules.extension.xep0060_pubsub.PublishSubscribeModule for example). Sidenote: You have to use a version prior to rev802821 of vysper-core, and HEAD of the extension and the client (see my previous mail). The client is a simple Java Swing application and is run with the three smack libs on the classpath. For example on a *nix with ~/.m2 as Maven directory: java -classpath ~/.m2/repository/jivesoftware/smack/3.1.0/smack-3.1.0.jar:~/.m2/repository/jivesoftware/smackx/3.1.0/smackx-3.1.0.jar:~/.m2/repository/jivesoftware/smackx-pubsub/1.0-20090813101732-vysper/smackx-pubsub-1.0-20090813101732-vysper.jar org.apache.vysper.demo.pubsub.client.PubsubClientGUI As soon as the server closes, all data (nodes, items) will be lost. To see something interesting, you could open two or three clients with different users (don't forget to change the JID *and* the username), create a few nodes, subscribe to them and post messages back and forth. Currently only the owner is allowed to publish (and there is no possibility to grant permissions to other users ATM). I hope you enjoy it :) Cheers, Michael
Re: [vysper][pubsub] Demo application + Maven
On Thu, Aug 13, 2009 at 9:27 PM, Michael Jakljakl.mich...@gmail.com wrote: Could you please add the 1.0- prefix to the jar and pom filenames? Fixed! Concerning the .pom of smackx-pubsub, I think the smack and smackx libs aren't only for compiling. That was from the original POM. Anyways, I've changed it now. /niklas
[vysper][pubsub] Demo application + Maven
Hi! Slowly the code approaches a state where I'd like to upload it into the svn. I think it would make sense to mavenize it beforehand, but I need help for that. My program needs this: http://github.com/squaremo/smackx-pubsub/tree/master with its special install procedure. Maybe we could upload this one and its dependencies to Niklas' private Maven repo? Second, for Vysper to load my module, I'd need to give it a parameter. This requires that the pubsub module is on the classpath (pubsub needs vysper-core for building, but vysper-core needs pubsub for running if we want to load the pubsub module). How should I start with these requirements? I know a little Ant, but I've next to no experience with Maven. Thanks, Michael
Re: [vysper][pubsub] Demo application + Maven
Michael Jakl wrote: Hi! Slowly the code approaches a state where I'd like to upload it into the svn. I think it would make sense to mavenize it beforehand, but I need help for that. Just wondering, as you are now a committer, why don't you simply work in a sandbox, instead of having your code in a private branch ? -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org
Re: [vysper][pubsub] Demo application + Maven
On Thu, Aug 13, 2009 at 9:41 AM, Michael Jakljakl.mich...@gmail.com wrote: My program needs this: http://github.com/squaremo/smackx-pubsub/tree/master with its special install procedure. Maybe we could upload this one and its dependencies to Niklas' private Maven repo? Sure, I'll have a go at building it now and see if I can upload it. The only runtime dependencies seems to be smack and smackx, both which was yesterday uoloaded into Maven central. So I will remove them from the temporary repo. Second, for Vysper to load my module, I'd need to give it a parameter. This requires that the pubsub module is on the classpath (pubsub needs vysper-core for building, but vysper-core needs pubsub for running if we want to load the pubsub module). I'm assuming you want to load the Pubsub module into ServerMain in vysper-core? If so, I think your out of luck since Maven can not handle a circular dependency (well, it can, but it's ugly and will be confusing). Could you use the Spring integration for this? /niklas
Re: [vysper][pubsub] Demo application + Maven
Hi! On Thu, Aug 13, 2009 at 09:51, Emmanuel Lecharnyelecha...@apache.org wrote: Michael Jakl wrote: Just wondering, as you are now a committer, why don't you simply work in a sandbox, instead of having your code in a private branch ? I made some throw-away example applications not related to pubsub or Vysper prior to the actual prototype (never seen swing before ;)). Recently I took it all and made a first version working with the pubsub service itself, that's the one I'm uploading tonight. Michael
Re: [vysper][pubsub] Demo application + Maven
Hi! On Thu, Aug 13, 2009 at 09:55, Niklas Gustavssonnik...@protocol7.com wrote: On Thu, Aug 13, 2009 at 9:41 AM, Michael Jakljakl.mich...@gmail.com wrote: My program needs this: http://github.com/squaremo/smackx-pubsub/tree/master with its special install procedure. Maybe we could upload this one and its dependencies to Niklas' private Maven repo? Sure, I'll have a go at building it now and see if I can upload it. The only runtime dependencies seems to be smack and smackx, both which was yesterday uoloaded into Maven central. So I will remove them from the temporary repo. Thanks! The smackx-pubsub has special versions of smack and smackx (also called 3.1.0). It *might* work with the stock libs, yet, the last time I tried I've had mysterious errors. Second, for Vysper to load my module, I'd need to give it a parameter. This requires that the pubsub module is on the classpath (pubsub needs vysper-core for building, but vysper-core needs pubsub for running if we want to load the pubsub module). I'm assuming you want to load the Pubsub module into ServerMain in vysper-core? If so, I think your out of luck since Maven can not handle a circular dependency (well, it can, but it's ugly and will be confusing). Could you use the Spring integration for this? Yes, currently I simply pass a VM parameter which dynamically loads the module if it is on the classpath. I could also look at the Spring integration, but how does Spring change the need for having both jars on the classpath? Michael
Re: [vysper][pubsub] Demo application + Maven
On Thu, Aug 13, 2009 at 10:06 AM, Michael Jakljakl.mich...@gmail.com wrote: The smackx-pubsub has special versions of smack and smackx (also called 3.1.0). It *might* work with the stock libs, yet, the last time I tried I've had mysterious errors. Well, that's no good. Can you try again with the stock JARs? if that doesn't work, can you find out what the differences are so that we can keep patch of that. If really needed, I'll upload the custom ones with a different version number. Yes, currently I simply pass a VM parameter which dynamically loads the module if it is on the classpath. How does that handle passing a parameter? I could also look at the Spring integration, but how does Spring change the need for having both jars on the classpath? With Spring, you would not have a build time dependency from core to pubsub. But, loading using a system property would of course also work. /niklas
Re: [vysper][pubsub] Demo application + Maven
Hi! On Thu, Aug 13, 2009 at 10:16, Niklas Gustavssonnik...@protocol7.com wrote: On Thu, Aug 13, 2009 at 10:06 AM, Michael Jakljakl.mich...@gmail.com wrote: The smackx-pubsub has special versions of smack and smackx (also called 3.1.0). It *might* work with the stock libs, yet, the last time I tried I've had mysterious errors. Well, that's no good. Can you try again with the stock JARs? if that doesn't work, can you find out what the differences are so that we can keep patch of that. If really needed, I'll upload the custom ones with a different version number. I'll try it tonight. Yes, currently I simply pass a VM parameter which dynamically loads the module if it is on the classpath. How does that handle passing a parameter? ServerMain[1] checks if a property vysper.add.module is present and loads the given class, and finally adds it as a module to the server. I start the server (something) like this: java ServerMain -Dvysper.add.module=org.apache.xep0060_pubsub.PubSubModule 1: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/ServerMain.java?revision=800455 Michael
Re: [vysper][pubsub] Demo application + Maven
On Thu, Aug 13, 2009 at 9:55 AM, Niklas Gustavssonnik...@protocol7.com wrote: On Thu, Aug 13, 2009 at 9:41 AM, Michael Jakljakl.mich...@gmail.com wrote: My program needs this: http://github.com/squaremo/smackx-pubsub/tree/master with its special install procedure. Maybe we could upload this one and its dependencies to Niklas' private Maven repo? Sure, I'll have a go at building it now and see if I can upload it. The only runtime dependencies seems to be smack and smackx, both which was yesterday uoloaded into Maven central. So I will remove them from the temporary repo. No uploaded into our temporary Maven repo: http://people.apache.org/~ngn/vysper-repo/jivesoftware/smackx-pubsub/1.0-20090813101732-vysper/ I took some liberties at fiddling with the POM so get the build working and align it with the other Smack jars. GroupID: jivesoftware ArtifactID. smackx-pubsub Version: 1.0-20090813101732-vysper (timestamped and showing that it is built by vysper, not the original maintainer) Let me know if you get any problems with it. /niklas
Re: [vysper][pubsub] Demo application + Maven
On Thu, Aug 13, 2009 at 10:25 AM, Michael Jakljakl.mich...@gmail.com wrote: How does that handle passing a parameter? ServerMain[1] checks if a property vysper.add.module is present and loads the given class, and finally adds it as a module to the server. I start the server (something) like this: java ServerMain -Dvysper.add.module=org.apache.xep0060_pubsub.PubSubModule 1: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/ServerMain.java?revision=800455 Right, I understood by parameter to you needed to set something on the module (like in the constructor or in a setter method) on addition. But I now think I misunderstood. So, this should not affect the build at all right, this seems to be something you do at runtime (at which time Maven would not normally be used). Or, do you want Maven to launch the server for you? I'm confused :-) /niklas
Re: [vysper][pubsub] Demo application + Maven
On Thu, Aug 13, 2009 at 10:31, Niklas Gustavssonnik...@protocol7.com wrote: On Thu, Aug 13, 2009 at 10:25 AM, Michael Jakljakl.mich...@gmail.com wrote: How does that handle passing a parameter? ServerMain[1] checks if a property vysper.add.module is present and loads the given class, and finally adds it as a module to the server. I start the server (something) like this: java ServerMain -Dvysper.add.module=org.apache.xep0060_pubsub.PubSubModule 1: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/server/ServerMain.java?revision=800455 Right, I understood by parameter to you needed to set something on the module (like in the constructor or in a setter method) on addition. But I now think I misunderstood. So, this should not affect the build at all right, this seems to be something you do at runtime (at which time Maven would not normally be used). Or, do you want Maven to launch the server for you? I'm confused :-) Um, me too :) Let's start at the beginning. I'd like to have a simple way of running the server and the client. I thought Maven might be the tool for that because it handles the dependencies, but maybe I was wrong? Running the server is not important, but running the client would be nice. How would you suggest to do it in a portable way? Maybe I've overcomplicated the whole thing. Running the server is easy from Eclipse and the demo is also easy to start as soon as the dependencies are there (with your repo. this should now be fully automatic). Sorry for the chaos. Thanks, Michael
Re: [vysper][pubsub] Demo application + Maven
Michael Jakl wrote: Hi! On Thu, Aug 13, 2009 at 09:51, Emmanuel Lecharnyelecha...@apache.org wrote: Michael Jakl wrote: Just wondering, as you are now a committer, why don't you simply work in a sandbox, instead of having your code in a private branch ? I made some throw-away example applications not related to pubsub or Vysper prior to the actual prototype (never seen swing before ;)). Recently I took it all and made a first version working with the pubsub service itself, that's the one I'm uploading tonight. Ok, got it. It was just to be sure that you know that you can use a sandbox freely, it's designed for such a purpose ! Also it's easier for sharing the code... -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org
Re: [vysper][pubsub] Demo application + Maven
Hi! On Thu, Aug 13, 2009 at 10:28, Niklas Gustavssonnik...@protocol7.com No uploaded into our temporary Maven repo: http://people.apache.org/~ngn/vysper-repo/jivesoftware/smackx-pubsub/1.0-20090813101732-vysper/ I took some liberties at fiddling with the POM so get the build working and align it with the other Smack jars. GroupID: jivesoftware ArtifactID. smackx-pubsub Version: 1.0-20090813101732-vysper (timestamped and showing that it is built by vysper, not the original maintainer) Let me know if you get any problems with it. Could you please add the 1.0- prefix to the jar and pom filenames? Maven tries to download the following file: http://people.apache.org/~ngn/vysper-repo//jivesoftware/smackx-pubsub/1.0-20090813101732-vysper/smackx-pubsub-1.0-20090813101732-vysper.pom Concerning the .pom of smackx-pubsub, I think the smack and smackx libs aren't only for compiling. Thanks, Michael
Re: [vysper][pubsub] Demo application + Maven
Hi! On Thu, Aug 13, 2009 at 10:16, Niklas Gustavssonnik...@protocol7.com wrote: On Thu, Aug 13, 2009 at 10:06 AM, Michael Jakljakl.mich...@gmail.com wrote: Well, that's no good. Can you try again with the stock JARs? if that doesn't work, can you find out what the differences are so that we can keep patch of that. If really needed, I'll upload the custom ones with a different version number. I've tried my demo with the stock smack jars and its pubsub extension, it seems to work. Thanks a million. My app is now available at Vysper/demo/pubsub/client. The app itself is far from complete. Only looking up all the nodes, subscriptions, and affiliations as well as susbscribing and unsubscribing to existing nodes is supported. There is currently no possibility to create nodes, receive messages, and send messages. Michael