Ever since I got up the new FMS community site fmsguru.com it's been kinda rare to get in anymore "Ask an FMSGuru" questions. I think people are just asking on the forum now or are finding their answers in the ever increasing amount of information that is on the internet about Flash Media Server. That's good I think. This particular question came in a while back and I quite literally just completely forgot about it. Sorry about that Mr. Question Sender.
The question: How do I load test my Flash Media Server applications?
The answer:
Boy this is a bit of a tough question. My first answer to this is to find a whole bunch of users to try it out. But that isn't always possible. If you happen to have a huge site with lots of users that are willing to play with the app for you to see how it runs, then great. Go for it, some people will do some testing for a free week of some service on your site or something, some will just do it because they care about the site itself. But, for the most part this isn't quite a possibility. So what else can we do?
First thing to think about is what kind of app it is. I'd say for the most part people are wondering how a data centric app is going to run. Like chats or conference applications maybe. Games are a big one too and sometimes just to see how well the server can handle lots of streams others may have a request to load test a live streaming app or prerecorded video streaming app. If you are testing a game or chat or conference app then it's important to write a bit of an AI for your app. In other words, it has to act without you doing anything so that you can watch it go.
As a basic example for a chat app you would write a quick script that randomly tosses in sentences of varying lengths to the chat at various times. This would sort of simulate a bunch of users chatting rampantly. More computers the better. Then perhaps this chat has a video feature in it where up to 5 users or something can send video. So you have to setup computers that have cameras connected to them and again have each app randomly start sending it's video. Maybe when somebody's video is detected then others will automatically play it etc. All of these things are important to see how your application is going to react to different types of loads and reacts to your code both on server and client side. Doing a very controlled test is COMPLETELY different from doing a random test like that where you don't essentially press "play" on the sending side, and after visually confirming that the video is sending and a little camera icon shows up in the userlist to then pressing "play" on the receiving side to watch that video and a little eye icon shows up on the userlist to indicate to the other user that you are watching them. This kind of stuff just plain breaks if your code has holes in it or isn't timed well.
Now, I wouldn't call it easy to go about creating that type of code and I wouldn't really know where to begin to put up some generic code to get somebody started with it because every app is different in how it's going to work and what will need to be tested and how the AI should be implemented. But the idea is there and should give you a bit of a start on where to go with the testing process.
There are a few options here for getting the numbers in. Find access to a bunch of computers and get a couple more friends etc to run a few instances of the app at the same time to see how it goes. Next best is to have a few computers running many instances of the app on one HTML page. Essentially you embed something like 10 instances in one HTML page, passing in flashvars that are all different (user IDs, usernames etc) and then they all start acting on their own with your AI code. That kind of testing will generally work with a few good computers that can handle the load of a bunch of instances running at once. Saves you from opening 10 instances of swfs too. If you don't have nonscaling on then you can squish the app size down a bit. Then you watch the server load and maybe have one dedicated PC that is running one instance of the app to see how it handles the load of 100 users or so.
Of course, the very best is to get real humans to jump in on the app. There's nothing like having people come in and double click stuff and do things out of order (at least in your head) or slightly later or earlier than you expect them too. That's when the holes in your app can show up and perhaps begin to place odd loads on your script and the server.
Going through my emails, I found this lost and forgotten question that I had mostly likely thought to answer when I got a moment. Well.. now that it's almost midnight I think I have a moment
The question: Is there any way to get debugging when the application itself won't load?
The answer:
The good news first. Yes there is.
The bad news, you have to look through the logs to find where the issue is.
In the past with FCS 1.5 and the admin panel that was used with it (which in fact you can also use with FMS2 for this particular purpose), the debugging panel that showed the traces in the application would stay open even if the application failed to launch properly. That way, you would be able to see traces to see where the problem was.
In the case with the new admin application for FMS2, when the application shuts down, the application panel in the admin app would just close. This in turn doesn't let you see if there were any traces that might indicate where the problem was.
Unfortunately the only real way to debug FMS apps is to use traces.. it sucks, but that's another topic all in itself.
So the application logs are all sitting in the install directory of FMS in the logs directory. You will want to look in the application00.log for the latest stuff. In there shows everything that you have been looking at in the admin application panels.
So that's it.
This one is a very good question and actually comes up quite often. I've seen it on forums and mailing lists. It gets answered but I guess people don't want to search. So it makes a good quick tutorial here on this site with all the rest of them :)
The question: Is it possible to insert or overwrite into the middle of an audio stream?
The answer:
Yes. You have to do this server side though.
The theory:
What you need to do is make a copy of the FLV up to the spot you want to insert your new piece in. Then you play the new piece and append it to the original. Then you take the remainder of the FLV and append it to the new FLV you are creating. This is really hokey and actually requires you take the complete time that both FLV files have. If you have a 5 minute FLV and you want to add in a short 20 second clip to the middle of it, this process will take 5 mins and 20 seconds.
So you take stream A, the original stream you want to add something into (all of this is server side)
oldStream = Stream.get("A");
Grab the piece you want to add in
smallClip = Stream.get("B");
Make a new stream to record into
newStream = Stream.get("newFile");
Make the new stream record the old file
newStream.play("oldFile");
newStream.record("record");
Then you need to monitor it with an interval of something short like every 100 milliseconds. When it reaches the time of whatever you want the new clip to go into then stop playing the old stream and put in the new one:
newStream.play(false);
newStream.play("smallClip");
** side note **
You can also at this point tell the server to stop recording too, and then use the append value in the record method to add onto the current FLV.
newStream.record(false)
newStream.play("smallClip");
newStream.record("append");
** end side note **
Watch the onStatus and see when it ends, you should get a "NetStream.Play.Stop" event, when you get that, then just play the other clip again, starting from the point where you finished off:
newStream.play("oldFile", 25); //25 is the seconds time you want the clip to start from.
When it finishes playing again then just stop recording and you should have a stream that has another stream in it. Delete the old one if you want I suppose.
So you can see it's a crappy tedious process, but yes, it can be done :)
I had to laugh at this question when it came in.
The question: How do I stop that annoying sound that occurs when I make a connection to FMS?
The answer:
I'm assuming you mean the administration panel that came with FCS 1.0 and 1.5. Yes, I agree, that sound was very annoying. There isn't much you can do about that, I really recommend you upgrade to FMS2 and use the new administration panel. There are no sounds in that thing and it works so much better.
So, you have on choice really = Turn your speakers off. Which I fully realize is not realistic. Sorry, no solution at the moment. I think the source for that admin panel was somewhere, but I can't recall where at the moment. At least then you could open up the FLA and just delete the code where it tells the SWF to play a sound on connecting up to the server.
A good question, unfortunately no good answer :(
The question: How can I playback more than one recorded streams in synchronization?
The answer:
This is definitely something that has been requested a billion times to the FMS team. Hopefully they are working hard on getting this going. To put it in a short sentence, "you can't". It sucks..
But what you can do is try to start playing them both at the same time with a low buffer. Like .5 of a second or something. Then when they are playing, up the buffer a bit to keep things in line. While the videos are playing, you also can keep a watch on the time that the videos are at and if the difference get's too high, just pause one and let the other catch up.
This requires quite a bit of coding and calculation because you have to figure out how much is buffered, how long it took to buffer, the difference in times of the videos, if the videos are staggered that will add even more trouble.
It's not that it can't be done, progressively it would be reasonably easy, just preload lots :) Streaming is a bit hard as you have to always buffer. On the flip side, using seek() to get to a point in the stream is good because you don't need to preload that part of the video to start playing it.
So, in conclusion, it can be done I guess, but it's your best calculations that are going to run it. This kind of feature is not built into FMS.
Another FMS guru question :) Getting quite a few of these, sorry I've been a bit slow to respond.
Anyways...
The question: What's with client.ping(), and how do I use it?
The answer:
Well, I guess to start off, the question is in reality a bit more advanced than what I've wrote above, but more or less it's "what the heck do I do with ping() and why doesn't work as I expect for what I want to do".
So, the first thing I will start off with is what ping() is all about. Ping in the normal network world is used to find a node on a network and how long it takes to get there and back. These packets are sent at high priority so there is less delay etc. I'm not going into too much detail on this of course, but what I can say is that FMS's client.ping() on the server side is just about the same.
What is happening behind the scenes when you call ping() on the client is the server is sending out some packets to the client at a high priority. Higher than all the other data that could be going back and forth. If it gets a response, true comes back. Not quite the same as the "normal" ping that we all know and love, but more or less you are knocking on the door and seeing if somebody answers. ping() doesn't really care how long that takes.
So, the next part of this question is "what would you use this for?". Well, a lot of people want to use it to see if a client is alive on the server. Why would you use ping for that? Well, supposedly it's the fastest way to tell. You're probably wondering "compared to what?".
Which leads us to the next question, "why would you want to know if somebody was connected up to the server if the client object still exists?"
Aha! now that is the key question here I think. In FCS1.0 and 1.5 (throughout all the updates too) there was the problem of "ghost clients". These clients would sit in the application objects that the server had yet to figure out they are gone. There are a few reasons for this of course, there could be a stay-alive going on here, where a router or something is just keeping the connection there. There is also the problem with IE in where even if you close the window, the connection to the server stays open. You can even still be sending your video and audio to the application if you didn't close it first and just closed the browser window!! Imagine that! I heard a story about how one guy's connection stayed up for over an hour with his vid and aud being broadcasted to a chat. I'm sure there are other instances of this.. It gets solved by closing ALL of the browser windows you have open of IE. Odd bug.. not sure who to blame, I guess Microsoft.
There was also the problem in where if you were doing nothing on the application, the app would disconnect you, although you'd still be there.. it's a really weird problem and it sucked, so you had to make your own "stay-alive" code to keep users connected when there was no data going back and forth in the application. Some people used ping() in this instance.
So, what does this mean to a developer of FMS apps? Well, you need to know if users are actually there and if they are going to stay there when nothing is going on. In FMS2, I've actually yet to see the problem of the user getting disconnected when nothing is going on in the app. This is a good thing :) Nice to see it fixed. There are less instances of ghost users, but they are there, especially in busier applications.
What do you do? Do you use ping() to see if they are there? My answer is to suggest "no". The reason is that ping() can return true even when the client is no longer connected. The router or something in the middle actually returns that the client is there (I don't actually know exactly what is happening here, I do know that ping() will return true even though the client isn't there).
So, this makes ping() a bit crappy. My suggestion to solve not only the worry to make sure clients stay alive in the app, and also to check if they are there is to call a function in the SWF file.
This is reasonably simple because all you need to do is create a function on the netConnection object.
myNC = new NetConnection();
myNC.checkForOnline = function(){
return "yes, I'm still here";
}
Then on the server side you just call that on all clients every 30 seconds or so (this will depend on your app of course). If the call returns an error, or nothing, or the wrong string then you know that either the client is not there or is a rogue user that has connected up to your application. The good side effect here is that you are adding a bit of security to your application. Security is always good :) Once you have discovered that the call failed or returned no string or the wrong string, you disconnect them and delete the client object.
That's about it. All about ping() and why it's not really that beneficial to use it :)
At long last a golden egg from our dev/des team has hatched and made it out into the world wide web. Vidipost is a site that offers video recording with your webcam straight to the server by taking advantage of Flash Communication Server and Flash. This video then get's paired with a custom video player that you can then link to and place anywhere on your blog or site!
We're very proud of this release to be honest and really can't wait to see how huge it's going to be. Go check it out because they are offering a one week free trial right now!
Here is the press release:
VidiPost Launches Easy-to-use Web-based Video Publishing Service
Westlake Village, CA (PRWEB) July 6, 2005 -- VidiPost in partnership with Solid Thinking Interactive, announces the official launch of an easy to use web-based Audio/Video Publishing and Emailing service. VidiPost is a web-based, Flash Video service that allows users to easily record and publish audio and video to any website. All that is required to use the application, is the latest Macromedia Flash Player, which is installed on 96% of all browsers.
VidiPost allows users to easily record Video Blogs and Podcasts and publish them to Blogs, WebPages, Auction Sites, as well as email videos to family, friends. and business associates.
Also included on the service is an RSS 2.0 feed generator allowing users to easily publish a Rich Media RSS 2.0 feed. This feed can be subscribed in leading Rich Media RSS Aggregators such as MediaTuner.com.
The VidiPost Video Publishing service "will revolutionalize how audio and video is easily published and emailed on the internet." Lead developer Graeme Bull, who led the VidiPost development team says that this application, "follows the new wave of Rich Internet Applications using top-notch Flash Video technology to assure a great experience to end users."
About VidiPost
VidiPost is a Rich Internet Applications company focused on increasing communications and media user-experiences on the Internet and mobile devices, using easy-to-use web-based services.
Sister sites of VidiPost are VidieMail.com and MediaTuner.com
About Solid Thinking Interactive
Solid Thinking Interactive (STi), a Japan/Canada based multidisciplinary design and development studio that specializes in the creation of Flash based Rich Internet Applications. STi was responsible for not only the creation of the VidiPost Recording and Player applications, but also the VidiPost logo design, web site design, dynamic programming and database integration. You can visit their site at www.solid-thinking.com.
# # #
Press Contact: David Cronshaw
Company Name: VIDIPOST
Email: david@vidipost.com
Phone: 818-519-6721
Website: http://www.VidiPost.com
More Information: http://www.prweb.com/releases/2005/7/prweb258152.htm
Back in August of 2004, shortly after its release, we blogged about a problem we came across with SS4 not correctly writing much needed metadata to FLV files it generates. You can read the original post here. In the comments of that post, you will see that I received a response from their support department that the problem had been passed on to the techs and they were working on a solution, that would probably be available in a point release.
Well, I noticed today that 4.1 had been released (AFTER 8 MONTHS) and hurriedly downloaded it with much anticipation of being able to output valid, useful FLV files, without relying on other software. Their updates do not seem to come with a readme on what has been fixed, nor does the update site seem to supply such information. However, as this is a Flash centered program and that was one of the most obvious problems, I just assumed it was fixed. After some tests, my hopes were soon dashed against the rocks and I remembered that little saying about not ASSuming...
SSOOO, I sent another email off to support, asking what exactly was updated... Below is my original email and that returned from their support staff.
---------------My Original Mail to Support------------------------------
Sent: Thursday, April 21, 2005 7:17 AM
To: Support@sorenson.com
Subject: Bug Report
First Name: Kris
Last Name: Honeycutt
Email: kris.honeycutt@solid-thinking.com
Operating System: Windows
Product: Sorenson Squeeze
Product Version: 4.0 (they haven’t updated their support form for 4.1 yet...)
Problem Description: I recently installed the 4.1 upgrade for Sorenson Squeeze for Flash MX (from version 4.0) and I am curious what was changed. I was hoping the issue with Squeeze 4.0 writing incorrect meta data to FLV files was resolved, however it still seems to be present. Please confirm.
---------------Support Response------------------------------
Kris,
That function was not added to Squeeze 4.1. I am told it may not be included until Squeeze 5 is released next year.
Andy Engberson
Technical Support
Sorenson Media
4393 South Riverboat Road Ste. 300
Salt Lake City, Utah 84123
---------------------------------------------------
To the support dept’s credit, Mr. Engerson's response time was excellent, however waiting 8 months for an update and STILL not having the problem fixed seems rather ridiculous to me, seeing as one of the products primary functions is to export FLV files....
If they wait long enough, I am not sure how many people will even care when the fix does finally come, considering Macromedia's licensing deal with On2 for using their video technology in future versions of Flash...
OK, here it is then. How to delete an FLV file off of a Flash Communication Server without using server side code at all. Just client side. This came up in the last Peldi's coding cafe a few hours ago. Peldi was showing all how to build a video recording app and had an FLV deleting function that he said must be on the server. When he asked everyone why they think it should be on the server, they all responded that the only way to delete an FLV is to do it with server side code. I responded that you can do it client side.. and hence, a tutorial on how to delete it client side because nobody believed me :)
Here's the link to the recorded tutorial, it's about 2mb and about 3 to 4 mins I think.
I didn't want to tune it too much to the veteran crowd and hope that the description in there helps others a bit less experienced in FCS apps. It's not a huge app, tiny really.. but it works :D If the explanation seems a bit redundant to you, just fast forward to near the end.
In the end... the theory is that when there is nothing in an flv file, it doesn't get created. That's why this method works.
This site is absolutely hilarious. If I were to build it I'd definitely get it going with a webcam, fcs and an flv to jpg component runnin' server side. Worth it just to see what people would post :D
I'm looking for a good editor for FCS's ASC files. Up until this point I have been using Dreamweaver MX 2004. Even though DW is excellent, and I have never had any troubles, it is a bit of a hog on the screen and I'd like something a bit lighter and faster to start up. I've recently tried Se|py but it only had flash code hints and I was really hoping for FCS server side code hints too.
*quick update*
I also need it to be able to understand 2 byte characters. Se|py does even though it's a bit weird typing it.. but you can write it.
************
So if anybody out there has an idea of what I can use, or if I can change up a software to accomodate the code hints I would be forever grateful if anybody could put a link up for me. I do plan on using Se|py for a while as it seems like a great editor, so if there is a way to add them into Se|py, that would be even cooler.
Lately I've been doing some thinking on the support and community that FCS has at the moment. I don't really have my thoughts in any special order here so I'll just write them out as they come to me, hopefully some of you out there also have some thoughts on the same thing.
To start, I've noticed an increasing amount of interest in FCS yet at the same time a dwindling amount of participation? or interest in actually building FCS apps. One blogger mentioned that due to the extremely high cost of FCS, it's not tuned to the average Joe who just wants to get some live apps up on his/her site. I misunderstood the original post that maybe FCS was too difficult for beginners or people who are new to AS, and that it wouldn't be easy for these folks to get into these types of apps, but later found out that it was pricing that was the problem. Though I have never really sat down and compared pricing vs license issues / availability and ease of use I don't really consider FCS too overly priced but wish that the licensing was a bit different. The amount of connections is reasonable if you don't use vid too much, but if you are just trying to stream out vid or get a video conference going with a bunch of people, that's a different story. Anyways, to not get too off topic on this particular issue, I'm wondering what would cause a decrease in apps being put out. I have to say that I almost never stop messing with something in FCS every single day and can't imagine going back to MSN for daily in-house communication or corroboration with clients. Not only that, there are just so many "neat" things that you can do with FCS, and people generally are interested in that aspect (live data, vid/aud). It's just plain fun. So where's the bottleneck? Well for Japan (which is where most of my attention is), it's a major lack of information, books and material to study off of (in the local language of course). Since the components aren't translated over to Japanese, neither are the documents, which really really sucks to be honest. It makes me wish I was part of the FCS team here in Japan so I could whip some stuff out to boost the community up a bit. Unfortunately it doesn't seem to be a priority here (though I really have no idea of what is a priority for MM Japan...) that's just the impression I and a lot of others have. How unfortunate, there are so many possibilities if only there wasn't such a large language barrier.
On another note, it's great to see an update come out for FCS, but what's with the continuous delay of v2? Is it a delay or will we never see it? There are more than a few people who are fuming that MM is keeping all the cool functionality for themselves (see: screensharing) so they can get their foot firmly planted in their own market before any of the developers who work with FCS can. I'm not sure if that is the true story, but again that is the impression that comes across I think. Of course MM did give it a shot in ver 1.5 to get screen sharing out, it just didn't work out. I'm sure we'll see it in v2 but... when is v2 coming out? I wish there was more info on the future of FCS, a roadmap or plan of what MM will do with it in the near and far future. Though because of Breeze I'm sure FCS itself isn't going to go anywhere... but what will it morph into? These are issues that I think every FCS developer is thinking about right now as we continue to invest more and more time and energy into it. What can we plan for, and should we continue to invest time and energy into FCS? Will it still be a "sellable" option to clients? How will pricing work in the future? As we can see with Flex, MM is trying harder to concentrate on it's "Enterprise" image, will FCS go up in price like Flex did and scare away the rest of the low budget companies? Will it be out of reach, or will we have better options? I think these are all important points for all FCS dev guys and gals out there.
So what can we do? What is possible in the hands of anybody but MM (as they seem to be busy with other projects)? Maybe I should ask, what is it that we would want to do? Why are there so many resources and new tutorials for flash, yet so few for FCS? Is it a feeling of movement in Flash that drives people to get out more resources? Do people have more trust in the fact that Flash will be around for time to come so they feel it's worth writing or teaching about? Is FCS missing that? Is it a limitation of what FCS can do? I have a feeling if MM drummed up more support and technotes or articles on FCS, the community would follow that lead in some way. Do we have to rely on the mothership to know where to go? Does MM feel this is a bit of a burden? "how come we always have to lead the pack? pick things up where they were left off and run with it" kind of idea? "you can lead a horse to water but...." or do they use it to control the implementation of certain apps and technology.
Those are a lot of thoughts for one post I think, and I have more, but thinking now that I should organize them a bit. I most certainly don't want to just lay questions out there, but also be able to provide some answers if possible.
I'm so happy. I can tunnel with a Windows server now thanks to the *major* update to FCS (release 2). I can't believe how many bugs they fixed! (to be honest though, it's about friggin' time! FCS one and a half has been out for how long now?) They must have found quite a few when it came to building breeze I guess because things are really looking up now. :)
Anyways, if you are using a windows server and haven't updated yet, I strongly suggest it so you and (if you have them) your clients will be able to take advantage of the tunneling abilities now (if you hadn't before..). On a last note, there is a really cool option that was added where you can set how much audio can lag before it starts dropping messages. This should be good because there was a nasty tendency for audio to just plain get slower...and slower... and slower.. I can't wait to take advantage of all of this now. May the FCS boys and girls in MM get a big raise and a party to celebrate such a great improvement :)
mental note to self: check the setInterval function thoroughly 'cause supposedly it works now.
Thanks and huge kudos to Bill Sanders for the first chapter of the open-source-free-for-all-to-read-and-contribute book is done! To give a little background as to where this came from, this book was thought up on the Flashcom figgyleaf mailing list to help with the community's extreme lack of books and material to learn from for FCS. You gotta hand it to Bill, he wrote up a chapter on server side shared objects which is 11 pages long and he has included the source files just in case you have trouble following along with what he wrote about.
I recommend to anyone who is trying to get into FCS to read this, as it's a great primer for SS shared objects and is written quite well I think. Of course Bill has a whole book of practice under his belt so it is to be expected ;)
For any of you out there that are interested, this "book" is free for all to contribute and it doesn't matter what is contributed except that it be FCS related. I myself am thinking seriously about getting in on this, but I also write tutes for flashcomguru.com and my own site, so it might get a bit redundant (and I am lacking a bit in time...)
It would be really cool if this book was in more than 1 language too!
Last night I received an email from a fellow developer that was really in a pickle (when a fellow dev guy says he's about to cry like a 12 year old girl...) about a bug with the video object in Flash. I tried to explain to him what it was before that on the flashcom figgyleaf list but I wasn't getting my point across quite as well as I would have liked to I guess.
So due to the circumstances he was in, I couldn't stand by and watch him get fired or something from work and immediately cooked up a quick tute to help him solve his problem.
The bug is with the video object only in the flash player 7. I wrote a past post on this here. If you test this with FP6 it will work fine. My fix entails that you attach the video object to the stage each time you want to attach the cam to it so that it will reset and show the video properly each and every time, this will only be required if somebody else had been using that video object before you.
The only thing is (in this example) in the av presence component the buttons are above the video on the stage but when you attach the video by AS, they end up below the video so you have to find a way around that, maybe by placing them below the video object or placing them on a level above the video with AS. I haven't covered that part..
Keep in mind that this is not a component fix (fyi, in the tute I am using v1 components, and only because it is an easy example), it is the fix for all video objects.
I'm actually quite surprised that other developers haven't either noticed or said anything, and a bit more surprised that MM won't recognize that this is a bug in the FP7.
Here's the video tutorial. It's about 5 mins.
If it has helped you (or not maybe), please let me know in the comments.
I've been seeing a bit of a better demand lately on my site for information on FCS. It seems FCS is picking up a bit better now in Japan which of course leads to lots of questions... And boy do I have answers! well.. most of the time. :)
Currently I have about 19 tutes up on FCS, but because it's not such a hit yet here (lack of japanese hosts, high cost, and no info anywhere.. a bit on MM Japan's site) I haven't posted anything coming close to "advanced material". Though I'd like to change that, and it finally seems like there is a demand for it coming through.
The latest question I got was how to call a function that is in another client's movie. Of course being able to do that brings all kinds of options to the board, the most basic being maybe a URL opener, to something more along of lines of letting the user know that somebody (passing the username too) is trying to get a hold of them and to open up their video window to have a conference. Or something along those lines :)
I'm not sure exactly what the user is going to use it for, but the goal is quite clear I think. So how do you teach something like this? There are of course a series of steps to take to acquire this ability to send commands to a particular user and not all or a group. It wouldn't do to send a request to a user, to find out that it got sent to the wrong user, let alone to all users!
I originally explained on the forum to the user the steps that are required to accomplish this.
1. Give the user a unique ID that you can use later to pinpoint them
2. Setup an event handler to know when you have chosen a user and want to send them a command
3. Setup a receiving function in the movie so that when somebody calls it, it will do something.
There are more points but this is where it gets a bit sticky because there are at least two ways to do this. There are good points and bad points to them too. I'll try to explain the main two ways here:
The first way that we have is to setup functions on the caller side to send the call with the callee ID, receive that on the server side and then send it off to the callee but matching up the ID to one of the connected users. This is the best way. Why? because now you have control over what is happening. If you wanted to, you could even log that in a central location! I've explained this bonus in this post. The down side? well.. you have to be able to use server side script. It requires a server side script to run and requires processing power of the server (which maybe isn't so bad).
The other option we have is to have all connect to a "command" shared object. Using the send() method you can send calls to functions that are connected to the shared object on all users. The upside of this? well, it's all done on the client side. You don't even need to use server side script. If I was going to hijack somebody's account (which I wouldn't) I would use this method :D . You don't need to know SSAS and there is no need for a server side file. The bad side? besides the fact that it's not controllable centrally, the function get's called to everybody. If all receive the call, they all have to check if they are being called or if it's for someone else, if so then ignore it. This takes up cycles on the client side (not good) and sucks up more bandwidth in the end.
It so happened that last night the user that was wondering on the above issue popped into the on-site chat app I have up and asked another interesting question on how to get his video to show up on somebody elses screen. This surprised me a bit as it isn't so tough and ended up taking out about 10 minutes to explain it in detail of what to publish and play. Using the "shared notepad" I have hooked up to the chat, I wrote out the required script for him as he watched on hmming and hrmming ;). It's cool to see people grow and realize new things when you can give them some info on whatever they wanted to know. You can almost see their eyes light up in recognition of what is going on, and off they go to try out this new idea.
I ended up writing a tute on using the server side script style and am waiting patiently for questions that I hope come so I can delve into it a bit more. We'll see where it leads to.
What the heck? Going through blogs lately you'd think that FCS pretty much disappeared off of MM's radar or something, they haven't posted a new resource, technote, tutorial or advertised ANYTHING for it for quite some time now. Neither have any of the other bloggers. Not only that, it's pretty much the only product that they DON'T have a link to on their home page...
Mike Chambers is hard at work pushing Central, Ben Forta is all over the place pushing Flex, FlashMX2004 is getting a lot of attention, lots of CF stuff... but NOTHING on FCS.. Do people know something I don't? Is it because FCS is in wonderland sitting at version 1 and a half? Yes thats 1 and 1/2. Looks different from 1.5 but it's the same thing. It's halfway from somewhere and halfway to nowhere as there hasn't been any notice whatsoever as to what is going on...
Well, if MM won't push it I will. This software is cool, and I really hope they don't discontinue it anytime soon... though with the lack of PR lately..
Here are some great resources on FCS. There aren't many and I will update this post as I find more, or if you have any that I have missed please feel free to post it, but here goes.
Biggest and newest on the list is:
Flashcomguru - This site currently has 16 tutorials on FCS with a lot more to come. I've written 4 of them with other top FCS developers out there like Fernando, Stefan, and not seen lately Gani. There is also a very active forum there for all that have questions or comments on FCS. Thanks to Stefan for putting this site up and supporting it.
Peldi.com - Everybody has heard of Peldi's site. The major FCS god out there in MM. He usually posts some great pieces of code that you can take advantage of in your own apps. The great thing is the other two gods of FCS in MM, Srivanias and Pritham also donate some great snippets or small apps that really help out.
Flashcom figgyleaf mailing list - A superb place to get info on FCS. There are a lot of people on this list that know what they are doing with FCS and most questions do not go unanswered on here. MM watches it too, so every once in a while they will pop in with some comments or help. Very appreciated.
Brian Lesser's site - Soon to get a book out (I haven't read it of course, but I would already fully recommend it. Brian is one of the most knowledgable people I have had the pleasure of arguing with on figgyleaf ;) Excellent skills with FCS
Fernando's site - A blog with snippets and components for FCS. What a wiz! He doesn't post so often but it's quality not quantity for him I think.
Last and pretty much least is MM's site. OK, it's not that bad :) although lack of new info and articles is quite disappointing but with any luck it's just that they are really busy with.... something... they don't even watch their own forum..
I love it. I use it as much as I can whenever and wherever I can. Why? Well that's something I'd like to help others understand, so I'll write a couple of paragraphs on it (another topic I've wanted to write up on for a while now..)
The biggest "immediate" bonus I have found using SSAS (server side actionscript) is that nobody can see it but me. In other words, even if you steal my code with ASV or some other decompiling program, you'll most likely not get it to work properly, mainly because I hide most of the meat in the server side and just make calls to it. There are a lot of discussions going on right now on this topic and I really wanted to point out that if you plan and design your apps right in the beginning, your FCS apps can stay reasonably safe. That's a major bonus, but it's only if you are worried about your app getting ripped off by some swf thief out there. If that's not a big deal then this bonus isn't so great.
What's the best bonus though? I have found that putting most of my "controlling" functions server side, I have central command of what is going on in my app. This is extremely important as I actually mentioned in a past post here when talking about debugging FCS apps.
If you ever have an application where a user's properties, for example their status (busy, away, here, sleeping...) needs changing, you should never ever "set" the value on the client side. Send that value to the server where the server will take it and set the value. This isn't so much a big deal where only one user can set one value as it is when you have a lot of users who have the chance to set one value (or more). If you don't control this server side, you are going to see mayhem in your app, and nothing will work as you wanted it to (depending on the app of course, but in my experience... ) This is the absolute beauty of SSAS. I recommend sitting down and learning it, using it, making mistakes, fixing them, all kinds of things. Play with it, learn tricks that will be useful in future apps. There are a lot of functions you can create that can be used throughout many many apps you build now and in the future. ID creating, password changing, status changing, kicking users off your app... stuff like that.
Safe, easy (reasonably), effective, reusable.. what more could you want?
If you haven't caught wind of this site, www.flashcomguru.com yet (being on Figgy's FCS list.. you probably already have) then hop on over there! It's only just started (less than 24 hours ago) but I've never seen a bigger faster growing community site for FCS yet and there is a LOT of talent there. You got questions about FCS? They'll get answered. Combine that with a whole bunch of tutorials on how to mess with FCS, and it's a full blown virtual knowledge base for a software that has been left a little out in the cold concerning tutes and reliable information. (unless I'm missing a site or two in my favorites... let me know if I am)
Anybody on the Figgyleaf Flashcomm mailing list has heard these stories before and especially now of how some connection lines are getting jacked, or even the whole applicaton! Poor Peldi has had his whole swf taken into a frame of another site and used to the hackers discretion. Why does this happen? Who's responsiblity is it to secure the FCS apps? What can we do to not have this happen?
Read on for more on my thoughts on the security of FCS.
Well there is a mighty force brewing in the FCS developing world right now. All kinds of ideas of how to "get the hackers" and whatnot if they try and come to take your app away to their own world. This is all cool, as there are tons of ideas out there of how to check where the swf is being read from, the html file, and where to direct them if they aren't in the right place. It's cool to see a community come together on something.
So what's the problem anyways? Well, to get an answer for that you have to take a look at the security for FCS and how it can be manipulated. How can you protect your apps straight out of the box? (or straight after the DL from MM's site). By default, there is no security set up for FCS, you have to change up some of the files a bit yourself (which is quite normal) There is one way to secure things right away. That would be to go into the vHost.xml file and change up the Allow tag down near the bottom of the file. There is also one in the adaptor.xml file, but for most who don't have their own server, the adaptor.xml file will not be available for you to change.
There's a server side script that can be created for this type of thing too if you can't set the vhost or adaptor file to limit domains, and that is to get the referrer of the app, but this is a poor way to implement security in a Flashcom app as it can be faked by just writing the name of the domain as the name of the directory or file, and it can be got around just a little too easily for my liking.
BUT, as we have seen with Peldi's app, neither of the above help. What happened with him is that the hackers took his swf, not to put on their site, but to just link to in their own frame and used his app freely. That's easy! So, even if Peldi had his security up on his app, which supposedly he did, it doesn't make a dif in this case as the file is literally still on his own site... and the referrer is pointing to his site.
So what is a true fix, and good security? Well of course implementing the above works well for most situations like when somebody rips off your connection string (which is simple with ASV), but how about when they want your whole app, and not just the connection string? This seems so weird though... maybe put a big logo on there? Welcome to MY (substitute your name or site name) CHAT APP.
First off use a DB, and create a proper logon sequence to the page. Make sure the user is a registered user of your app, then let them connect up to the swf. Of course if somebody registers for your app and they make it in and then steal your connection string.... well you may be hooped but not if you combine the above with some proper server side script and remoting. So far, the best combination I have found is to make sure you pass over the username and password to the FCS server (over https), and have remoting (if you have it) on there check a DB if the user is a registered user. This can all be done in the server side of the FCS app asc file. If they aren't a registered user, you can tell them so (maybe they got the PW wrong) At the same time, you can keep a record of how many times they messed up with logging in, and lock them out, but that's getting a bit indepth for this post.
What do you do when a registered user rips off your app then?? setting it up so that anybody can log into the app with the registered user's username.. Well, then it's a matter of making sure the file is not being put in a frame on somebody elses site. There are multiple ways to do this depending on the server side language you are using.
I'll try to post more on this soon, but what a headache this is for all FCS developers. It sucks that there isn't an easy way to protect our apps, but the technology is young and I'm sure MM will think of something to combat these new style of hackers. If anybody has more ideas, or things that worked for them, I'd be glad to hear about them along with the rest of the FCS dev community I think.
Is what I have thought after taking another look at this site after about 7 or 8 months of not visiting. One of the reasons I'm bringing up this site (is has been around for quite a while) is that it is snowing in Zanpo! This is really cool, not only that, they must have had to recreate every block they had to show snow. Amazing work.
There was a question on their forum as to how to make it more popular as things have slowed down a bit. My first thought would be to incorporate FCS into this. How many users are on at the moment, their info, where they are, teleport to them, chat, see their vid, pick a fight whatever. If you could provide you're own avatar (the walking dude) that would be cool too. Have some town hall meetings there where everybody would gather in one room and the person in charge would have the floor, do a presentation, show some vid.. all kinds of stuff comes to mind. There are so many MORE options when you have when you have live data flying around.
This site really blows me away, but there is so much more that can be done.
For any of you on the figgyleaf flashcom mailing list this isn't much new news to you but I've been working my a$$ off trying to get tunneling to work properly on a windows server. I work in an environment where the network is tighter than a .... well.. you fill in the blank there ;) , and nothing gets in or out that the network meanies don't look at first. Heck... we aren't even allowed to use outside mailing systems like msn or yahoo.
Anyways, the servers that I can connect up to are... Linux. Yes it's true. If you have a Linux flashcom server I am 99% sure I can connect up to it on the first try. But a windows server I can't. SO.. I have been doing some research on the subject because I would really like to get the darn thing working (though I've been having a tough time getting MM to help out a bit on the subject :( ) They are busy folks maybe. But! Thanks to The God of Flashcom Srinivas Manapragada I now have a super script in my hands (compliments to Peldi for putting it up).
With this magical script, I can connect to my windows server 1 out 5 tries or so. The funny thing is that it'll connect on a different port everytime. Timing out and failing are all sporadic and there is no real pattern. I have noticed though that normal RTMP on default (no port number after the server name) connected up the most. About 3 times out 12 or 13 tries. The next best was 1935 and then 443 on RTMPT. The default of RTMPT never hooked up and neither did setting the port on normal RTMP. Lastly, setting the RTMPT port to 80 hooked up about once I think.
Out of this experience I have found it is best NOT to set the port for RTMP as it seems to be special or something and checks out all kinds of ports for you, whereas it's a good idea to set the port for RTMPT. But in these cases... why would one fail and the other not? Why is it not the least bit constant? Still a mystery but I'm still on it. Just need a linux server to test with and MT won't get back to me on my inquiry on a new account....(I'm pretty sure they run off of Linux) Talk about poor customer service, it's been over a day since I sent out my last email and no reply whatsoever. :(
My advice so far though (even though MM says there is no dif) is to DEFINITELY go Linux. Don't do the windows thing... there's something fishy going on with that server... not only that the setInterval() doesn't work properly... ;)
This problem can be reproduced by putting two avpresences on the stage with a simple connect, connecting up with two different computers, publishing with both then stop publishing and swap avpresences. The loopback from the camera will stop working but it will still publish properly. In other words you won't be able to see yourself anymore. I cannot get this to happen with the flash 6 player/plugin though. Only flash player/plugin 7. It's not just the avpresences that do this, all video objects do it. So if you have your own version of the avpresence it'll stop working properly (but only on the flash player/plugin 7).
read on for the fix/workaround
What I think is happening here is the video object is not able to reinitialize itself to accept the camera object again. Reinitializing the camera didn't work so what I did to get my apps to work in 6 or 7, was to place a video object in a movieclip. Use linkage and attachMovie to get it on the stage when somebody is going to play or publish and attach the video to that.
It works, and you won't hear your clients saying to you that your apps are weird and buggy. Nobody wants to hear that. But it's a crappy thing that we have to get around another bug in flash. I have posted it to MM's site though, so hopefully we'll see some action soon.
I'm sure there are others that feel the same way I do. There are some bugs in FCS that are truly annoying. Why does the title say they are not a bug? well it's not that they aren't a bug, but when it's brought up to MM they will never say it's a bug. Most likely "it's being looked into". Not to flame MM though. They did get a nice patch that made FCS 1.5 a lot more stable.. I won't even start on FCS 1.0, we can call that a public beta or something....
I'd like to make this post less of a rant and much more of a useful post by mentioning a couple of the workarounds for the "non-bugs".
1. setInterval() on the server side on Windows. Linux seems to be fine, in fact the patch fixed it for linux but messed it up for Windows. The other funny thing is that this only happens on virtual hosts. How do you get around this? Clear your interval everytime you run the function that it's supposed to run. Then set it again. But this bug doesn't exist :) But it's being looked into.
2. If there is no action in your app between you and the server for a few minutes, you will stay connected but FCS will not respond to your pleas to do something. This is weird too. You are connected, which means you are alive and well to FCS, but the calls, or onSyncs stop working. How do you solve it? Set up a pinger function. You'll need to send some data, or get some data, or call a function on the server to make sure that the server understands you are still there. I recommend doing this every minute. If you have bought Phillip Kermans new book, you probably have read that he has the same recommendation, and if I remember correctly he brought it up (to no response) in the Chattyfig flashcom list. This isn't a bug, nor is it being looked into.
3. onDisconnect() doesn't get called on the server when a client disconnects. Yes.. this is a biggy. You need to let a few people know that this client has disappeared out of the app. This generally happens when the user doesn't use a close() method on the netConnection and just closes the browser or desktop app. How to get around this one? Ping the client every 5 seconds or so.... if the ping doesn't come back.. they are not there? Theoretically yes. Not sure if this is a bug of FCS or the flash player. Sure wish there was some more input from MM on this. A lot of people have brought this up.
4. When playing a video and you pause it, all the video/audio that was in the buffer... disappears. This sucks and there is no way around it, especially if you have buffered a nice amount or you are on a dial up, or BOTH! Ah well..
5. On high quality video publishing 95 or so, and putting the size at the highest the camera can handle, the first time you speak into the mic (or make any sound) the video will stop being sent to FCS for a few seconds. Though if you make a noise in the mic before publishing (to initialize the audio in the flash player?) it will usually work fine. This happens only on the first time of making some kind of noise into the mic. This is totally weird, and I have only had it happen in one app. Though my publishing code is absolutely no different between apps so I know it's not that. The only thing I could think of was the quality and size of the video. Bug? not sure. But no response from MM which means they are either baffled and don't want to touch it with a ten foot pole or they have seen it too and hope the cat doesn't get out of the bag. But I don't see MM as that kind of company. Most likely a flash player problem more than an FCS problem
I think that's about it for now. I'm sure there are others but I can't recall them to mind, which means they aren't so big. If anybody else has a funny bug (but not a bug) speak up a bit. I'd like to know, and I'm pretty sure MM reads everything they can. If I'm wrong on any of the above and there is a real reason as to why they happen I'd like to hear that too. Until then... it's workaround time, but this of course is for any software out there.
To conclude, I would like to say that for the most part FCS is absolutely rad and I can't wait to see what they bring out in the next version. I work with it every single day and I have quite a few desktop apps that I use everyday, if I didn't have them I'd be screwed. Lots of work thinking of all the variables you get with live data, vid, aud, connections, SO's, but... it's a lot of fun. :)
Yes.. still teaching FCS here. Since it is such a new concept in Japan that you can actually build applications in Flash, the first thing that I have to get across to my young geniuses here (and management) is that Flash isn't for stupid animations anymore. Not in my department at least. With the app that I got out for the training (see a post below on debugging) it really opened everybodys eyes here that Flash is more than for crappy animations that just annoy you.
So I've started out by explaining how close actionscript is to Javascript and server side script for FCS is even closer. Which helped a lot because now they (hard studying youngsters) now have a springboard to jump off of.
Read on for more on this...
When teaching something from step 1, if somebody doesn't understand the concept of what you are teaching it'll be a lot harder to explain what's going on. For example learning a new country's language. If the teacher can find someway to show that this new language is somehow related to what the student is already familiar with (like English and Spanish maybe, but not Japanese and English... In a case like this, you would try to explain the blatant differences, best if you can find opposites) then the learning process should go along a little less painlessly.
Going on that idea, I explain some of the closer concepts to Javascript, and the concept of OOP which can actually apply to almost any technical language. All of a sudden a light comes on in my happy students little eye and she has now mastered (within two weeks) the basics of flash actionscript and has built a chat app, video recording, video playing (with scrubber), shared object saving, and mastered the basic concepts of the netConnection, netStreams and how objects, arrays, and functions work. Of course the concepts there aren't so different than other languages but I have never seen anybody pick up so quick on something. Mainly because Flash is not just a language, you need to design with it too. Name instances, figure out layers, and levels.
Hopefully soon I can get her (yes she's a she - this in line with a few comments on other blogs that there aren't many women in this type of work) to move into XML and also Remoting because we have it all here and I really want to get more apps out that pull in data from DB's.
Hopefully this thread will continue in a happy direction sometime soon. Will post then :)
I'm teaching FCS here at work now. We have too many apps that need live data, or video/audio work that I can't build them all myself.. and don't want to either. So it's on to the younger generation of quick and bright minds. I shall now pass down all my accumulated FCS knowledge so I can finally take a break from coding and coding and coding..
Though I do have to say, coding for FCS is a lot more interesting than just Flash apps. Just flash stuff might have a form or two, some buttons, maybe a bit of xml getting read in and creating a menu or something, but it just doesn't compare to seeing live data or whatever flashing across screen when you hook up. Everybody in their dog has created a chat app at least once, but very few have created a high quality chat app out there. When I mean high quality, I'm talking above MSN or Yahoo messenger. I'm talking redundancy, information messages if you're cut off, line is slow, extra options like emoticons or sounds that you can customize. But believe it or not, MSN and all other chat apps have that. What makes FCS a better chat is all that and you can design it, shape it, put your own logo on it, control it.. pretty much whatever you want. But that's another story that I'm sure I'll get back to soon enough here. I'm interested in getting out a few words on teaching.
When teaching people what you know, it's hard not to get frustrated when they "don't get it". You explain a concept of how something works, and they say yes they understand and you move on. Come back to it later and they are like "we went over that?"... and you're like.. "yes..." and time stops for a few seconds as you both think the same thing. "WTF".
SO, take a step back as to what you know and try to remember when you didn't know. Bring back from the far recesses of your mind that horrible feeling of being confused and lost when netConnection.connect() was mind boggling and you were wondering why you had to connect to the connection, stream, and SO. How come one doesn't do it all?? Does it mean I'm making more than one connection? At least that's what I thought a while back.
It's not so daunting a task I think. Take things slow, make sure you have a goal in what you want to teach. I have taken an approach of assigning tasks that I would like to see done. For example, a chat app that will show a list of the users, chat area, login area, and the fact that you can press enter or the send button to send a chat. NO COMPONENTS... damn them... Simple app eh? Or so you'd think. There are quite a few ways to get the above done, but which is easiest? best? most effecient and bug proof? Those are the keys I think. Then it just goes from there, we move on to video/audio. Play the vid, pause it, give it a playing bar that you can scrub on... things like that.
I'll try to touch more on my experiences of teaching technical stuff like this. I do have experience in teaching other topics, but this is my first for FCS. Should be interesting.
OK.. I've finally finished up the greuling one week of support for my FCS application that I mentioned just a little in my last post here. It wasn't so bad really other than the fact that I had to work when everybody else wasn't. To put the app in a nutshell, it's a very high-traffic video phone system for a currency dealing game/training.
Dealers are very very short tempered people who's only goal in life is to make money. Anything that slows them down in making that cash is as good as dead. I've heard many a scary story from support teams for these guys, along with a funny one that a guy was so pissed he busted his keyboard over his knee and threw it across the room. He then told the support guy that his keyboard isn't working and to hurry up and get him a new one... ah well, getting off topic here.
So, anyways the app went really well but I found debugging a bit tough due to the high speed in which these people would be calling other banks (there are up to 16 banks in a session). The calls are usually finished within a minute, after selling or buying some currency, and then they are off to the next call. I tried running through the traces on the server side of FCS, but that wasn't going well as it was scrolling so fast at times that it just wasn't readable. Not only that, scrolling in flash sucks up so much CPU that it has an effect on the FCS app... that sucks.
It just so happens though that I had set up some remoting to keep track of who called who and if it got through or not (this app actually has a waiting option if one bank really needs to get a hold of another bank). So we could track later who was a busy bank calling everyone in their dog, and who wasn't. This was quite handy, but I had forgotten to put a time stamp in there so it was extremely tough to track down my only bug in the system.. cross calls. When a cross call happened in the beginning the main problem was that the conversations were so alike that the person who wasn't supposed to be in the call would be able to follow along with a conversation that wasn't being had with them. They could hear the other call and that wasn't good as it would be taken that they were buying/selling currency to/from that bank. So I had to debug this puppy right then and there or there would be a lot of banks short or long on money...
Read on for look at my debugging approach..
The main reason this bug made it into the production version of this app is that we didn't have enough people or time to properly test when so many people are calling others at the exact same time. Whether they would be sitting in somebody elses waiting list or just happened to catch them inbetween calls or whatever. The options seemed endless. But there was a method to my madness and I was definitely going to track it down.
Problem: Two people would be able to call the same person
Sub problem: and the person who didn't make it through to that person could hear the current conversation.
Frequency: Rare... hard to duplicate
At the very least I had to get rid of the sub-problem. The weirdest thing is that it was theoretically impossible to call the same person as I had set them as busy as soon as one person made it through.
So on to the debugging. I first wondered if there was something not making it to the server. It is at the server where I am setting whether they are busy or not and if a call can be made or if that person should go into that persons waiting list. At this time, all changes were sent from the client, unfortunately if two people accessed (read) a value before it was set then there was the possiblity that two people could call one person. The biggest thing I needed to know is the timing of when this happened, so I immediately changed up the code that makes the inserts into the DB for logging to show the time when each call was made. This helped. I found two different patterns. Due to being able to see the time at which a call was made, whether that person was on a call (or should have been on a call). As all FCS developers know, FCS's logging tools... well.. suck. You have to use flash to read them and not only that, they aren't a very readable format. By putting everything into a DB and then looking it later using queries, it's quite easy to pinpoint where something is going wrong. I strongly recommend getting into remoting from the FCS side. Very handy.
So the two patterns were 1. Two banks would call one bank at the exact same time. 2. Even though a bank was busy, somebody would be able to call them and that would cut off the first person. These patterns were figured out by checking the call number and time it was made all from the DB.
Running through my code, I realized one thing about FCS apps.. If there is anything that you want only one person to do or access, do it all server side. I had a check on the client side to see if the person they were calling was busy or not then make the call from the client side. If I were to rebuild this app from the beginning, I would definitely use all server side script that would tell the clients what to do and when. The second pattern was a bit weirder because I think it had to do with the busy list. When somebody became free they would check their busy list (stored in an SO array) and if somebody was in there they would call them. Supposedly the person who is waiting is not talking to somebody else, but I think with the frequency of calls that were made (1000's within 30 minutes) somewhere along the line, a list didn't get cleaned out properly. *sigh* There was no easy to way to fix this one yet so I concentrated on making sure that the person who didn't get through or was cut off weren't able to keep listening to the conversation. This was done with a little trickery of making sure that their feed was being sent using their bank number and call number combined. You might be thinking, well.. wouldn't the person who received two calls at the same time be connected to both calls? nope, I thought of that and made sure that before I published a feed to make sure to unpublish first. That stopped the feed that was going to the first person (or whoever was getting cut off).
In the end, I didn't solve the main problem, but did manage to reduce confusion as now the person who got cut off was staring at a frozen image, or nothing. They could hang up and call the next person.. a little peeved maybe, buy it was only training and not the real thing.
The idea behind this debugging story is that you can't be too careful in your coding. When it comes to FCS stuff, everything is live, you have to think of so many more things. When to cut off feeds, start them, send messages to whom and when from where and if that is supposed to get a response then do something with it. Do people double click? Do they move the mouse off the button after they click? All kinds of stuff. Once again, I'll go into the little bugs in another post... I've typed for too long :)
And it is an art, make no mistake. I've just spent the last 3 hours trying to find out where the timing is off on a live app that is actually in major use even as I type this blog. (more on this later) But debugging isn't just looking at code and seeing if you are setting your vars properly. It's a matter of being able to see into the future. How are the users going to use the app, are they going to double click, single click, are they going to release the mouse outside of the button, will they accidently close the app halfway through.. there are thousands of possiblities out there and to be a good app, a perfect app, you have to think of them all and find a way to handle those errors.
Also, working with FCS, all the data is live. In an environment where even the slightest millisecond counts, your sight into the future had better be as clear as a bell or your app will fail.. More on this later as I gotta get back :)
I know of a few places on the net that have forums that are dedicated to FCS. Others have FCS sitting inside a "Server related" forum. I'm curious though as to which is best.
I try to get involved on MM's forum, and Flashkit because everybody knows those too. I was also a little involved on the Ultrashock forum, but nobody really posts there on FCS. Another thing that sucks about Ultrashock is that it's hard to bookmark stuff or print it because it's all frames..but that's a different subject. Flashkit gets a bit of traffic though so I try to answer the most realistic questions when I get some time. On MM's forum I managed to keep up with things for a while when I really wanted to study FCS. I have found that one of the best ways to learn is not so much as being a virtual wall flower and reading everything, as to actually getting in there and trying to solve problems that others are having. In that way, I really got involved with flashcomstudio and did a few tutes along with moderating half the forum, which is completely dedicated to FCS. Unfortunately for them, they aren't managed too well anymore and I have a pretty good feeling it won't be up for much longer.
There's also "we're here", which I'm never there, though I do have an ID, so I don't really know what's going there, but I do know that quite a few of the more knowledgable are there who I never see on Flashkit and very rarely on MM's forum. Does this make we're here the most reliable then? Is it most popular? Looking at the post count for there it's not...
I would love to see a site (a well done site) that is dedicated completely to Flash Communication Server. Code, forum, tutorials and news. And in more than one language.