Googolflex!!
  • Home
  • About
  • Contracting

Recent Posts

  • Sprint’s new “Simply ‘Almost’ Everything®” Plans
  • CSS Changes in Flex 4
  • Dotted Underline LinkButton (Flex)

About The Author : jwd

This is John Dusbabek's tech blog. John is a software engineer and Flex developer in Provo, UT, where he lives with his lovely wife and four sons.

Recent Comments

  • Nikos on Flex: Binding to an Interface
  • Iain Hosking on Apache mod_proxy_balancer: No Protocol handler was valid

Archive for Application Servers

May
21

Installing Red5 Media Server on CentOS 5.5 / Fedora

Posted by: jwd | Comments (1)

This post details the steps I took to install Red5 from source on a CentOS 5.5 base server.


1. Install Java using yum. (The -y flag provides a ‘yes’ answer to all prompts.)

yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel


2. Install the Apache ant binary. I downloaded the most recent release one directly from Apache’s archives. The version installed using yum (and default repositories) will not compile Red5.

cd /usr/src
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.8.1-bin.tar.bz2
tar jxvf apache-ant-1.8.1-bin.tar.bz2
mv apache-ant-1.8.1 /usr/local/ant


3. Set important Java environment variables.

export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:/usr/local/ant/bin
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip


4. You should also add them to bashrc so they’re available the next time you log in.

echo 'export ANT_HOME=/usr/local/ant' >> /etc/bashrc
echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
echo 'export PATH=$PATH:/usr/local/ant/bin' >> /etc/bashrc
echo 'export CLASSPATH=.:$JAVA_HOME/lib/classes.zip' >> /etc/bashrc


5. Install subversion with yum. If you did a base install of CentOS, subversion will not be preinstalled.

yum -y install subversion


6. Check out the Red5 source.

cd /usr/src
svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5


7. Build Red5 with ant.

mv red5 /usr/local/
cd /usr/local/red5
ant prepare
ant dist


8. Start Red5.

cp -r dist/conf .
./red5.sh


9. Create a startup script (optional):

vi /etc/init.d/red5

Then enter this text into the file.

#!/bin/bash
# chkconfig: 2345 80 80
# description: Red5 streaming server
# processname: red5

. /etc/rc.d/init.d/functions

[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5

RETVAL=0

case "$1" in
	start)
	echo -n "Starting red5: "
	cd /usr/local/red5
	/usr/local/red5/red5.sh >/dev/null 2>/dev/null &&
	RETVAL=$?
	if [ $RETVAL -eq 0 ]; then
		echo $! > /var/run/red5.pid
		touch /var/lock/subsys/red5
	fi
	[ $RETVAL -eq 0 ] && success $"red5 startup" || failure $"red5 startup"
	echo
	;;
	stop)
	echo -n $"Stopping down red5: "
	killproc -p /var/run/red5.pid
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/red5
	;;
	restart)
	$0 stop
	$0 start
	;;
	status)
	status red5 -p /var/run/red5.pid
	RETVAL=$?
	;;
	*)
	echo $"Usage: $0 {start|stop|restart|status}"
	RETVAL=1
esac

exit $RETVAL


10. Set permissions on the script.

chmod a+x /etc/init.d/red5
chkconfig red5 on


11. Add necessary ports to the iptables file.

vi /etc/sysconfig/iptables

Then add the following lines:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1935 -j ACCEPT

You may also want to add exceptions for 8443, 8088, 9035, 1936, and 9999 if necessary for your application,

service iptables restart

You may want to restart the server, and the Red5 test page can be accessed at http://localhost(or servername):5080/

Categories : Flex 3, Red5
Comments (1)
Feb
09

Flex Socket Connections : Socket Policy File

Posted by: jwd | Comments (0)

Starting with certain versions in the 9.0’s of Flash player, socket communication in Flex began adding additional security measures. The one I am going to discuss in the post is the socket policy file. In short, the socket policy file is an XML file that is served by default from port 843 and contains information regarding which ports on _this_ server that Flash may connect to. Additionally it allows you to specify from which domains you wish to allow connections.


Loading the Policy File From Flex

The policy file can be explicitly requested by making the call:

Security.loadPolicyFile("host.withpolicyfile.com:843");

