Archive for January, 2010

edv

NTG helps Evrium to upgrade Fluid Galleries to Flex

Wednesday, January 27th, 2010

Fluid Galleries 3, a Flex-based web site manager that allows professional photographers to create, manage and host a portfolio website online, is now available. NTG is very proud of the role we played in helping Evrium to migrate to a Flex platform. Fluid Galleries now offers unparalleled freedom to create professional-looking websites without needing to know Flash, HTML or any other web development languages. By simply pointing, clicking and dragging, photographers can create and brand a truly unique web experience for their customers to view their work.

NTG was chosen by Evrium for our strong Flex-based application development experience and our ability to take a sophisticated UI vision and realize it in a fast and robust application. We also leveraged our expertise with Adobe BlazeDS, Java, MySql and Amazon’s Simple Storage Service (S3) to make our client’s vision a reality.

Please visit https://www.fluidgalleries.com/examples to enjoy some example layouts created with Fluid Galleries 3.

oliverm

Adobe Flex User Group: Toronto – Jan 21, 2010

Tuesday, January 19th, 2010

The January Flex User Group meeting will be held on Thursday, January 21st, 2010 at 6:30pm at the Ryerson Oakham House. Michael B. will present:
“By Means of Design: An Introduction to Design Workflow with Adobe Flash Catalyst”

As usual, please sign in and register for the event beforehand at http://www.torontoflex.org/torontoflex/index.html so we know how many people to expect.

Derek Santos

XMLSocket Benchmarking with Flex and Java

Wednesday, January 13th, 2010

By: Derek Santos

Socket driven applications have several benefits. The benefits include real-time data interchange between the Client and Server, and giving the developer more control over how the data is sent.  This post will cover some basics about sending xml data over sockets, and how the socket performs with large data sets.

Setting Up a Socket Server

The first thing you need to do is create a socket server.  This can be done with Java via the ServerSocket class. Please refer to the attachments to see how this is done. In this example, we will be connecting to a socket on port 5678.  It’s important to note that since Flash Player 9.0.124.0, a policy file is required to be served by the socket.  You can serve a policy file on port 843, which will allow any subsequent socket connections for any port on that host. A Policy File server is also provided in the attachments. In this example, the Java Socket Server simply responds to a request and returns “n” number of xml rows back to the client. The Socket Server will return the data in intervals, rather than all at once. The purpose of this example is to determine at what interval you can achieve the best performance.

Below is the xml we will be expecting from the server.

<person>
    <id>1</id>
    <name>Derek Santos</name>
    <company>New Toronto Group</company>
</person>

Once our Socket Server is up, we can make requests to the server from the Client.  To do this, you can use the XMLSocket class.

var socket:XMLSocket = new XMLSocket();
socket.connect(‘localhost’, 5678);

This will an attempt to connect to the socket server we have created.  We also need to listen for the connect event of the socket, so that we can begin sending requests.

socket.addEventListener(Event.CONNECT, connectHandler);
private function connectHandler(event:Event):void {
socket.send(“my first socket request”);
}

Although it is an XMLSocket, you are not required to send data in XML format.  In fact, the server does not know the difference between an xml socket and a regular socket connection.  You can handle results from the server by adding an event listener on the socket for the DataEvent.

socket.addEventListener(DataEvent.DATA, dataHandler);

XMLSocket Test Results

The screenshot below shows a simple Flex application which asks the server for XML data.  First it asks for 10,000 rows, then 100,000 and then 1,000,000 rows.  The chart below represents the time it took to retrieve all of the rows(y axis), and how many rows at a time were returned(x axis).

Benchmarking Results

This test was run on dual-core processor with 2GB of ram.  Interestingly, it looks like the optimal setting is around 32 rows per result.

You can download all of the source for this example below.

Download Source Code