28th Mar2011

LCDS and Cipher Suites

by admin

LCDS has the ability to specify the Cipher Suites that you want to use when creating SSL connections. You can do it in the services-config.xml, although currently the sample ones don’t show you where to put it:

<servers>
	<server ...>
		<properties>
			<enabled-cipher-suites>
				<cipher-suite>XXX</cipher-suite>
				<cipher-suite>YYY</cipher-suite>
				<cipher-suite>ZZZ</cipher-suite>
			<enabled-cipher-suites>

Now what cipher suites does LCDS support? Well, none, but all. Its theJRE that supports cipher suites and you can get a list of the ones supported in your application from the SSLEngine class:

——————

There are two groups of cipher suites which you will need to know about when managing cipher suites:

  • Supported cipher suites: all the suites which are supported by the SSL implementation. This list is reported using getSupportedCipherSuites().
  • Enabled cipher suites, which may be fewer than the full set of supported suites. This group is set using the setEnabledCipherSuites(String []) method, and queried using the getEnabledCipherSuites() method. Initially, a default set of cipher suites will be enabled on a new engine that represents the minimum suggested configuration.

——————

So if you need to use cipher suites on LCDS, there ya go.

28th Mar2011

RTMP and NIO HTTP sharing the same Port using a shared NIO server configuration

by admin

I got a great tip today about using a shared NIO server in LCDS. When using a shared NIO server, you can define common properties for individual RTMP/NIO based channels once in the shared server tag. I’ve used this before for SSL configuration, since it then meant not having to define your SSL details in many places. For example:

             

		....

Then you can just refer to this in your individual channels as such:

        
            
	     

		....

As ever, see the sample services-config.xml file in the LCDS install for full details on all the properties.

All good and well, but something I didn’t realise until I was informed about it, is that the NIO channels can share the same port as the RTMP channels when using a shared nio server configuration.

That is very cool, and means only opening up one port, so for instance I have RTMP, NIOStreamingAMF, NIOLongPollingAMF, NIOPollingAMF all responding on port 2038.

27th Mar2011

Creating a Video Platform using ColdFusion, Dynamic HTTP Streaming and OSMF

by admin

After kindly getting invited to speak at Scotch on the Rocks 2011 (Europe’s Premier ColdFusion conference) by Andy Allan of Fuzzy Orange, myself and Andy Wallace gave a presentation on building a simple video platform using ColdFusion, the new Dynamic HTTP Streaming Module for Apache and the Open Source Media Framework (OSMF).

In the presentation, we showed how you could easily build a simple video sharing platform, including the ability to show advert videos before and after each feature video. Using the OSMF framework, Andy showed how to build a Video Player that controlled the User Experience by forcing them to view the Advert videos, whilst allowing them to seek through the Feature video, allowing the developer to (hopefully!) monetize their service.

ColdFusion made it easy to create a simple back end to upload the videos and generate the Playlists for the videos, whilst Flex gave a nice admin interface to allow users to upload the videos and make playlists. Download the demo code and follow the configuration instructions contained within.

27th Mar2011

Reference – Best Day in Detroit

by admin

Came across the tune from the Modular Music Vol. 2 compilation from Planet-E.   All round a good comp that gathers up some old stuff I hadn’t heard.   This is by far the standout track on it.   It meanders along for 4 mins, then it really kicks in.  Astonishing.

 

27th Mar2011

Utilities for testing/logging Messaging Functionality

by admin

I do a lot of work around Messaging in LCDS, and find myself writing the same code again and again to log all the Events that come from Producers and Consumers, and also in outputting these log messages in a nice format.   I’ve used these two ActionScript classes for a few months now, but find myself constantly searching for them, so this is here for me, and if it helps anyone else that is a bonus.

There isn’t documentation, but they are simple components that should be fairly clear when reading the AS code.

LoggingTextArea

This is a subclass of the mx:TextArea and includes a ‘logger’ property of type Logger.   It includes various helper methods to tie together the concepts of the Logging Framework of the Flex SDK into one class that I can just drop into a project to leverage all the categories/level etc and get my log info in a familar format.

Download LoggingTextArea.as

Sample Code

 <mx:FormItem label="Log Level" direction="horizontal"> 
 <mx:ComboBox id="logLevel" 
 dataProvider="{LoggingTextArea.LEVEL_STRINGS}" 
 change="logs.levelString = logLevel.selectedLabel" 
 selectedIndex="{LoggingTextArea.LEVEL_STRINGS.getItemIndex(logs.levelString)}"/> 
 <mx:Button label="Clear Logs" click="logs.clearLogs()"/> 
 </mx:FormItem> 
.....
<local:LoggingTextArea id="logs"
                       levelString="{LoggingTextArea.LEVEL_INFO}"
                       width="100%" height="100%"/>

You can then use (i.e.) logs.logger.debug(“My Log Id: {0}”, clientId) to add messages to the LoggingTextArea.

LoggingMessageAgentDecorator

This utility you can just wrap around a Producer or a Consumer and give it a LoggingTextArea and it will configure all the Events that I normally want to listen for.  There are a few other utility methods to send a text based message via a producer and also to change the defined channel that the message agent should use.   The decorator also exposes some properties from the MessageAgent.channelSet that aren’t by definition bindable, but are via the decorator.

Download LoggingTextArea.as

Sample Code

 <mx:FormItem label="Producer Channel" direction="horizontal"> 
 <mx:ComboBox id="producerChannel" 
 dataProvider="{producerDecorator.channelIds}" 
 selectedIndex="{producerDecorator.channelIds.getItemIndex(producerDecorator.currentChannelId)}"/> 
 <mx:Button label="Change" click="producerDecorator.changeChannel(producerChannel.selectedLabel)"/> 
 </mx:FormItem>
....
<local:LoggingMessageAgentDecorator id="producerDecorator"  loggingTextArea="{logs}">
        <mx:Producer id="producer" destination="chat" />
</local:LoggingMessageAgentDecorator>

 

Tying it together

I also have a simple test MXML Applicatoin that shows how currently I tie them together.  I tend to make this up as each time I am testing the actual implementation needs to be a little different each time, so just posting to show it being used.

Download TestChannels.mxml