Or you can trust it will implicitly make the request when you attempt a socket connection. The policy is valid for a particular IP address over the life of the SWF. A policy request consists of the following line, nothing more:

<policy-file-request/>

And the correct response is the policy file, followed by a null byte. My example policy server file will not be so picky about it’s request, use it at your own risk. Adobe has one that actually checks to see if the request was formatted correctly before sending the response. Furthermore, rather than reading in an actual policy file, my example hard codes it into the policy server.


Policy File Format

Here is a sample policy file, it is provided by Adobe. You can make whatever changes you need to, as I did in mine:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">

<!-- Policy file for xmlsocket://socks.example.com -->
<cross-domain-policy> 

   <!-- This is a master socket policy file -->
   <!-- No other socket policies on the host will be permitted -->
   <site-control permitted-cross-domain-policies="master-only"/>

   <!-- Instead of setting to-ports="*", administrator's can use ranges and commas -->
   <!-- This will allow access to ports 123, 456, 457 and 458 -->
   <!--allow-access-from domain="swf.example.com" to-ports="123,456-458" /-->
   <allow-access-from domain="*" to-ports="80" />
</cross-domain-policy>


Policy File Server

And here is the Perl code that runs the policy server. You can see it is just a basic socket server. Adobe’s version of this (which I based mine off) allows you to pass in the port as well as the path to the policy file. This is a stripped down version of that server, with most of the essentials hard coded.

use Socket;

my $NULLBYTE = pack('c', 0);
my $port = 843;
my $content ='<?xml version="1.0"?>'."\n" .
'<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">'."\n" .
'<cross-domain-policy>' . "\n" .
   '<site-control permitted-cross-domain-policies="master-only"/>'."\n" .
   '<allow-access-from domain="*" to-ports="80" />'."\n" .
'</cross-domain-policy>'."\n";

socket    (LISTENSOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp'))
          or die "socket() error: $!";
setsockopt(LISTENSOCK, SOL_SOCKET, SO_REUSEADDR, pack('l', 1))
          or die "setsockopt() error: $!";
bind      (LISTENSOCK, sockaddr_in($port, INADDR_ANY))
          or die "bind() error: $!";
listen    (LISTENSOCK, SOMAXCONN)
          or die "listen() error: $!";

while ( my $clientAddr = accept(CONNSOCK, LISTENSOCK)) {
    my ($clientPort, $clientIp)= sockaddr_in($clientAddr);
    my $clientIpStr = inet_ntoa($clientIp);

   # Consume the request
    local $/ = $NULLBYTE;
    my $request = <CONNSOCK>;
    chomp $request;

   # Send the policy file
    print CONNSOCK $content;
    print CONNSOCK $NULLBYTE;
    close CONNSOCK;
}
}


Opening A Port

Remember to open port 843 (in Fedora Core) by adding the following line in /etc/sysconfig/iptables :

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 843 -j ACCEPT

Then reload the iptables:

/etc/init.d/iptables restart
Categories : Actionscript, Application Servers, Flex 3, Perl, client/server
Comments (0)
Feb
08

Simple Flex Socket Client

Posted by: jwd | Comments (2)

Client-server programming is one of my passions, and I enjoy doing it in almost any language. Which makes it fitting that Flex (ActionScript) is one of my favorite languages to develop in, because it truly is a client-side technology which pretty much means it’s open to just about any type of backend server. I suppose you could make that argument with just about any language depending on how it’s being used, but since Flex isn’t processed and returned to the browser as HTML, that makes it a little different in my opinion.

Even in Flex, most applications will connect to a backend server that’s running an HTTP service (which queries the database on behalf of Flex), but I’m even going to depart from that in this post. I’m going to be demonstrating how to make socket calls to another service. You could apply this to making HTTP requests on port 80, make requests directly to a MySQL server running on port 3306. In this particular post, I will keep it simple by demonstrating how to make an HTTP request.


Declaring and initializing the Socket

You declare socket like this:

import flash.net.Socket;

private var socket : Socket;

Inside an initialization method, we will add a listener for the CONNECT event, and the SOCKET_DATA event. The CONNECT event alerts us when the connection has been made, and allows us to send our request. The SOCKET_DATA event is triggered whenever there is data waiting to be read from the socket.

