středa 4. března 2015

XMPP in .NET

Project Babel is based on XMPP protocol, so there is need for suitable comunication layer. Our solution contains two projects, which are participated in this comunication.
First project is classic windows desktop project, which has pretty much everything, what we wish for.
Second project is PCL (Portable class library) which can be compiled for silverlight, windows phone and even Windows RT. The bigger part of entire solution logic is situated in this PCL project, the better for us developers, because we can simply use this implementation on more platforms.

First approach to build this communication layer was to use some third party library, which can be added to PCL. There is one! A MatriX XMPP SDKThis is very nice library, which comes with binaries, that are compiled for all mentioned platforms and it even supports Xamarin. Everything is cool until it comes to a pricing. It is quite expensive one. So we tried to find another way.

A person with nick smiley22 wrote an opensource solution for XMPP protocol. It is called a S22.Xmpp. There are source codes on github so it looks pretty well. Last commit to this project is 27 Dec 2013 so it is more than year old. It can be both a very good sign of stable library which has implemented all features of XMPP and a bad sign of dead unfinished project without community. 

S22.Xmpp miss anonymous authentication and it has dependencies on classes, that are not available on PCL project, so we need to split implementations for platforms. Babel extends this S22 implementation with anonymous authentication and moves this logic from PCL to other platform dependent project.


For windows phone implementation we can use matrix library, which allows us to buy license for specific platform. Another way is to write our own implementation that compiles on windows phone.

Žádné komentáře:

Okomentovat