buddycloud / buddycloud-media-server

Share files in a buddycloud channel
http://buddycloud.com
28 stars 16 forks source link

DRAFT/WIP Update to Smack 4.0.1 #71

Closed Flowdalic closed 10 years ago

Flowdalic commented 10 years ago

This PR is not yet to be merged. Smack 4.0.1 is not yet released and I'd like to discuss a few things first.

I've took the liberty to update Smack to the latest version with the commit, since I don't like the idea of a fragmented Smack (3.2.1-MODIFIED) and would like to concentrate Smack development in one place. This commit creates the org.jivesoftware.smackx.rsm package for initial RSM support, that I'd like to incubate here and once it is finished, move into upstream Smack.

It also appears that you guys work around a bug in Smack's PubSub implementation. It would have been great if this was reported upstream, ie. to me, so that it can be fixed and other benefit from it to.

Smack 4 does not support non-SASL auth, so the relevant code was removed.

I also took the liberty to fix a few javadoc bugs like s/@param/@code/ where appropriate.

I hope to implemented all modifications of your used -MODIFIED Smack version, but since I couldn't find the code I can't be sure. Would be great if someone more involved in buddycloud-media-server could test my changes and report back.

I really like the buddycloud project and it would be great if we (IgniteRealtime Smack) could work closer together. For example, if you write code for an XEP, let me now so that we can get it into Smack. :-) I plan to release Smack 4.0.1 in the next 4-8 weeks.

imaginator commented 10 years ago

Regarding XEP-ing:

abmargb commented 10 years ago

Hi @Flowdalic, thanks for the PR.

We also don't like the idea of having a fragmented Smack jar :-) That is the result of a bad design decision.

The buddycloud-media-server needs to talk to the buddycloud-server in order to check subscriptions. The buddycloud-server understands the buddycloud XEP, which is an extension/modification of XEP-0060.

We had to modify Smack so we could support the buddycloud XEP + RSM.

Besides the RSM part, which is important to have anyway, the only way to have the media-server using the standard Smack jar is to implement the buddycloud XEP in there.

abmargb commented 10 years ago

By a bad design decision I meant that we don't really need an XMPP client in here. We could simply use the component connection we already have to interact with the buddycloud-server, and then use Whack packet classes, which rely on a DOM representation.

Flowdalic commented 10 years ago

@abmargb You don't need to implement your buddycloud xep in Smack, you could simply disable all pubsub functionality in Smack and implement the xep in your repository, still using the core components of an up-to-date smack and the other extensions (Service Discovery Manger).

abmargb commented 10 years ago

@Flowdalic I suppose that's the way to go then. BTW, that'd also help the channel-directory, which also relies on a modified smack in order to talk to the buddycloud-server.