socket = new Socket();
socket.addEventListener( Event.CONNECT, onConnect);
socker.addEventListener( ProgressEvent.SOCKET_DATA, onSocketData);

Connecting and Sending Data

At some point you will need to call connect on the socket, which accepts the URL of the server and the port it will be connecting to. In the onConnect() method, you will write the request using one of the writeXXX() methods, and call flush() which actually sends the data over the wire.

socket.connect(txtUrl.text, 80);

private function onConnect(event : Event) : void {
   var requestString : String = getHttp_1_1Request();
   socket.writeUTFBytes(requestString);
   socket.flush();
}

Reading Data

As not all socket data will be available at once, as in most client programs, you will want to read the data in a loop, using one of the readXXX() methods.

private function onSocketData(event : ProgressEvent) : void {
   while (socket.bytesAvailable) {
      txtResponse.text += socket.readUTFBytes(socket.bytesAvailable);
   }
   socket.close();
}

In general you would be checking for the end of the response you’re expecting (based on protocol), to simplify things I simply close the socket after the while loop exits the first time. If you leave the socket open for too long without reading data, I have noticed that I receive the following error, regardless of whether I have the correct policy file including cross-domain.xml:

Error #2044: Unhandled securityError:. filename.swf text=Error #2048: Security sandbox violation cannot load data from the.host.name

In this example, the raw output received from the socket request will be shown in the text box. You can download the complete source to this example here (where you may also view a screencast demo of this procedure).

