Background
I thought I’d take advantage of the Red5 session at this year’s Flash on the Beach to check out what exactly Red5 is and whether I should bite the Java bullet and switch over from Flash Media Server. Unfortunately I couldn’t make it to the session, but a trusted colleague went in my stead and came back enthused by the merits of Red5. (here’s a link to a video of a similar session, and here’s a link to the FOTB session pdf)
I was informed that programming in Java would be very similar to programming in AS3, and would provide a development platform that’s streets ahead of the Server-Side ActionScript (aka JavaScript 1.5) that FMS supports. I was also told that the install process is dead straight forward (I have my doubts about Open-Source projects), so I thought maybe I’m missing a trick here, and decided to install Red5 and have a play.
Installing Red5
First I downloaded and installed Red5 v0.8.0 Release Candidate 1. For whatever reason this didn’t work for me, so not a good start. After some head scratching and discussion I decided to try Red5 v0.7.0 Final instead. This version installed perfectly with very minimal bother, so I guess the lesson here is if you’re a beginner never install a Release Candidate 1 version! Once you’ve got Red5 up and running, you should be able to go here:
http://localhost:5080/
to view the Red5 test page and example apps.
Installing Eclipse and the Java IDE
After enthusiastically playing with the demo apps provided for a bit, the next step was to download and install Eclipse so I could get up and running with Java.
Once I had the Eclipse framework the next step was to install a Java IDE on top of it. I opted for the “Eclipse IDE for Java EE Developers” because it seemed to be the most feature rich version of the IDE, and downloaded it from here.
Getting to grips with Java
The next problem was getting used to Java, a language I’ve never even looked at before. To do this, I strongly recommend looking in “Help/Help Contents” in Eclipse, then going to “Java Development User Guide/Getting Started/Basic Tutorial”. This is a really well written tutorial and gave me a great grounding in developing Java. If you get a bit stumped by the first hurdle in this tutorial regarding not being able to find the JDK (that you probably haven’t downloaded yet), go get it here. I went for JDK 6 Update 7 as the newer version was a Release Candidate Beta, and I’d already learned my lesson regarding RCs.
After going through that tutorial I was very pleased to see that the Java IDE I’d downloaded was just like my current favourite development tool: FlexBuilder, but way better! (why the hell didn’t Adobe implement Content Assist in FlexBuilder?!?) I was also pleased to have confirmation that Java is ridiculously similar to AS3, and looked forward to building my server-side apps in code way more similiar to AS3 than FMS’s AS1 equivalent.
Eclipse, Java and FlexBuilder
As my next move was going to be trying to build a simple Flash app that runs on Red5, I decided it would be handy to switch over from my standalone installation of FlexBuilder to the Eclipse plug-in version. You can download the plug-in version here, but you’ll need to sign in to the adobe site first.
Once I had this version of FlexBuilder installed I could quickly switch between Java and Flex Development perspectives within Eclipse and manage the whole application development process from within on IDE (which I think is very cool). When developing with FMS I’d got into the habit of editing my server-side code in Flash to take advantage of the code highlighting it provides for asc files, and my client side code in FlexBuilder, which wasn’t so cool. Also, because the server-side code is written in a dynamic language you can forget about any niceties like code hinting.
Hello World, Hello Red5
So by now I was all setup to build my first Hello World red5 application. The next step then was to find a suitable tutorial on the web, and after trying out a few not so good tutorials I found one named Getting started with Red5 server. This tutorial would’ve been perfect had the application worked after going through all the code and all the permutations of the code in the trailing comments by other perplexed developers with a fine tooth comb. The comment that really threw me though was the one posted 10 months after the tutorial advising “You need to make a jar file from you java project and store it in the lib directory of your application”. It seems something pretty fundamental must’ve changed with Red5 over those 10 months if it was now necessary to include a jar file of your project… I checked through the other example apps in my installation of Red5 and they all did indeed contain a lib folder with a jar file of the application, plus 3 other jars: “logback-classic-0.9.8.jar”, “logback-core-0.9.8.jar” and “slf4j-api-1.4.3.jar”.
Conclusions
After having a bit of a play with FMS and Red5, I think its safe to say that the future of multi user Flash apps lays firmly in the lap of Red5, unless Adobe suddenly regain interest in developing FMS, which seems to now be on a back burner. The overall development experience provided by Red5 is (or at least will be) streets ahead of FMS. Plus not only can Red5 provide the same functionality as FMS, its a “fully fledged j2EE server” which allows you to build the rest of your application logic in Java and take advantage of the extensive code libraries available.
But… that said, I’m cautious to invest too much time developing reusable systems in Red5 at the moment as its not even out of Beta yet and may well still be subject to major structural revisions. If you view the Red5 roadmap you’ll see they’re currently at the version 0.8 release and (I’m hoping) not too far off the version 1.0 Public Release. Plus in version 0.9 they intend to provide more extensive documentation and to even support server-side AS3(!), so after this point I may need to reconsider whether I should be coding server-side in Java or AS3…
In short, Red5 is an awesome (and free!) tool, but I think I’m going to bide my time and continue to fiddle around with FMS until the full version 1.0 release. This should allow me to brush up on my client side multi user app code without investing too much energy on the server-side development. Plus FMS is after all just another technology that I can sell my services in, regardless of how comparatively poor the server-side language is.
Nice writing. You are on my RSS reader now so I can read more from you down the road.
Allen Taylor
Thanks Allen, really encouraging to hear you think its worth aggregating! Hope it was helpful and I’ll make sure to post any further discoveries.
nice review , very good for new users
Nice writeup, some people are having issues with the RC1 installer and I hope to have them resolved by RC2. Good luck with your dev efforts.
Pingback: Dominick Accattato’s Site » FMS vs. Red5
Thanks Paul, can’t wait to get my hands on the next version!
“so I guess the lesson here is if you’re a beginner never install a Release Candidate 1 version! ” – This is great conclusion but one that does not come from the first experience itself
Rob, great write up on Red5! Just wondering if you installed the Red5 plugin for Eclipse? It really does make everything a lot easier to work with. In terms of Red5 changing before 1.0, we are pretty set on the structure, API, and most other public facing parts of Red5, so nothing should change before the 1.0 release. Either way though, you holding off for now (I’m sure others are too) is a good excuse for us to get there quickly.
Anyway, thanks for the great review!
Pingback: Great Review of Red5 vs. FMS (Guess Who Wins) | FF9900.org - Chris Allen's Blog on Flash, Red5, ActionScript, Java and whatever else interests him
Pingback: localToGlobal » Blog Archive » news review -> 41th week of 2008
Hi Rob, I know the feeling – sounds very similar to my experience last month: http://hibbins.wordpress.com/2008/09/17/trial-and-error/
You should also look on the OSFlash page at some of the current applications written for Red5 even in its current beta if you feel unsure of its stability, the entire Facebook video platform alone is impressive enough to boast!
Pingback: RIA Revolution » Red5 vs FMS
Nice post, seems you had a hard time with Red5 0.8.
Thanks Chris! I haven’t actually looked at the Red5 Eclipse plugin… may have to do that next though. I guessed you’d be quite close to the final API now but its nice to have that confirmation. I’m keen to get some tests up and running but I’ve had difficulty finding a decent “Hello World” tutorial. Can you recommend any?
Thank you for this.
You jumped in the pool I thought was too cold
I see now your not dieing of frost bite, I’m jumping in too. HA!
haha! That’s the spirit Joel!
Pingback: Red5 - my experience so far at iestyn.net
Wow! First off, thanks for the writeup. It (nearly) helped
I was going to adopt your position and wait a bit until red5 becomes more mature, but in the meantime, start playing around and maybe use it to get a simple video streaming server. THEN I had the epiphany. I realized that your description and experience with red5 is nearly identical to what happens with every open source software. The “At first, installation didn’t work, but I blame myself for making a silly error.” The “I finally got it to work after reading this one comment someone posted.” The “Along the way, I discovered some other great technology which I’m going to switch over to now.” And of course, the “All in all, it’s pretty good, and I have to hand it to the development team, but it’s still missing a few items of a mature software so I’ll wait a little until it’s *really* ready.” Realizing that this will be the madlibbed experience I can expect with every Linux aspect for the next foreseeable future makes me backtrack about giving my time to moving some of my computer’s chores to Linux. Again, Wow!
Hi Aner, thanks for your comment, glad it helped.
Hopefully I’ll have some more time to dabble with media servers once this big project I’m working on has finished… Gonna keep an eye on Red5 but might have a play with Wowza next.
rob
Very good post, I found this comparison table of red5 and FMS
http://askmeflash.com/article/10/comparison-wowza-vs-fms-vs-red5
thanks Ronald, very interesting!