Till Week 3 - Elements !
I am Tarun, a senior year student at IIIT Hyderabad, India. This year I was selected as a GSoC student by XMPP Standards Foundation to work on Mediated Information Exchange (MIX), which is intended as a replacement for Multi-User Chat (MUC). I'm being mentored by Tobias and Edwin. Let me begin by explaining why do we need MIX as a replacement for MUC ?
- In the years after MUC was designed, both Publish-Subscribe and Message Archive Management have been developed and it is desirable to reuse these building blocks (e.g., MAM can be used for message history) rather than using the less robust methods defined in Multi-User Chat .
- It is difficult to use MUC for building multimedia applications without undesirable adaptations.
- A number of use cases has emerged in group communication, which are explained here.
I have started by implementing elements (payloads), which will be coming in / send out in the form of XML. Therefore, we need parsers and serializers for each payload to be able to parse the XML and set the private variables for the Element. On the other hand, Serializers serializes an instance (of the Element) to XML format. I am done with some of the elements with their parsers and serializers and unit tests testing the XML's mentioned in the XEP as follows:
- Join Element (and Subscribe): This element will be used by clients and their local servers to join a channel.
<join xmlns='urn:xmpp:mix:0' firstname.lastname@example.org'> <subscribe node='urn:xmpp:mix:nodes:messages'/> <subscribe node='urn:xmpp:mix:nodes:presence'/> <subscribe node='urn:xmpp:mix:nodes:participants'/> <subscribe node='urn:xmpp:mix:nodes:config'/> </join>
- Participant Element: This element will be used to store user nick and their real JIDs.
<participant xmlns='urn:xmpp:mix:0'> <nick>thirdwitch</nick> </participant>
- User Preference Element: This element will be used to set user preferences like their JID visibility, private messages, etc.
<user-preference xmlns='urn:xmpp:mix:0'> <x xmlns='jabber:x:data' type='result'> <field var='FORM_TYPE' type='hidden'> <value>urn:xmpp:mix:0</value> </field> <field var='JID Visibility'> <value>never</value> </field> <field var='Private Messages'> <value>allow</value> </field> <field var='vCard'> <value>block</value> </field> </x> </user-preference>
- Leave element: In order to leave a channel, a user sends a MIX "leave" command to the channel.
<leave xmlns='urn:xmpp:mix:0' email@example.com`/>
That's all for this blog post. This week I'll be completing other elements and service discovery feature.