LiveCycle Data Services 2.6 – new features (3)

Two new endpoints were introduced in LiveCycle Data Services 2.6: NIO AMF and NIO HTTP and with them one can have now a viable alternative to RTMP. While RTMP offers best performance for data push - offers a direct duplex socket connection between the client and server and does not need a dedicated thread for every connection it uses a non-standard port (2038) so sometimes it is blocked by firewalls. If the firewall restriction cannot be lifted the other options was to use servlet-based AMF and HTTP endpoints and use long polling or HTTP streaming to emulate real time communication. The scalability was very low compared with RTMP (maybe several hundreds/thousands compared with tens of thousand) because of the dedicated thread per connection.

With the new endpoints this problem was solved – by building a NIO server based on the JAVA NIO api this limitation was removed– now it is possible to handle the connections asynchronously. And you do not have firewall issues because they are using the HTTP port.

From the client point of view the NIO AMF and HTTP endpoints are equivalent to the old endpoints (AMF and HTTP) so you should not modify the existing applications (but you cannot share the FlexSession between channels using NIO HTTP endpoints and the ones using HTTP). After you download the Livecycle Data Services 2.6 you can find several examples of how to configure them in the services-config.xml file.

It is important to mention that these new endpoints were introduced only for LiveCycle Data Services and not for Blaze DS - so if you are using the last one you still have to deal with the limitations of the current servlet API (one thread per connection) – at least at the moment of writing this post. Probably the situations will change in future – Blaze is open source so anyone can contribute to the source code. There seems to be other several free options - GraniteDS and WebORB however I did not had yet time to test them.

Leave a Reply