Silverlight updates

I was working a lot on the Silverlight version since the 1st announcement. You can expect the release very soon.

What happened:

  • I renamed the project from agsXMPP2 to MatriX.
  • The core of the Silverlight library works also under .NET, Compact Framework and Mono. Future versions of agsXMPP will use this core as well and will benefit from all new cool .NET features like Generics, LINQ, LINQ to Xml and others.
  • BOSH support was added
  • Proxy support was added

You can test the basic Silverlight2 example client here:
http://matrix.ag-software.de

You should be able to connect to any XMPP server on the federated network which needs no SRV lookups. In the next version I will allow you to specify the server hostname on the login page.

All comments and bug reports are welcome.

agsXMPP 1.1 released

We released version 1.1 of our agsXMPP SDK.

During the Secure Communication Week we tested with several customers the TLS encryption for the Compact Framework which is now included in this new release.

Download the new release here.

Security matters

The first Secure Communications Week is coming soon: October 4-11, 2008.

agsXMPP still doesn’t support SSL and TLS when targeting the .NET Compact Framework, because there is still no SslStream available.

Our contribution to the Secure Communications Week will be to implement TLS support for agsXMPP on CF before the Secure Communications Week starts on October 4. Stay tuned for more follow-up.

agsXMPP and Silverlight

agsXMPP supports lots of platforms which currently include Windows, Linux (Mono) and Windows-Mobile. And the next version I am currently working on will also support Microsoft Silverlight.
This opens new possibilities to xmpp web development.

I attached a small screenshot which shows agsXMPP for Silverlight in action. Follow this blog for updates.

agsXMPP Silverlight example

SRV meets LINQ

LINQ (Language Integrated Query) is really amazing.

Today I rewrote a function which picks the correct SRV-Record according to the priority and weight for XMPP client and server connections. The old code without comments were 63 lines. The new code is about 12 lines and much easier to read IMHO.

But take a look at the code yourself.

private SRVRecord PickSRVRecord(List<Srvrecord> srv)
{
	IEnumerable<Srvrecord> minServers
		= srv.Where(s1 = t; s1.Priority == srv.Min(s => s.Priority));

	if (minServers.Count() > 1)
	{
		int sumWeight = minServers.Sum(s = s.Weight);

		// Create a random value between 1 - total Weight
		int rnd = new Random().Next(1, sumWeight);

		int count = 0;
		SRVRecord result = minServers.First(
		s => rnd > ((count += s.Weight) - s.Weight) && rnd <= count);

		return result;
	}
	else
		return  minServers.First();
}