Depending on what version of the Flash Player you’re running, this example may not run as-is if the server you are connecting to does not implement the policy-file (served from port 843. I will be discussing this in an upcoming post where I delve into a little more advanced socket programming in Flex, including how and where to deploy a master policy file.

Categories : Application Servers, Architecture, Flex 3, Web Services, client/server
Comments (2)
Dec
22

JUICE chat (Stratus Peer to Peer)

Posted by: jwd | Comments (0)

One of my ongoing weekend projects is an AIR chat application, recently rechristened “JUICE” a.k.a. “John’s Ultimate Internet Chat Experience”. I realize that may only be the case for myself, but the project has been very educational and entertaining for me.

The initial release used AIR/Flex as the front-end, ColdFusion and MySQL for the backend, and BlazeDS messaging for message transmission and “peer discovery”.  I worked on it over a couple weeks adding features like encryption, toast-style notifications, as well as a few other less notable things.

I knew the architecture was awful and would never scale beyond a couple hundred users (if that many). Here’s the basics of how it worked:

  1. The user would login, ColdFusion/MySQL would send back a list of chat buddies.
  2. Each logged in user would ping the messaging server every 10-30 seconds to announce “I’m still here!”
  3. The pings would be broadcast to everyone logged in (and connected to the messaging server). The application would filter out the ones it was interested in based on user id.
  4. Sending messages worked similarly, the user would send the message (which included information about the intended recipient), which would then be broadcast to EVERYONE.
  5. Everyone would filter this information, and the recipient would know it was for him, and would display it.

You can see why this would not scale well, the amount of traffic and pinging going on.  Eventually even a user with only 1 or 2 buddies would notice a significant drop in performance as the number of total users increased.  There are some applications of “chat” for which BlazeDS messaging and polling is well suited for (like a chat room).  A chat application involving “buddies”  is much better suited for P2P.

Enter Stratus.  I discovered Stratus a few months ago but was unwilling to delve into it on account of my hectic schedule.  Fortunately one of my friends went and did all the dirty work figuring out how to get it up and running (turns out it’s pretty easy) and I was able to apply it to my chat client.

I’m very pleased with the results, though it’s still very much a work in progress.  I’ve even been able to add video and voice chat features, which is why I went through the trouble in the first place.  Here is how my peer discovery mechanism operates.  It requires only 3 calls to the server per client (which I could easily condense to 2 if I wanted).

  1. The user logs in.
  2. If the user successfully authenticated, he connects to Stratus and receives his peer ID.
  3. The user updates his peer ID in the database (which was set to 0) and gets a list of his buddies and their peer IDs.  I also update information like whether or not I have a camera/mic.
  4. The user processes his buddy.  If the peer ID is something other than 0, then I know this buddy logged in before me, so I must send him my peer ID.
  5. Any buddies that have a peer ID of 0 are not logged in, I need to listen for them though since they will get my peer ID when they log in.
  6. When I log out or close the application, I call the server and reset my peer ID to 0.  I also notify all of my connected peers I’m logging out.

There are a few more steps in the process, but it decreases the load on the server significantly, transferring the “burden of proof” onto the clients.

Interesting to note is the way I get the peer ID of a client who connects after me (step 4).  I don’t actually have to make a call for this, rather he simply has to start broadcasting to me on the NetStream I set up to listen for him (step 5).  When the connection is made, an event will be dispatched by the NetStream class.  In fact, 3 events will be fired, I just chose to act on one of them.

The peer ID can be obtained from the peerStreams array on the publishing NetStream.  I then use that information to set up my subscribing NetSream.

if (this.peerId == null || this.peerId == &amp;quot;0&amp;quot;) {
    this.peerId = publishNetStream.peerStreams[0].farID;

    this.subscribeNetStream = new NetStream(model.netConnection, this.peerId);
    this.subscribeNetStream.client = new NetStreamClient();
    this.subscribeNetStream.play(streamName);
}

Anyway,I’m planning on doing another post to outline my video and voice handshake protocols.  They’re nothing to write home about, but I’d love some feedback if there’s a better way.  I’m also planning on releasing JUICE after I bring it’s level of functionality back up to where the original version was, so stay tuned and you should see my install badge at the bottom of my blog.

Categories : AIR, Actionscript, Architecture, Cold Fusion, ColdFusion Enterprise Server, Flex 3, Messaging, Scalability
Comments (0)
Mar
18

Messaging with Flex/ColdFusion via BlazeDS: Part 2 (Flex configuration)

Posted by: jwd | Comments (0)

This is part two of a two part series. See part one, Messaging with Flex/ColdFusion via BlazeDS : Part 1 (CF configuration)

This installment will go over setting up messaging in Flex, and assumes everything is working correctly on the server. Recall I will be covering two scenarios. A client-publish/client-subscribe model, and a server-publish/client-subscribe model.

Configuring Channels with ActionScript

I prefer defining my channels and channel sets in ActionScript on the client for a number of reasons. It does away with the need for client side configuration files and additional command line parameters that need to be set up each time I check out the project onto a new machine.

A channel is instantiated as follows:

private var pollChannel : AMFChannel = new AMFChannel(“cf-polling-amf”, http://cfserver.domain.com/flex2gateway/cfamfpolling);

The cf-polling-amf corresponds to the channel definition in the services-config.xml file residing on the server. If you gave it a different name previously, or set up a new one, the names should correspond.

The channel set is instantiated as follows:

private var amfChannelSet : ChannelSet = new ChannelSet();

Then, somewhere inside a method (init(), for example) the channel needs to be assigned to the channel set using the addChannel() method. The channel is now ready to use for remoting or messaging.

Publish/Subscribe

There are three classes you’ll use almost exclusively when dealing with AMF messaging. The Producer class, which connects to the messaging channel and is used to send messages. The AsyncMessage class which defines the format of the messages broadcast via the Producer. And the Consumer, which subscribes to the incoming messages received from the server.

The channelSet and destination properties need to be set on the Producer and Consumer, where the destination corresponds to the destination configured in the messaging-config.xml file on the server.

A MessageFaultEvent.FAULT listener can be attached to the Producer to listen for any errors that occur when connecting. And a MessageEvent.MESSAGE listener should be attached to the Consumer to handle messages that are broadcast to the clients.

Finally the consumer must call it’s subscribe method to indicate it is ready to receive messages. A consumer can subscribe and unsubscribe as often as needed.

Publishing a Message

The Publisher sends message to the server in the form of an AsyncMessage. The AsyncMessage class has two properties that we will be concerned with, the headers property and the body property.

The headers property is a dynamic object that you can add any data you want to. In this case we only need to set up one header value (many more are set after you call send() as it moves up the call stack) which is gatewayid. The gatewayid will correspond to the event gateway you set up in your CF Adminstrator.

The body property on the AsyncMessage class is used to send the message payload, and can contain anything. It is an anonymous object, and can have any number of additional properties or objects attached to it.

After setting these properties, the producer calls send, and passes the message as a parameter. The rest happens on the server and in the method that handles the MessageEvent.

Handling the Message Event

Handling the MessageEvent is similar to creating it, only backward. All of the properties that were set when it was published should be there (unless the CFC gateway explicitly removed or overwrote them). Nested in the event is a body and a headers property. They can be accessed as follows:

event.message.body
event.message.headers

And that’s all there is to it.


Server Publish

As previously mentioned, the server can also publish messages. This is different from the previous scenario in the following ways:

1. You only need to set up a Consumer… no Publisher is needed since the client will not be publishing messages.
2. A CFC on the server needs to manually publish the message. This can happen in a variety of applications.

This is accomplished in ColdFusion by setting up the event object, and then passing it in a call to SendGatewayMessage(). Here is some sample code demonstrating:

<cfset data.message = “someObjectOrValue” />
<cfset data.type = "optionalValue" />

<cfset event.body = data />
<cfset event.Destination = "AValidDestination" />
<cfset ret = SendGatewayMessage("anEventGateway", event) />

Other Applications

There are a number of configurations you could have that I haven’t mentioned. A Flex application could publish messages and broadcast to a separate Flex or AIR application that is subscribed to the same channel. There are a variety of methods available to filter messages received.

I’ve only just scratched the surface in getting it set up. What I’m excited for is for an RTMP library to become available, as Adobe announced plans to open source it in the first half of this year. We’ll see how that turns out.

Categories : AIR, Actionscript, BlazeDS, Cold Fusion, ColdFusion Enterprise Server, Flex 3
Comments (0)
Mar
17

Messaging with Flex/ColdFusion via BlazeDS : Part 1 (CF configuration)

Posted by: jwd | Comments (0)

I just went through setting up Flex / ColdFusion messaging via BlazeDS, and have come through it rather unscarred considering it’s my first time using Flex messaging. Most of the documentation I have regarding messaging is biased toward Java (including the sample apps included with BlazeDS). A lot of what I found online, though very helpful, didn’t really apply to the way I wanted to do it. I’m going to document some of the steps here in the hopes that it may be helpful for others (2 parts).

Here are a few details about my configuration that may help you determine if this post might be helpful to you.

  1. When I create a new Flex project, I always leave the “Application server type” set to “None”. This helps me to create applications that can be used against multiple server types.
  2. My ColdFusion server isn’t running on the same server I develop on, nor is it usually the same server I serve my production SWFs from.
  3. This assumes you have BlazeDS correctly set up with ColdFusion, and all of your configuration files (messaging/proxy/remoting/service-config.xml) roughly the same as the default ones included in the BlazeDS distribution (note: there are special ones included for ColdFusion).. If you need help installing and configuring BlazeDS with CF, go here: http://labs.adobe.com/wiki/index.php/BlazeDS:Release_Notes .
  4. I will be going through 2 scenarios on the client side. First, is a standard publish/subscribe setup, where the clients publish and subscribe. Second, a situation where the client only subscribes, relying on the server to do all the publishing.
  5. I don’t maintain any of the above mentioned configuration files in the project, electing to manually instantiate my channels/channel sets in ActionScript.

Setting up services-config.xml

The services-config.xml file already contains a channel definition named “cf-polling-amf”. It can be used as-is if you want your poll interval to be 8 seconds. To change it, set the <polling-interval-seconds> tag to the desired interval.

Setting up messaging-config.xml

Next open the messaging-config.xml file. Here is where you set up your adapters and destinations. If the line isn’t included under the <adapters> tag, you will need to add it”

<adapter-definition id="cfgateway" class="coldfusion.flex.CFEventGatewayAdapter" default="true" />

The default destination “ColdFusionGateway” as configured is sufficient for this post. If you set up your own, there are three tags you will need to define:

  1. <adapter>, this should refer to the adapters defined in messaging-config.xml, usually set to cfgateway.
  2. <gatewayid>, this can be set as a wildcard (*) meaning the client will define it, or you can set it to a specific gatewayid (which I will explain how to set up shortly)
  3. <channel>, which refers to one of the channels defined in services-config.xml, in this case “cf-polling-amf”.

Setting up a gateway CFC

An event gateway is tied to a specific CFC file, and is configured in the ColdFusion administrator. First we will set up two CFC classes. One will be used in our client-broadcast/subscribe setup, the other in the server-broadcast/client-subscribe setup.

The basic client-broadcast/subscribe CFC should look like the following:

<cfcomponent output="false">
  <cffunction name="onIncomingMessage" access="remote" returntype="struct">
    <cfargument name="event" type="struct" required="true"/>
    <cfreturn event.data />
  </cffunction>
</cfcomponent>

It’s important that it has that name, and accepts and returns a struct-type. It’s perfectly OK to process the headers or do whatever it is you need to do before the return value is broadcast.

The server-broadcast/subscribe CFC should look like the following:

<cfcomponent output="false">
</cfcomponent>

Complicated, I know, but try not to cry…

Setting up the event gateway

Login to your ColdFusion Administrator and expand the “Event Gateways” tab. From the menu select “Gateway Instances”. Fill in the following fields:

  1. GatewayID. You will use this either in your messaging-config.xml, and/or in your Flex application.
  2. Gateway Type. Select “Data Services Messaging”. It should be there if BlazeDS is set up correctly with ColdFusion.
  3. CFC Path. Enter or browse to the absolute path of the CFC that will handle this gateway’s requests.

Since we’re using the messaging-config.xml, there’s no need to select a configuration file; and leave the startup mode to auto. If you created both CFCs as described above, then you will need to configure a separate gateway instance for each of them.
Once you restart the server, ColdFusion is set up for messaging.

Continued in part two: Messaging with Flex/ColdFusion via BlazeDS: Part 2 (Flex configuration)

Categories : Actionscript, BlazeDS, Cold Fusion, ColdFusion Enterprise Server, Flex 3, Messaging, Windows Server 2003
Comments (0)
Oct
13

Error #2044: Unhandled IOErrorEvent; text=Error #2038: File I/O Error.

Posted by: jwd | Comments (4)

I started this post a few months ago while I was working on an AIR application that uploads files to a remote server (by way of an upload script).  I ran into this error, Error #2044: Unhandled IOErrorEvent; text=Error #2038: File I/O Error,  which caused me considerable grief until I discovered the simple solution.  I got the same error in an application I was working on today, and so decided to finish this post.

I looked up the problem when I first encountered it, and there seemed to be a consensus that the problem was due to using a bad URL for the location of the upload script.  That was actually the case for me today, so I was able to fix it right away.

When I encountered the problem a few months ago, you could say that it was from using a bad URL, but it was much less obvious.  I had written the upload script in ColdFusion, hosted on a CF server.  I was certain that I had the URL typed correctly because I could access it in my browser.  I discovered over an hour later that I had an authenticated session that allowed me to see it in the browser, a privilege not shared by the AIR app.

The problem was ultimately remedied by placing a special Application.cfc in the upload script’s directory that did away with the requirement for any session variables.  This particular case may have been due to a combination of the CF server’s settings and the fact that I was using AIR, and not a Flex app that might have been served from the same server as the upload script.

Categories : AIR, Actionscript, Cold Fusion, ColdFusion Enterprise Server, Flex 3, Uncategorized
Comments (4)
Aug
11

BlazeDS on EC2 from Dobeweb.com

Posted by: jwd | Comments (0)

I stumbled upon this post by Allen of Dobeweb.com, where he gives detailed instructions for setting up an EC2 image complete with BlazeDS.  He gets down into the nitty-gritty of running EC2 from the command line (which I haven’t done in a long time… I use the Elasticfox plugin for keypair and instance management) and made it very interesting.

http://dobeweb.com/2008/guide-for-setup-blazeds-in-less-than-an-hour-with-amazon-ec2.html

Categories : Actionscript, Amazon Web Services, Application Servers, BlazeDS, EC2, Flex 3, Tomcat
Comments (0)
Apr
16

Starting To Learn Cold Fusion

Posted by: jwd | Comments (0)

I may be doing an internship this summer, at which I will begin developing back-end support for my Flex applicatiopns using Cold Fusion.  I may be posting on that in the future, depending on how it goes.  I just wanted to document two resources I will be using along this process.

The first is The Smith Project, which is an open source Cold Fusion server.   There is a version that install on Windows, one for Linux, and there’s also a WAR file that can be deployed on your J2EE server of choice.  I’ve installed it on an EC2 instance, but have been having a bit of trouble getting it configured (I need the Linux experience).

Download Smith binaries here
The second is CFEclipse, an Eclipse plugin that I have heard others speak very highly of.  I've installed it on my office computer, but haven't had time to try it out yet.  Here's the update site where Eclipse can find the plugin: http://www.cfeclipse.org/update.

We'll see how it goes.

Categories : Cold Fusion, EC2, Smith CF Server
Comments (0)
Feb
03

Maven: Rebuilds Everything!

Posted by: jwd | Comments (0)

I use Maven as my primary build & deploy utility for the Flex/Java development that I do. It may be a configuration error on my part that I’ll eventually need to look into, but every time I build my project, Maven builds the entire thing. This is especially annoying in two circumstances… first, when the Java development is pretty much finished and generally does not change from build to build; second, when the project starts getting longer (I have some that take 0:45-1:30 minutes to build, and some of my colleagues have projects that take longer).

This is going to seem trivial, but I’ve started using Flex Builder to do most of my incremental builds, while leaving JBoss (hosting my Java backend) running. The only change I’ve had to make is in my Services.mxml. Since Flex Builder deploys to http://localhost, and JBoss has my services running on http://localhost:8080, I’ve just had to change the RemoteObject endpoint from messagebroker/amf to the full URL, http://localhost:8080/project-name/messagebroker/amf. And now my builds take about 10 seconds.

Whenever I make a change to the Java, or want to deploy a full EAR, I just change it back and run Maven. To facilitate changing back and forth, I’ve declared a constant with my two endpoints, and bound the endpoint property of the RemoteObject to the constant. Then I just comment out which constant I don’t want to use.

Simple, somewhat obvious… but a huge time saver.

Categories : Actionscript, Flex 2, JBoss, Maven
Comments (0)
Next Page »

Search

Feedburner

Subscribe to

Get the latest updates delivered via email

Calendar

September 2010
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
27282930  

Archives

  • July 2010 (1)
  • June 2010 (2)
  • May 2010 (1)
  • February 2010 (11)
  • January 2010 (3)
  • December 2009 (5)
  • November 2009 (1)
  • August 2009 (8)
  • July 2009 (8)
  • May 2009 (4)
  • April 2009 (1)
  • March 2009 (6)
  • January 2009 (1)
  • November 2008 (4)
  • October 2008 (5)
  • September 2008 (1)
  • August 2008 (5)
  • July 2008 (1)
  • June 2008 (2)
  • May 2008 (8)
  • April 2008 (5)
  • March 2008 (2)
  • February 2008 (3)
  • January 2008 (1)
  • December 2007 (6)
  • November 2007 (9)
  • October 2007 (1)
  • September 2007 (2)

Categories

Tag Cloud

adobe apache Architecture book review C++ centos client server architecture Custom Components database Design error message fedora flash catalyst flex Flex 3 Flex 4 fms iis 6 Interaction Design load balancing master-master master-slave mod_proxy_balancer Monkey Patching MySQL no protocol p2p peer to peer Perl PHP Red5 regex replication self registration selinux Shell Scripting shortcut manager skins socket policy file sockets states stored procedures stratus tools workflow

Coworkers

  • Casey Jackman
  • Sean Murphy

Family

  • Emily & CJ
  • Family Blog
  • Gary Dusbabek

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

RSS FlexExamples

  • Setting a bitmap image fill on a Spark FormHeading control in Flex Hero
  • Setting the background alpha on a Spark FormHeading control in Flex Hero
  • Styling the error indicator on a Spark FomItem container in Flex Hero
  • Displaying the error indicator on a Spark FormItem container in Flex Hero
  • Styling the required indicator on a Spark FomItem container in Flex Hero

Spam Blocked

847 spam comments
blocked by
Akismet

Sponsored Links

JUICE Chat

BYU Adobe Users Group


Copyright © 2010 All Rights Reserved
Flexx Theme by iThemes
Powered by WordPress