Friday, May 16, 2008

Developing middle tier UC applications, where to start?

This is not an easy question. There are multiple SDK’s and API’s, which one should I use in which scenario?
I have been in discussion with some UC developers and people from Microsoft about some of the issues I was facing, and what the possible solutions are.

The first API that comes to my mind is the UCMA (Unified Communications Managed API). The second would be the UC AJAX SDK. Then we have the UCCA (Unified Communications Client API) and the OC (Office Communicator SDK).
The UCCA and OC SDK are client oriented. The UCCA is the one to create a new client if you don’t want to use the Office Communicator client. The OC SDK is to interact with the Office Communicator client. So for creating middle tier UC applications these are not really suited.
I have been in discussion with some UC developers and people from Microsoft about some
Let’s try and start with some scenario’s.

Broadcasting messages

This should be an easy answer. Let us use the UCMA. The UCMA is really a good choice, it’s intended to for such a scenario. It can handle high volumes and is scalable. However, it is not the only possible API to use. What about the UC AJAX SDK, can it do the trick? Sure it can, as long as you stick to text messages. Can it handle high volumes, and is it scalable? Does it perform well? In fact it does. I do not have exact figures, but I am really surprised of the performance. And the UC AJAX SDK is much easier to understand then the UCMA. What are the drawbacks of using the UC AJAX SDK? Only two come to my mind: you can only use text message and you need a CWA (Communicator Web Access) server.

Bots

First one again the UCMA. But in fact the UC AJAX SDK can be used as well. In this case, the reaction time of the UC AJAX solution reacts a little slower then the UCMA solution. This is caused by the polling mechanism for getting events. The advantage of the UCMA is that you can set the presence as an automaton(Always online). Normally there is a limit of 200 subscriptions. Publishing your presence as an automaton doesn’t have that limitation.
You can use the System.Speech in .NET 3.0 to handle more complex grammar recognition.

Bots that needs presence


Now we get to the real discussion. Can we use the UCMA? Officially getting presence and subscribing to presence is not supported in the UCMA!!!
So what are the alternatives? You could use the UCMA and use UC AJAX SDK for getting presence information. This is a good combination, and you could use the advantages of both. If you only need text messages, the UC AJAX SDK is a good choice.

UCMA and presence!!!

Presence in Office Communicator server is done with sip requests and sip subscriptions. I have seen a lot of questions on the net if it is possible to get presence using the UCMA. Everybody at Microsoft I have spoken to or reactions that have been posted to these questions stated that presence information in UCMA is not possible. My first reaction was why is it not possible? The UCMA supports sip requests and sip subscriptions. At that time, I took a deep dive in the protocols and tried to find out if it was really not possible. Can you make the correct sip request or sip subscription in UCMA to get presence? Using the Office Communicator Server Resource kit I found out that actually you can.
I presented my findings to some people at Microsoft. They were surprised. In fact you can do it but it is officially not supported. For me the big question was why is it not supported. Actually the answer is quite simple. The correct protocols for presence are not public. The only applications that use those specific protocols are all Microsoft applications. For future versions these protocols can be subject to change. So the application you create may not work anymore with future versions or updates.
Will it keep me from using these protocols und keep me from using UCMA for presence? No it will not. And the main reason for that is that the Office communicator client, the CWA server, Office Communicator server, the UCCA all use the same protocol. If Microsoft will change that protocol none of these applications will be compatible anymore with the new version.

Any questions/ comments please feel free to contact us.
Sip:Marc.Wetters@e-office.com or email:Marc.Wetters@e-office.com or Sip:Joachim.Farla@e-office.com or email:Joachim.Farla@e-office.com.

3 comments:

Marcelo Farjalla said...

Those presence protocols you mentioned are now public. Find them at http://msdn.microsoft.com/en-us/library/cc431501.aspx

Anonymous said...

Thanks Marcelo, that is part of the protocols I meant.
in that document you find detailed information for subscribing to presence.

The service request "getPresence" I use for getting presence isn't in there.
See the other blog post.

Unknown said...

Hello,

Imagine a scenario where my OCS server is the BPOS, it's possible?
I've tried but it doesn't.