Changes for services(jabber:component:accept namespace)

Hi, All !

I made patch for service writing using smack. It require some changes in PacketWriter, PacketReader, ServiceDiscoveryManager, XMPPConnection.

Attached file is patch for version (Sep-02).

If it possible to apply this patch for official Smack sources, then I will prepare patch for latest build.

WBR, Alex.
smack-allow-component-writing.diff (12220 Bytes)

I don’'t see support for component authentication in this patch? It would also be great if you could provide some design decision info with your changes.

I’'ve been thinking about adding component support for some time now, so this patch is well=timed!

Thanks,

-Matt

Hi !

Right, I forgot to include authentication support in this patch.

For implement component support we need to:

  • support jabber:component:accept namespace for PacketReader and PacketWriter. I think, we can setup namespace for connection, and other classes will use this namespace for send to XMPP server.

  • change ServiceDiscoveryManager for support IdentityCategory.

  • make packets more correctly. for example - setup right “From” parameter.

Also, XMPPConnection now require only host name(and port) for connection to server. For connection as component we need to setup additional parameter for connection:

What is the next step for patch ? Should I prepare new version of patch based on latest build of smack with auth support ?

WBR, Alex.

Alex,

One idea we’'ve been recently discussing here at Jive is having a new Open Source project for XMPP components. The project would have several goals:

  • A single API to implement for internal or external components. We’'d try to get Java XMPP servers to support the API for internal components.

  • The same general simplicity of Smack, but targetted at components. For example, perhaps a richer notion of a Packet.

Perhaps your patch could serve as a basis for this work? What do you think about the idea as a general direction?

Regards,

Matt

Matt,

you are absolutely right. If you will publish your jabber server under GPL(or other open source license), then using one API for internal and external component is right idea.

I’'m not sure, what it should be separate project from smack. I think, most of smack code(and jabber server code) should use one library for parsing packets, create packets, etc.

You can use my patch absolutely free.

WBR, Alex.